5a29571bdeb6deaffa8ed1e7b404566bc7b62505,niftynet/utilities/filename_matching.py,KeywordsMatching,from_tuple,#Any#Any#,23

Before Change


        """
        path, contain, not_contain = [], [], []
        for (name, value) in input_tuple:
            if not isinstance(value, string_types):
                continue
            if len(value) <= 1 or value == """":
                continue
            if name == "path_to_search":
                value = value.split(",")
                for path_i in value:
                    path_i = os.path.abspath(path_i.strip())
                    if os.path.exists(path_i):
                        path.append(path_i)
                    else:
                        raise ValueError("data input folder {} not found, did"
                                         " you maybe forget to download data?"
                                         .format(path_i))
            elif name == "filename_contains":
                value = value.split(",")
                for val in value:
                    contain.append(val.strip())
            elif name == "filename_not_contains":
                value = value.split(",")

After Change


        :param input_tuple:
        :return:
        """
        path, contain, not_contain = [], (), ()
        for (name, value) in input_tuple:
            if not value:
                continue
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: NifTK/NiftyNet
Commit Name: 5a29571bdeb6deaffa8ed1e7b404566bc7b62505
Time: 2017-08-19
Author: wenqi.li@ucl.ac.uk
File Name: niftynet/utilities/filename_matching.py
Class Name: KeywordsMatching
Method Name: from_tuple


Project Name: tsurumeso/waifu2x-chainer
Commit Name: 77c16db8bf8cbc0548e37b5b5622644c8e243e8b
Time: 2018-02-24
Author: tsurumeso@gmail.com
File Name: waifu2x.py
Class Name:
Method Name: upscale_image


Project Name: tsurumeso/waifu2x-chainer
Commit Name: 77c16db8bf8cbc0548e37b5b5622644c8e243e8b
Time: 2018-02-24
Author: tsurumeso@gmail.com
File Name: waifu2x.py
Class Name:
Method Name: denoise_image