Mercurial > repo
annotate bin/rainwords @ 4225:4c30f3005bab
<oerjan> addquote <Taneb> Well, get him <Phantom_Hoover> her! <Taneb> Well, get her <Taneb> Hang on <Taneb> Since when is Liam Neeson a "her"/ <Phantom_Hoover> oh i thought you meant my dad\'s godmother
author | HackBot |
---|---|
date | Wed, 25 Dec 2013 13:31:15 +0000 |
parents | 19cbf3f316f0 |
children |
rev | line source |
---|---|
2418 | 1 #!/usr/bin/python |
3946
19cbf3f316f0
<ais523_> sed --in-place \'s/13,6/6,13/\' bin/rainwords
HackBot
parents:
3914
diff
changeset
|
2 import random; w=[l.split() for l in open("/dev/stdin").read().split("\n")]; r=[4,7,8,9,2,6,13]; print "\n".join((lambda s: " ".join(chr(3) + "%02d"%r[(i+s)%len(r)] + l[i] for i in range(len(l))))(random.randrange(0, len(r))) for l in w) |