Mercurial > repo
changeset 3914:ad9096aff22a
<Jafet> sed -i -e \'s/str(.*)\\])/"%02d"%r[(i+s)%len(r)]/\' bin/rainwords && ? firefly | rainwords
author | HackBot |
---|---|
date | Thu, 17 Oct 2013 10:20:20 +0000 |
parents | fcfc15863c88 |
children | e652e01bea32 |
files | bin/rainwords |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/bin/rainwords Wed Oct 16 19:31:36 2013 +0000 +++ b/bin/rainwords Thu Oct 17 10:20:20 2013 +0000 @@ -1,2 +1,2 @@ #!/usr/bin/python -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) + str(r[(i+s)%len(r)]) + l[i] for i in range(len(l))))(random.randrange(0, len(r))) for l in w) +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)