9ea53fa7a5c1a3594a5a5019e299a34f38290851,tensorflow_datasets/core/download/kaggle.py,KaggleCompetitionDownloader,download_competition,#KaggleCompetitionDownloader#Any#Any#,119

Before Change


               output_dir]
    _run_kaggle_command(command, self._competition_name)
    downloads = tf.io.gfile.listdir(output_dir)
    if len(downloads) != 1:
      zipper = zipfile.ZipFile(os.path.join(output_dir, "zipped.zip"))
      for download in downloads:
        zipper.write(os.path.join(output_dir, download))
      zipper.close()
    return output_dir


def _run_kaggle_command(command_args, competition_name):

After Change


      if zipfile.is_zipfile(fpath):
        ext = extractor.get_extractor()
        with ext.tqdm():
          ext.extract(fpath, resource.ExtractMethod.ZIP, output_dir).get()
    return output_dir

Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: tensorflow/datasets
Commit Name: 9ea53fa7a5c1a3594a5a5019e299a34f38290851
Time: 2020-06-26
Author: sharanramjee@gmail.com
File Name: tensorflow_datasets/core/download/kaggle.py
Class Name: KaggleCompetitionDownloader
Method Name: download_competition


Project Name: sony/nnabla
Commit Name: dd0ee4e2e8c9bd08d1f4300ce6d92d798beaa1b1
Time: 2020-06-22
Author: 46014028+TE-ShiyuYang@users.noreply.github.com
File Name: python/src/nnabla/utils/load.py
Class Name:
Method Name: load


Project Name: austin-taylor/flare
Commit Name: 9cc8397cee3dcc24d1697cb45378eddc660cc8e1
Time: 2019-10-21
Author: jdpberba@gmail.com
File Name: flare/data_science/features.py
Class Name:
Method Name: domain_tld_extract