Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
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)
bitsprint(bits)
time.sleep(delay)
for i in range(23):
randomize_bits(bits)
bitsprint(bits)
time.sleep(delay)
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.