def filter(self):
        start_time = datetime.now()
        if self.FILTERED_EXTENSIONS_PATH:
            self.get_filtered_extensions_to_list()
        if self.FILTERED_RESOURCES_PATH:
            self.get_filtered_files_to_dict()

        if self.type == "in":
            self.select_files()
        elif self.type == "out":
            self.reject_files()
        else:
            self.logger.error("Filtering: no action type = " + self.type)
        end_time = datetime.now()

        minutes_and_seconds = divmod((end_time-start_time).total_seconds(), 60)
        self.logger.info("Filtering: process finished after " + str(minutes_and_seconds[0])
                     + " minutes and " + str(round(minutes_and_seconds[1], 1)) + " secs")
dataset/ETHPy150Open SOM-Research/Gitana/filter.py/Filter.filter/original