cityscape
This is the code that accompanies a long series of blog posts about writing a night-time programmatically generated cityscape. That's probably a better place to start, if you're interested: http://blog.parm.net/?cat=42
(the original posts link to a Bazaar repo that's no longer there; hopefully the revision numbers should still correspond, though)