ef133382c5ac2c1b5704b113c25c5cbf4786a7ce,models.py,,attempt_download,#Any#,437

Before Change



        if os.path.getsize(weights) < 5E6:  // weights < 5MB (too small), download failed
            os.remove(weights)  // delete corrupted weightsfile
        assert os.path.exists(weights), msg  // download missing weights from Google Drive

After Change


            r = os.system("curl -f " + url + " -o " + weights)

    // Error check
    if not (r == 0 and os.path.exists(weights) and os.path.getsize(weights) > 1E6):  // weights exist and > 1MB
        os.system("rm " + weights)  // remove partial downloads
        raise Exception(msg)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 5

Instances


Project Name: ultralytics/yolov3
Commit Name: ef133382c5ac2c1b5704b113c25c5cbf4786a7ce
Time: 2019-12-06
Author: glenn.jocher@ultralytics.com
File Name: models.py
Class Name:
Method Name: attempt_download


Project Name: mozilla/bugbug
Commit Name: fc31172b84f4e74ddc409d04d2bcc87f3f329cdb
Time: 2019-08-05
Author: chidauri@gmail.com
File Name: scripts/bug_classifier.py
Class Name:
Method Name: classify_bugs


Project Name: adobe/NLP-Cube
Commit Name: e7f917e699e1ae92ed5342ca2a2318cf23cd691f
Time: 2019-01-11
Author: dumitrescu.stefan@gmail.com
File Name: cube/io_utils/model_store.py
Class Name: ModelMetadata
Method Name: read


Project Name: ilastik/ilastik
Commit Name: 3b5c3b497fb3f006a10ff21d11300d494f6375e2
Time: 2012-08-07
Author: bergs@janelia.hhmi.org
File Name: ilastik/applets/dataSelection/dataSelectionSerializer.py
Class Name: DataSelectionSerializer
Method Name: _deserializeFromHdf5