April 2008
5 posts
Shell-like data processing in Python →
“This module introduces an alternative syntax a-la shell pipes for sequence-oriented functions, such as filter, map, etc., via certain classes that override __ror__ method.”
Debian Bug #477454 →
My favorite part of this whole episode is the final analysis offered by Leif Walsh:
I am not aware of the reason why Mr. Droge should be consuming buckets of phalli, and, even if it is appropriate for him to do so, I don’t
believe that personal attacks, in general, are a good programming
paradigm, for any project. They seem to more degrade the attacker
than the target.
This must be why GPL...
2 tags
Take Google Gears Documentation Offline
I’m about to get on a plane and thought it would be quite fitting to play around with Google Gears while I’m airborne. I know I’ll need to consult the API reference often, so I just wanted to download the whole thing and view it offline. Here’s how you can download the Google Gears documentation for offline viewing:
wget -r -np -k -c...
4 tags
Monty Hall paradox: see for yourself
The Monty Hall paradox/problem goes something like this:
Suppose you’re on a game show, and you’re given the choice of three doors: Behind one door is a car; behind the others, goats. You pick a door, say No. 1, and the host, who knows what’s behind the doors, opens another door, say No. 3, which has a goat. He then says to you, “Do you want to pick door No. 2?” Is...
2 tags
Truth tables in Python
I was playing around with these problems and I came across one about building truth tables for arbitrary logic statements. So I decided to write the tool that I wish I had when I was taking symbolic logic. The code isn’t particularly clean, but I especially like how the fixed_table implementation came out with generators. (Thanks to this blog post for pointing me towards 99...