19a39999ccdb247f01909c2848b381d391ef621b,ISR/predict/predictor.py,Predictor,__init__,#Predictor#Any#Any#Any#,32

Before Change


        if not verbose:
            self.logger.setLevel(40)
        self.extensions = (".jpeg", ".jpg", ".png")  // file extensions that are admitted
        self.img_ls = [file for file in file_ls if file.endswith(self.extensions)]
        if len(self.img_ls) < 1:
            self.logger.error("No valid image files found (check config file).")
            raise ValueError("No valid image files found (check config file).")

After Change



    def __init__(self, input_dir, output_dir="./data/output", verbose=True):

        self.input_dir = Path(input_dir)
        self.data_name = self.input_dir.name
        self.output_dir = Path(output_dir) / self.data_name
        self.logger = get_logger(__name__)
        if not verbose:
            self.logger.setLevel(40)
        self.extensions = (".jpeg", ".jpg", ".png")  // file extensions that are admitted
        self.img_ls = [f for f in self.input_dir.iterdir() if f.suffix in self.extensions]
        if len(self.img_ls) < 1:
            self.logger.error("No valid image files found (check config file).")
            raise ValueError("No valid image files found (check config file).")
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: idealo/image-super-resolution
Commit Name: 19a39999ccdb247f01909c2848b381d391ef621b
Time: 2019-04-02
Author: testadicardi@gmail.com
File Name: ISR/predict/predictor.py
Class Name: Predictor
Method Name: __init__


Project Name: hyperspy/hyperspy
Commit Name: 629167ee324a0b955ef46cd5a0cd7bb504ef8c44
Time: 2020-09-09
Author: tjof2@cam.ac.uk
File Name: hyperspy/tests/drawing/test_plot_signal1d.py
Class Name:
Method Name: _generate_filename_list


Project Name: pytorch/benchmark
Commit Name: 5f1f52b07ff387bef8daf6ea1b378548de9ccab4
Time: 2020-09-14
Author: zdevito@fb.com
File Name: torchbenchmark/models/tacotron2/utils.py
Class Name:
Method Name: load_filepaths_and_text