def check_sum(file):
    from hashlib import sha256
    try:
        f = open(file,'r')
        bytes = f.read(-1)
    except __HOLE__:
        bytes = ''
    chk_sum = sha256(bytes)
    return chk_sum.hexdigest()[:32]  # truncation needed, see gh-3216
dataset/ETHPy150Open scipy/scipy/scipy/weave/platform_info.py/check_sum