All pastes #330519 Raw Edit

Miscellany

public text v1 · immutable
#330519 ·published 2007-01-27 23:51 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 142 0 224
3 128 56 3 129 255 254
3 128 56 3 129 255 254
3 128 56 3 129 255 254
28 0 56 31 128 0 224
28 0 56 31 128 0 224
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:
###############   ###         ###      ############     
###############   ###         ###      ############     
###############   ###         ###      ############     
         ###      ###         ###   ###         ###     
         ###      ###         ###   ###         ###     
         ###      ###         ###   ###         ###     
      ###         ###         ###      ################ 
      ###         ###         ###      ################ 
      ###         ###         ###      ################ 
   ###            ###      ######               ###     
   ###            ###      ######               ###     
   ###            ###      ######               ###     
###############      ######   ###      #########        
###############      ######   ###      #########        
###############      ######   ###      #########