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

Before Change


            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] != "/":
        repo_url = repo_url + "/"

After Change


             path=temp_zip_file_path, overwrite=True)
    with zipfile.ZipFile(temp_zip_file_path) as zf:
        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)
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: catalyst-team/catalyst
Commit Name: 94ddd35eb6ff120a2b8631977b339a442fed2745
Time: 2019-08-22
Author: tez.romach@gmail.com
File Name: catalyst/dl/scripts/trace.py
Class Name:
Method Name: main