8bba0fc202e205f30a431e0bd563ea7563224f0e,sounds/models.py,Sound,compute_crc,#Sound#Any#,732
Before Change
data = fp.read(settings.CRC_BUFFER_SIZE)
while len(data) > 0:
crc = zlib.crc32(data, crc)
data = fp.read(settings.CRC_BUFFER_SIZE)
self.crc = "{:0>8x}".format(crc & 0xffffffff) // right aligned with zero-padding, width of 8 chars
if commit:
self.save()
After Change
def compute_crc(self, commit=True):
crc = 0
with open(self.locations("path"), "rb") as fp:
for data in iter(lambda: fp.read(settings.CRC_BUFFER_SIZE), b""):
crc = zlib.crc32(data, crc)
self.crc = "{:0>8x}".format(crc & 0xffffffff) // right aligned with zero-padding, width of 8 chars
if commit:
self.save()
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 5
Instances Project Name: MTG/freesound
Commit Name: 8bba0fc202e205f30a431e0bd563ea7563224f0e
Time: 2018-08-06
Author: phil.tgun@gmail.com
File Name: sounds/models.py
Class Name: Sound
Method Name: compute_crc
Project Name: facebook/FAI-PEP
Commit Name: dd4536dc24af728c326ce6e50854dd43e4a9e034
Time: 2020-04-15
Author: huaminli@fb.com
File Name: benchmarking/download_benchmarks/download_benchmarks.py
Class Name: DownloadBenchmarks
Method Name: downloadFile
Project Name: mathurinm/celer
Commit Name: d0eb3e801f0f5025cd843d5e4f6c95ff5a2fd508
Time: 2018-03-14
Author: alexandre.gramfort@m4x.org
File Name: celer/examples_utils/utils_finance.py
Class Name:
Method Name: decompress_finance
Project Name: nipy/dipy
Commit Name: 429c3f1388c776788a6174deb9b020cce13b5a98
Time: 2013-07-22
Author: Samuel.St-Jean@usherbrooke.ca
File Name: dipy/data/fetcher.py
Class Name:
Method Name: check_md5