def chunk_hashes(data):
    chunk = 1024*1024
    chunk_count = int(math.ceil(len(data)/float(chunk)))
    return [hashlib.sha256(data[i*chunk:(i+1)*chunk]).digest() for i in range(chunk_count)]
Takes a list (block) or string (statement) and flattens it into a string
dataset/ETHPy150Open uskudnik/amazon-glacier-cmd-interface/glacier/glaciercorecalls.py/chunk_hashes--crossover with--dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/django-extensions-1.5.0/django_extensions/management/commands/dumpscript.py/flatten_blocks