Category Archives: Python

Why R doesn't suck

I first encountered the R programming language a few years ago when I needed to make some plots. Although I’ve used it occasionally since, I always considered it a sort of “Perl for statisticians” — a useful swiss-army knife with … Continue reading

Posted in Data Mining, Haskell, Math, Programming, Python, R, Ruby | 1 Comment

Python Debugging with Decorators

I’ve written a little python function which I have found to be very helpful for debugging. It takes a function, and returns a function which is identical to the original except that it prints a message to the console with … Continue reading

Posted in Python | Leave a comment

SimpleDiff in Python

A while ago I posted a PHP implementation of a diff algorithm I came up with1. Since it was well received, and it’s a useful little algorithm to have, I created a Python version as well. There are a few … Continue reading

Posted in Python | Leave a comment

Tail recursion in Python

After spending a lot of time in Scheme, it’s hard not to think in recursion from time to time. When I recently started to improve my Python skills, I missed having Scheme optimize my tail recursive calls. For example, consider … Continue reading

Posted in Python | 16 Comments

Garden Path Sentences

I recently came across an interesting post on the Powerset Blog recently about garden path sentences. Garden path sentences are sentences that lead you down the wrong path through a string of words with multiple meanings. For example, The complex … Continue reading

Posted in Python, Ruby | Leave a comment