All pastes #944621 Raw Edit

Miscellany

public text v1 · immutable
·published 2008-03-16 07:45 UTC
rendered paste body
import sys

data = """\
255 254 56 3 129 255 224
255 254 56 3 129 255 224
255 254 56 3 129 255 224
0 112 56 3 142 0 224
0 112 56 3 142 0 224
0 112 56 3 14
28 0 56 31 128 0 224
255 254 7 227 129 255 0
255 254 7 227 129 255 0
255 254 7 227 129 255 0"""

for l in data.split("\n"):
    for n in l.split():
        n = int(n)
        for i in range(8):
            p = 1<<(7-i)
            if n & p: sys.stdout.write("#")
            else: sys.stdout.write(" ")
    sys.stdout.write("\n"); sys.stdout.flush()

# Output:
###############   ###         ###      ############     
###############   ###         ###      ############     
###############   ###         ###      ############     
         ###      ###         ###   ###         ###     
         ###      ###         ###   ###         ###     
         ###      ###         ###   ###         ###     
      ###         ###         ###      ################ 
      ###         ###         ###      ################ 
      ###         ###         ###      ################ 
   ###            ###      ######               ###     
   ###            ###      ######               ###     
   ###            ###      ######               ###     
###############      ######   ###      #########        
###############      ######   ###      #########        
###############      ######   ###      #########