Last active
January 18, 2021 07:05
-
-
Save paulproteus/016cd4ce5321119fbf81 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def to_n_and_s(i): | |
x = bin(i) | |
assert x.startswith('0b') | |
x = x[2:] | |
x = x.replace('1', 'n\\n') | |
x = x.replace('0', 's\\n') | |
x += 'c\\n' | |
return x | |
PREFIX = 'snns' | |
for i in xrange(100000): | |
out = to_n_and_s(i) | |
out = '\\n'.join(PREFIX) + '\\n' + out |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for input in `python gen.py` ; do echo $input | python manage.py test ; echo " ----------------------- " ; echo " USED: $input " ; echo " -------------------- " ; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment