Write the blacklist.
9817
def write_blacklist (self):
        
        oldmask = os.umask(0077)
        for key, value in self.blacklist.items():
            self.write(u"%d %s%s" % (value, repr(key), os.linesep))
        self.close_fileoutput()
        # restore umask
        os.umask(oldmask)
896554
function isBlacklisted(moduleId)
{
  var i;

  // strip basePath
  moduleId = moduleId.replace(this.basePathRegexp, '');

  for (i = 0; i < this.blackList.length; i++)
  {
    if (minimatch(moduleId, this.blackList[i]))
    {
      return true;
    }
  }

  return false;
}
310709
def filter_factory(global_conf, **local_conf):
    """"""
    conf = global_conf.copy()
    conf.update(local_conf)

    def blacklist(app):
        return BlacklistFilter(app, conf)
    return blacklist
10663
public function setBlacklist($blacklist)
    {
        if (is_array($blacklist)) {
            $this->blacklist = array_map('strval', $blacklist);
        } elseif ($blacklist instanceof \ArrayObject && true) {
            $this->blacklist = array_map('strval', $blacklist->getArrayCopy());
        } elseif (is_string($blacklist)) {
            $this->blacklist = [];
            for ($i = 0; $i < strlen($blacklist); $i++) {
                $this->blacklist[] = $blacklist[$i];
            }
        } else {
            throw new \Exception('Incorrect blacklist given. Allowed blacklist are: string, array or ArrayObject.');
        }
    }
674994
def _process_blacklist(self, blacklist):
        

        # Assume blacklist is correct format since it is checked by PluginLoader

        blacklist_cache = {}
        blacklist_cache_old = self._cache.get('blacklist', {})

        for entry in blacklist:

            blackkey = (entry.version, entry.operator)

            if blackkey in blacklist_cache:
                continue
            elif blackkey in blacklist_cache_old:
                blacklist_cache[blackkey] = blacklist_cache_old[blackkey]
            else:
                entry_cache = blacklist_cache[blackkey] = set()
                blackversion = parse_version(entry.version or '0')
                blackop = OPERATORS[entry.operator]

                for key in self:
                    if blackop(parse_version(key), blackversion):
                        entry_cache.add(key)

        self._cache['blacklist'] = blacklist_cache
        return set().union(*blacklist_cache.values())
53475
protected function inBlacklist($filename, array $blacklist)
    {
        foreach ($blacklist as $pattern) {
            if (fnmatch($pattern, $filename, FNM_PATHNAME | FNM_CASEFOLD)) {
                return true;
            }
        }

        return false;
    }
41246
private function bootWithBlacklist()
    {
        $this->serverInstance = new IpBlackList($this->serverInstance);

        foreach (config('ratchet.blackList') as $host) {
            $this->serverInstance->blockAddress($host);
        }
    }
383974
private void putPhoneNumberInBlackList(final String phoneNumber, final Application application ) {
		// if phone number is not already in the bl (it should not append) put the phone number
		// put the phone number in the black list
        if (daoService.isPhoneNumberInBlackList(phoneNumber)) return;
				logger.debug("Adding to black list : \n" + 
					     " - Phone number : " + phoneNumber + "\n" + 
					     " - Application id : " + application.getId() + "\n");
			
			final Date currentDate = new Date(System.currentTimeMillis());
			daoService.addBlacklist(new Blacklist(application, currentDate, phoneNumber));
	}
703031
def run(self, *args):
        
        params = self.parser.parse_args(args)

        entry = params.entry

        if params.add:
            code = self.add(entry)
        elif params.delete:
            code = self.delete(entry)
        else:
            term = entry
            code = self.blacklist(term)

        return code
1126455
def _remove_blacklisted(self, directories):
        
        directories = util.to_absolute_paths(directories)
        directories = util.remove_from_set(directories,
                                           self.blacklisted_directories)

        return directories
1275808
public function blackList($index, $limit, $lastSequence = 0)
    {
        $request = new ListBlackRequest($this->identifier, $index, $limit, $lastSequence);
        $response = new BaseResponse();
        return $this->client->sendRequest($request, $response);
    }
1031160
public function fire()
	{
        $expiredBlacklistedTokens = $this->Blacklist->findAllExpired();
        $expiredBlacklistedTokensCount = count($expiredBlacklistedTokens);

        if ($expiredBlacklistedTokensCount > 0)
        {
            $this->Blacklist->deleteAllExpired();

            // The number of expired blacklisted tokens should now be 0
            $expiredBlacklistedTokensCountCheck = count($this->Blacklist->findAllExpired());

            if ($expiredBlacklistedTokensCountCheck === 0)
            {
                Log::info('Successfully deleted ' . $expiredBlacklistedTokensCount . ' expired blacklisted authentication tokens');
            }
            else {
                Log::warning('Something went wrong deleting expired blacklisted authentication tokens, ' . $expiredBlacklistedTokensCount . ' should have been removed, ' . $expiredBlacklistedTokensCountCheck . ' still remain.');
            }
        }

        Log::info('No blacklisted blacklisted authentication tokens needed cleaning up as none had deleted expired');
	}
1093898
def _container_blacklist(self):
        """"""
        if self.__container_blacklist is None:
            self.__container_blacklist = \
                set(self.CLOUD_BROWSER_CONTAINER_BLACKLIST or [])
        return self.__container_blacklist
1180586
public function getBlacklist()
    {
        if (isset($this->raw->blacklist)) {
            $blacklist = (array) $this->raw->blacklist;

            array_walk(
                $blacklist,
                function (&$file) {
                    $file = Path::canonical($file);
                }
            );

            return $blacklist;
        }

        return array();
    }
456211
public void setBlacklistReport(java.util.Map<String, java.util.List<BlacklistEntry>> blacklistReport) {
        this.blacklistReport = blacklistReport;
    }
533920
def do_blacklist(config, config_dir):
    
    if not os.path.exists(config_dir):
        print "Configuration '{}' does not exist.".format(config)
        exit(1)    

    editor = os.environ["EDITOR"]

    config_blacklist = os.path.join(config_dir, 'blacklist')
    call([editor, config_blacklist])
    print "Blacklist configuration has been updated."
120576
def redactor(blacklist: Dict[Pattern, str]) -> Callable[[str], str]:
    """"""
    def processor_wrapper(msg: str) -> str:
        for regex, repl in blacklist.items():
            if repl is None:
                repl = '<redacted>'
            msg = regex.sub(repl, msg)
        return msg
    return processor_wrapper