Weighted random generation in Python (2010) | Hacker News Reader