February 2009
3 posts
Auto-Meme source code →
Filthy secrets revealed! The innards of Auto-Meme are now available for your perusal on GitHub.
For the curious…
Here are some interesting snippets from the code behind Auto-Meme. (It’s all Python.)
# random element from list/tuple/string
randel = lambda x: x[randint(0, len(x)-1)]
patterns = [
( 'im in ur {1}, {2} ur {3}', ('noun','noun1'), 'verb4', 'noun1' ),
( 'how do i {1} {2}?', 'verb2', ('noun', '~web', 'name') ),
( '{1} {2} {3}', 'name', ('~kills', 'verb1'), ('name', '~Dumbledore')...