Backup to gmail

Some time ago, I wrote a script to grab your bookmarks, grab the corresponding web page, and email them to your gmail account. Once there, you have the full text of your searchable bookmarks. It was the most popular script at my old site, but I had yet to repost to this new site.

Cherry Blossom

I used to use Pyblosxom to run my blog. Its extreme simplicity, ease of setup, and large number of plugins was appealing to me. However, it's a CGI app, which means it's slow, and it doesn't give you any help with cookies, forms, authentication, etc, etc.

Thus, I set out to write a blog server inspired by Pyblosxom, but which used a modern framework. Thus was born Cherry Blossom, the code which currently runs this site. Since I was a developer on Pyblosxom, I can tell you that it has an extremely similar design, modified in places where I thought it could use updating. It should parse Pyblosxom blog entries without any changes.

Python Unfold

After I analyzed some Haskell code to generate roman numerals that I saw on reddit and really liked, I explored the same problem in python. To do so, I wrote an iterative unfold for python, which, to my knowledge, had not been done before.

Reverse File Iterator

I couldn't easily find a code snippet for iterating backwards over a file in python, so I wrote one, and learned a bit about optimization on the way.

Reportlab PDF Calendar Generator

The title's pretty self-explanatory. The code's described further here.

ELO Ranking Generator

I wrote some code to generate an ELO ranking for each of the teams in my ultimate frisbee summer league. It's described in further detail here.

The Redecorator

I was pissed off when Guido added decorators to Python. I thought they were unnecessary syntactic sugar which were starting us on the road to Perl-like TMTOWTDI. My stance has softened a bit since (I use the @expose decorator in Cherry Blossom, but I still am very hesitant to use other decorators), but at the time I was furious.

In response, I wrote my most controversial piece of code ever, The redecorator. It simply parses a python file and turns all decorators into the equivalent assignment statement after the end of the method. Utterly useless, but it was a fun state machine to write.

There were a lot of comments on it at the time - I responded to them here.

MySQL Partial Dump

I wrote a simple utility script to dump out a limited number of rows from a mysql database, which I used to set up the test environment at my current job.

Solving the Star Problem

When I saw a goofy programming problem on reddit, I just had to solve it.

Converting Sourcesafe to Subversion

I convinced my company to convert to subversion from sourcesafe, and by doing so I volunteered to do the conversion. I found an excellent program that helped me do the conversion, but required a bit more cleanup once it was done. So I wrote a quickie script.

Illinois Number

In 2005, Illinois only lost one regular season basketball game. Somebody pointed out that the worst team in basketball had beaten them, transitively, through 7 teams. I wanted to know if every team had "beaten" illinois in the same way that year, so I found out.


A while ago, I wrote an article about a simple perceptron; what it was, how it worked, and a simple implementation. Though the links in that article are dead, the code is available here.

Personal Code

Most code not significant enough to fit in any of these categories can be found at the trac I've set up for my personal code. The only reason you'd want to look in there is that it's fun to ogle other people's code. Remember also that some of that code is old - don't judge me on it unless you like it.

Oct 30, 2006