Skip to content
Create a gist now

Instantly share code, notes, and snippets.

import time
import random
bitrow = ["0"]*43
bits = [bitrow[:] for __ in range(10)]
# ^ Using [:] for copying the list, otherwise each row would be refering to the same list
delay = 0.425 # <- in seconds
def bitsprint(bits):
print "\n"*50
for row in bits:
print ''.join(row)
def randomize_bits(bits):
for rowindex, row in enumerate(bits):
for bitindex, __ in enumerate(row):
bits[rowindex][bitindex] = random.choice(["0","1"])
for i in range(32):
bits[4][22] = str(i%2)
for i in range(23):
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.