Image of the glider from the Game of Life by John Conway
Skip to content

{ Category Archives } Python

All things Python.

Steganography

I have been familiar with steganography for a number of years. In fact, back when I was in middle school, I developed a fascination for encryption, and hiding messages, mostly so I could pass notes back and forth to classmates during class. It wasn’t long before I found “invisible ink”, which is a form of [...]

Announcing Penny Red

This is my first open source project that I’ve started and maintained, so I’m pretty excited about it. I was upset at the current offerings of Hashcash for the various MUAs, so I set out to do something about it. You’ve already read on my blog about my solutions for minting and verifying Hashcash tokens [...]

Verifying Hashcash Tokens With Mutt

Just five days ago, I blogged about minting Hashcash tokens in Mutt using a Python script (make sure you check that page for any updates to the source if you’re using it). Well today, I finished writing my verification script. It takes some additional changes to your ~/.muttrc, which I’ll outline here, and it requires [...]

Hashcash and Mutt

Introduction I wanted to used Hashcash with Mutt, for nothing more than a curiosity to see if it generates any discussion, and to see if people notice. Further, I’m a big crypto advocate, and while Hashcash isn’t exactly crypto, it’s highly related to it, and uses it. Regardless, I wanted to see if I could [...]

Largest Palindromic Number In Python

I found the absolute best way to learn the Python programming language, while at the same time, increasing deductive logic capacity and learning mathematics. The way is through Project Euler. Of course, you don’t have to use the Python language to complete the problems. You can use any language you like, or use pencil and [...]

Prime Numbers In Python

The following program returns True if a number is prime or False otherwise. I am proud of this code, as it implements dead code. Upon the first positive condition in the if statement nested in the while loop, the program terminates, ignoring any further code following. As far as I can tell, this is the [...]

Recursion In Python

I took my Perl script that I wrote some time ago, and rewrote it in Python. The exercise of the initial Perl script, was to get a better handle on the language using recursion, and to inventory my Ogg Vorbis collection of music. The same reasons were used for this Python version. This script traverses [...]

29 And Holding

123456789101112from datetime import date birth_day = date(1977, 6, 9) right_now = date.today() if (right_now.month >= birth_day.month) & (right_now.day >= birth_day.day):     age = right_now.year – birth_day.year else:     age = right_now.year – birth_day.year – 1 if age >= 30:     age = 29

Poll: First Programming Language?

My coworker asked me this question, and began asking a few others in a couple IRC channels. So, I thought I’d extend it to my blog, and the planets that I syndicate. I added as many choices as I could hoping to see a wide array of votes. I added a few newer languages for [...]

Some Spam Karma Automation in Python

Being a WordPress blogger, unfortunately, I have to wade through tons and tons of comment spam. As of current, I have caught 18,119 comment spams since the inception of this blog in September 2005. Thats more than 1,000 spams per month! That’s some serious spam. Problem is, though, that some of it is getting through [...]

Python and the Horrendous Tab Character

This thread was on reddit about a month or so ago, but I didn’t stumble on it until just recently. Basically, the thread talks about the dreaded tab character, and it’s effect on Python code using different editors. I have pasted the items I find most interesting. It’s amazing the philosophy changes that one can [...]

“We’re Going In A New Direction”

Looking back at the archives of this blog, it’s overall theme and vibrancy has changed throughout the months, and honestly, I don’t like where it’s landed. So, this blog is taking a new turn and revisiting it’s roots. The initial reason this blog was put up, back in September 2005, was to provide an archive [...]

Python Fibonacci Sequence

So, in case you were wondering, Pthree stands for Perl, Python and PHP. I know, I know. I haven’t posted hardly anything at all. So I make a feeble attempt at starting now. Everything that I have been doing at work is supposed to be written in Python, but instead, I have been writing everything [...]

Gmail-notify as an Example of the Power of Open Source Software

The example I am about to expense is why Open Source Software (OSS) is so powerful. A friend of mine was reading my blog, and cheking out my Firefox extension list (that I still need to update badly). He noticed that I use the gmail notifier extension for Firefox rather than the gmail-notify package for [...]

Sudoku Mania

My wife and I were in Barnes and Noble last night. Of course, the first place I go is the magazine rack to pick up the latest Linux Format issue, then over to the prgramming section to get a new computer book. I was completely torn between a number of different computer books, but finally [...]