def sha1(fileOrPath, block_size=2**20):

    if type(fileOrPath) is str:
        fileOrPath = open(fileOrPath, "rb")

    sha1res = hashlib.sha1()
    while True:
        data = fileOrPath.read(block_size)
        if not data:
            break
        sha1res.update(data)

    return sha1res.hexdigest()
Plotting function of GeneralizationAcrossTime object
dataset/ETHPy150Open zynga/jasy/jasy/core/File.py/sha1--crossover with--dataset/ETHPy150Open mne-tools/mne-python/mne/decoding/time_gen.py/GeneralizationAcrossTime.plot_times