annotate bin/rainwords @ 3916:46e2ffcf006b

<Bike> echo \'rm bin/slist\' >> bin/slist # There.
author HackBot
date Fri, 18 Oct 2013 03:03:08 +0000
parents ad9096aff22a
children 19cbf3f316f0
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
3914
ad9096aff22a <Jafet> sed -i -e \'s/str(.*)\\])/"%02d"%r[(i+s)%len(r)]/\' bin/rainwords && ? firefly | rainwords
HackBot
parents: 2418
diff changeset
2 import random; w=[l.split() for l in open("/dev/stdin").read().split("\n")]; r=[4,7,8,9,2,13,6]; 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)