annotate bin/rainwords @ 4285:5c5fc08f8113

<oerjan> sed -i \'2s!s/!s/no\\+dl/nooodl/;s/!\' bin/?
author HackBot
date Tue, 14 Jan 2014 00:55:13 +0000
parents 19cbf3f316f0
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2418
f2f65a1fa363 <elliott> revert 2416
HackBot
parents: 2417
diff changeset
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)