view bin/colorize @ 2266:4767030cee0e

<elliott> addquote <ais523> Phantom_Hoover: my department teaches prolog, to second years I think <ais523> some people choose it because it isn\'t ocaml, and then are disappointed to find it has lists
author HackBot
date Tue, 26 Feb 2013 18:41:42 +0000
parents 2bcf4dad0ca9
children 16603a34c6d2
line wrap: on
line source

#!/bin/sh
python -c "import random; w=raw_input(); p=list('x'*len(w)+'C'*int((341-len(w))/3+1)); random.shuffle(p); i=(c for c in w); print ''.join(i.next() if c=='x' else chr(3)+'%02d' % random.randrange(2,15) for c in ['C']+p)"