I wasn't aware of generator expressions:
wwwlog = open("access-log") bytecolumn = (line.rsplit(None, 1) for line in wwwlog) bytes = (int(x) for x in bytecolumn if x != '-') print "Total", sum(bytes)
Similar to list comprehensions, but evaluated lazily. Voidspace describes it:
None of the generators are consumed until the …
The Chrome download was surprisingly fast (as in, less than 5 seconds). FireFox options import during install didn't work, but it's been smooth sailing since then. It's snappy and so far not buggy. Aesthetics of rendering web pages is good, seems better than FireFox. Quite fast too.
I remember thinking …More
Interesting that Google's Chrome is based on WebKit instead of the Mozilla rendering engine…More
I tried to get into Crockford's Prototypal Inheritance method but I like the plain-old prototype inheritance without the object.create better. It's entirely possible that I'm not quite getting …More
I frequently run into pages with loads of images (here's one via Kedrosky, here's another, and here's yet another). Viewing these images involves a dance of scrolling or hitting space, then scrolling again to get the image lined up in the viewable part of the browser, and repeating over and …More
Several friends have been at work on several startups and are looking for technology leaders to round out their teams. One opportunity is in the social network / eduction space and is looking for the VP Technology / CTO as well as good web/php guys. Another is more hardware related. Both …More
Mike Verdon's Python Twitter Tools is less popular and findable than the Dewitt Clinton's python-twitter (I only found the former from an email on the latter's mailing list), but it's a beautiful library. 125 lines, most of which are comments. It implements the full API by implementing a single call …More
Watching the women's uneven bars. The announcers have spent the vast majority of the time whining and moaning Nastia's the 2nd place finish.
Now I recall earlier gymnastics events where these same announcers said starting first is a huge disadvantage and effectively penalizes the American competitor (pretty sure it was …More
This is just incredible. The effects are amazing, but I'm guessing the models and tools behind what they do are going to fundamentally change the way we use video. Apparently these guys are divining a pretty good depth and color projection map from videos and photographs. With that you've added …More
Excellent article on Simple Top-Down Parsing in Python. The nud and led business could be better explained, but the rest of the article and code is great. I learned several things I hope to employ shortly.
I'm trying to remember if we studied this in compiler class or not. I …More