def0dfbfbc6f840484a10cc4e963cfa8686ded69,torchnlp/utils.py,,download_urls,#Any#Any#Any#,154

Before Change


    if check_file is not None and os.path.isfile(os.path.join(directory, check_file)):
        return

    if not os.path.isdir(directory):
        os.makedirs(directory)

    for url in urls:
        filename = get_filename_from_url(url)
        full_path = os.path.join(directory, filename)
        with tqdm(unit="B", unit_scale=True, miniters=1, desc=filename) as t:

After Change


    Returns:
        None:
    
    check_file = None if check_file is None else os.path.join(directory, check_file)
    if check_file is None or not os.path.isfile(check_file):
        for file_url in file_urls:
            compressed_filename = download(file_url, directory)
            maybe_extract(compressed_filename, directory)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: PetrochukM/PyTorch-NLP
Commit Name: def0dfbfbc6f840484a10cc4e963cfa8686ded69
Time: 2018-04-01
Author: petrochukm@gmail.com
File Name: torchnlp/utils.py
Class Name:
Method Name: download_urls


Project Name: tensorlayer/tensorlayer
Commit Name: 35b2c4917344f338eda67c78673cf4064b3b4265
Time: 2020-02-07
Author: 34995488+Tokarev-TT-33@users.noreply.github.com
File Name: examples/reinforcement_learning/tutorial_DQN_variants.py
Class Name:
Method Name:


Project Name: ray-project/ray
Commit Name: 254b1ec370a07bbd7d60c502ce3b38f4c1fef567
Time: 2020-04-29
Author: mehrdadn@users.noreply.github.com
File Name: python/setup.py
Class Name: build_ext
Method Name: move_file