def generate_content_hash(self, path, chunk_size=None):
        if not chunk_size:
            chunk_size = File.DEFAULT_CHUNK_SIZE

        sha1 = hashlib.sha1()
        with open(path, 'rb') as f:
            while True:
                chunk = f.read(chunk_size)
                if not chunk:
                    break
                sha1.update(chunk)
        return sha1.hexdigest()
Console entry-point
dataset/ETHPy150Open jbittel/django-multimedia/multimedia/models.py/RemoteStorage.generate_content_hash--crossover with--dataset/ETHPy150Open adamhadani/logtools/logtools/_flattenjson.py/flattenjson_main