Skip to content

Instantly share code, notes, and snippets.

@swt02026
Created November 13, 2018 03:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save swt02026/da3a59331c13f606bcbe8b086f50c019 to your computer and use it in GitHub Desktop.
Save swt02026/da3a59331c13f606bcbe8b086f50c019 to your computer and use it in GitHub Desktop.
ins=open('instructions.txt').read().split('.')
b=list(map(len, ins[:-1]))
print b[0]
b.sort()
bits = (1296-len(b))*bytearray('0')
for i in b:
bits.insert(1296-i, '1')
import binascii
print binascii.unhexlify(hex(int(str(bits),2))[2:-1])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment