May 2009
3 posts
1 tag
I'm 25 Today
“Until a man is twenty-five, he still thinks, every so often, that under the right circumstances he could be the baddest motherfucker in the world. If I moved to a martial-arts monastery in China and studied real hard for ten years. If my family was wiped out by Colombian drug dealers and I swore myself to revenge. If I got a fatal disease, had one year to live, devoted it to wiping out street...
May 16th
2 tags
See Which Twitterers Don’t Follow You Back In Less...
UPDATED (1/8/10): See Which Twitterers Don’t Follow You Back (updated) All right, so I totally stole this from See Which Twitterers Don’t Follow You Back In Less Than 15 Lines of Ruby. Basically, if you have some bizarre desire to see who doesn’t reciprocate your follows on Twitter, or you just like to feel unpopular, I have the script for you. I have no idea what practical application...
May 14th
1 tag
Sorting a List of Dictionaries in Python
Sorting a list of dictionaries by the values of some key is something that comes up pretty frequently for me. Basically, you have a list of dictionaries that you want sorted by some particular key. So if we have [{'name': 'Bert', 'age':24}, {'name': 'Adam', 'age': 27}, {'name': 'Claire', 'age': 25}] and we wanted to sort by age, we would get [{'name': 'Bert', 'age':24}, {'name': 'Claire',...
May 13th