spacepaste

  1.  
  2. import struct
  3. total = 0
  4. with open("/dev/zero") as f:
  5. for _ in xrange(1000):
  6. chunk = f.read(64 * 1024)
  7. if chunk == "":
  8. break
  9. for byte in chunk:
  10. i, = struct.unpack("B", byte)
  11. total += i
  12. total %= 256
  13. print(total)
  14.