29c957249fbdd4d5f7f517772835b7dc31a85e94,src/gluonnlp/data/utils.py,,_load_pretrained_vocab,#Any#Any#Any#,285

Before Change


    else:
        print("Vocab file is not found. Downloading.")

    if not os.path.exists(root):
        try:
            os.makedirs(root)
        except OSError as e:
            if e.errno == errno.EEXIST and os.path.isdir(root):
                pass
            else:
                raise e

    prefix = str(time.time())
    zip_file_path = os.path.join(root, prefix + file_name + ".zip")
    repo_url = _get_repo_url()
    if repo_url[-1] != "/":

After Change


        if not os.path.exists(file_path):
            utils.mkdir(temp_root)
            zf.extractall(temp_root)
            os.replace(temp_file_path, file_path)
            shutil.rmtree(temp_root)

    if check_sha1(file_path, sha1_hash):
        return _load_vocab_file(file_path, cls)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: dmlc/gluon-nlp
Commit Name: 29c957249fbdd4d5f7f517772835b7dc31a85e94
Time: 2020-01-15
Author: linhaibin.eric@gmail.com
File Name: src/gluonnlp/data/utils.py
Class Name:
Method Name: _load_pretrained_vocab


Project Name: interactiveaudiolab/nussl
Commit Name: 5cdb40f9328d44aa88f14cff8c3b341069346121
Time: 2019-08-06
Author: prem@u.northwestern.edu
File Name: nussl/deep/train/trainer.py
Class Name: Trainer
Method Name: save


Project Name: konstantint/PassportEye
Commit Name: 929c186c4dfa80a1ac975b5f2b95002ca12889d0
Time: 2020-11-28
Author: kt@ut.ee
File Name: passporteye/mrz/scripts.py
Class Name:
Method Name: mrz