filters out the extraction if extracted value is in the blacklist
160088
def filter(self, extractions, case_sensitive=False) -> List[Extraction]:
        """"""
        filtered_extractions = []
        if not isinstance(extractions, list):
            extractions = [extractions]

        for extraction in extractions:
            if case_sensitive:
                try:
                    if extraction.value.lower() not in self.black_list:
                        filtered_extractions.append(extraction)
                except Exception as e:
                    print('Error in BlackListFilter: {} while filtering out extraction: {}'.format(e, extraction.value))
                    # most likely it s a unicode character which is messing things up, return it
                    filtered_extractions.append(extraction)
            else:
                if extraction.value not in self.black_list:
                    filtered_extractions.append(extraction)
        return filtered_extractions
1202506
function filterFunc(inputValue, optionValue) {
  if (inputValue && optionValue) {
    return optionValue.toLowerCase().indexOf(inputValue.toLowerCase()) > -1;
  }

  return false;
}
401135
function omit(req, blacklist) {
    return omitBy(req, (value, key) => blacklist.includes(key));
}
915491
def filter_that(self, criteria, data):
        '''
            
        '''
        import re
        prog = re.compile(criteria)

        return True if prog.match(data) else False
961154
private Set<String> extractAndRemoveUpToLimit(Set<String> source, int limit) {
        Set<String> result = new HashSet<>();
        Iterator<String> iterator = source.iterator();
        while (iterator.hasNext() && result.size() < limit) {
            result.add(iterator.next());
            iterator.remove();
        }
        return result;
    }
703771
def release_filter(self, value):
        """"""
        compiled_pattern = coerce_pattern(value)
        if compiled_pattern.groups > 1:
            raise ValueError(compact("""
                Release filter regular expression pattern is expected to have
                zero or one capture group, but it has {count} instead!
            """, count=compiled_pattern.groups))
        set_property(self, 'release_filter', value)
        set_property(self, 'compiled_filter', compiled_pattern)
1171994
function(collection, blacklist){
        var obj,
            result = [],
            prop,
            i,
            j,
            collLen,
            listLen;

        blacklist = blacklist || ["__columns"];

        if(!collection || !collection.length){
            return result;
        }

        collLen = collection.length;

        for(i=0; i<collLen; i++){
            obj = collection[i];

            //delete null properties
            for(prop in obj){
                if(obj[prop] === null){
                    delete obj[prop];
                }
            }

            listLen = blacklist.length;
            for(j=0; j<listLen; j++){
                delete obj[blacklist[j]];
            }
            //These are javascript objects and not json, so we have to do this magic to strip it of get methods.
            result.push(JSON.parse(JSON.stringify(obj)));
        }

        return result;
    }
1009721
function cleanupFilter(filter) {
  let filterToUse = filter;
  if (
    filterToUse.selectedFilter === "inList" &&
    typeof filterToUse.filterValue === "number"
  ) {
    filterToUse = {
      ...filterToUse,
      filterValue: filterToUse.filterValue.toString()
    };
  }
  if (filterToUse.selectedFilter === "inList") {
    filterToUse = {
      ...filterToUse,
      filterValue: filterToUse.filterValue.replace(/, |,/g, ".")
    };
  }
  return filterToUse;
}
947747
def blacklisted?(page)
      return false if whitelisted?(page)
      FILENAME_BLACKLIST.include?(page.basename.upcase)
    end
1319410
def blacklist(ctx, blacklist_account, account):
    
    account = Account(account, blockchain_instance=ctx.blockchain)
    print_tx(account.blacklist(blacklist_account))
1092307
def blacklist_token():
    
    req = flask.request.get_json(force=True)
    data = guard.extract_jwt_token(req['token'])
    blacklist.add(data['jti'])
    return flask.jsonify(message='token blacklisted ({})'.format(req['token']))
1211988
def extract_bs(self, cutoff, ligcentroid, resis):
        """"""
        return [obres.GetIdx() for obres in resis if self.res_belongs_to_bs(obres, cutoff, ligcentroid)]
189593
def strip_filter(value):
    '''
    

    '''
    if isinstance(value, basestring):
        value = bleach.clean(value, tags=ALLOWED_TAGS,
                             attributes=ALLOWED_ATTRIBUTES, 
                             styles=ALLOWED_STYLES, strip=True)
    return value
710072
def filter(self, table, idps, filter_string):
        """"""
        q = filter_string.lower()
        return [idp for idp in idps
                if q in idp.ud.lower()]
1030105
def filter(self, event):
        
        if not self.resolved:
            return None

        if self.chats is not None:
            # Note: the `event.chat_id` property checks if it's `None` for us
            inside = event.chat_id in self.chats
            if inside == self.blacklist_chats:
                # If this chat matches but it's a blacklist ignore.
                # If it doesn't match but it's a whitelist ignore.
                return None

        if not self.func or self.func(event):
            return event
1006390
def get_blacklist
      params = {
        :method => WebPurify::Constants.methods[:get_blacklist]
      }
      parsed = WebPurify::Request.query(text_request_base, @query_base, params)
      if parsed[:word]
        return [] << parsed[:word]
      else
        return []
      end
    end
836008
def listed(self):
        
        print("\nPackages in the blacklist:\n")
        for black in self.get_black():
            if black:
                print("{0}{1}{2}".format(self.meta.color["GREEN"], black,
                                         self.meta.color["ENDC"]))
                self.quit = True
        if self.quit:
            print("")