def __init__(self, jail): Filter.__init__(self, jail) self.__modified = False self.__lastModTime = dict() self.__file404Cnt = dict() logSys.info("Created FilterPoll")
def __init__(self, **options): Filter.__init__(self, **options) self.predicates = self.predicates or self.build_predicate_list() if len(self.predicates) == 0: raise NotImplementedError("Must provide at least one predicate") self.normalize_predicates() self.normalize_counted_features() self.setup_counts()
def __init__(self): Filter.__init__(self) self._name = "Outlier" self._input = None self._dimensions = None self._output = None # cutoff: we compare the neighborhood average to the current datum; if the # datum is in the 95th (or higher) percentile, it is considered an outlier. self.set_parameter_floatrange("cutoff", 0.95, 0.0, 1.0) # if the averaging out is inclusive of the datum in question self.set_parameter("inclusive", False, bool)
def __init__(self): Filter.__init__(self) self._name = "Outlier" self._input = None self._dimensions = None self._output = None # cutoff: we compare the neighborhood average to the current datum; if the # datum is in the 95th (or higher) percentile, it is considered an outlier. self.set_parameter_floatrange("cutoff", 0.95, 0.0,1.0) # if the averaging out is inclusive of the datum in question self.set_parameter("inclusive", False, bool)
def __init__(self, lemmas=None, fields=['lemma'], word_limit=None, predicate=None): ''' lemmas : None | iterable Only count lemmas that are in this list. If None, count all lemmas. fields : iterable Field combination to count. By default count lemmas; e.g. fields=['lemma', 'pos'] will count noun and verb occurrences of the same lemma separately. word_limit : None | int Stop after this number of words have been processed. predicate : None | callable If not None, lemmas are only counted if this function return True (when passed the whole word). E.g., `lambda x: x['pos'] == 'noun'` would only count nouns. ''' Filter.__init__(self) self.lemmas = None if lemmas is None else list(lemmas) self.counter = collections.Counter() self.word_limit = word_limit self.predicate = predicate self.total_word_count = 0 self.sentence_count = 0 self.fields = list(fields)
def __init__(self, jail): Filter.__init__(self, jail) self.__modified = False self.monitor = gamin.WatchMonitor() logSys.info("Created FilterGamin")
def __init__(self, *args): Rule.__init__(self, *args) Filter.__init__(self, *args) self.triggered = False
def __init__(self, suffixes): """ :type suffixes: list """ Filter.__init__(self) self.suffixes = suffixes
def __init__(self, interesting_verbs, max_tokens=2000, **options): Filter.__init__(self, **options) self.dict = {} self.counters = {} self.max_tokens = max_tokens self.interesting_verbs = interesting_verbs