Ignore some providers in the preview
507728
function (providerName) {
		if (providerName === 'ignored') {
			return true;
		}
		// reduce the number of layers previewed for some providers
		if (providerName.startsWith('HERE') || providerName.startsWith('OpenWeatherMap') || providerName.startsWith('MapBox')) {
			var whitelist = [
				// API threshold almost reached, disabling for now.
				// 'HERE.normalDay',
				'OpenWeatherMap.Clouds',
				'OpenWeatherMap.Pressure',
				'OpenWeatherMap.Wind'
			];
			return whitelist.indexOf(providerName) === -1;
		}
		return false;
	}
102310
def ignore_sphinx():
    """"""
    (directives, roles) = _get_directives_and_roles_from_sphinx()

    directives += [
        'centered',
        'include',
        'deprecated',
        'index',
        'no-code-block',
        'literalinclude',
        'hlist',
        'seealso',
        'toctree',
        'todo',
        'versionadded',
        'versionchanged']

    ext_autosummary = [
        'autosummary',
        'currentmodule',
    ]

    ignore_directives_and_roles(directives + ext_autosummary,
                                roles + ['ctype'])
1217022
protected function skipObjectPart()
    {
        $stream = $this->parser->getStream();
        if ($stream->getCurrent()->test(\Twig_Token::PUNCTUATION_TYPE, '.')) {
            $stream->next();
        }
    }
1019196
function sanitize(options, blacklist) {
  const opts = Object.assign({}, options);
  const defaults = ['apiurl', 'token', 'username', 'password', 'placeholders', 'bearer'];
  const keys = union([], defaults, blacklist);
  return omit(opts, keys);
}
502873
def filter_pypi(self, entry):
        """"""
        for package in self.packages:
            if entry.title.lower().startswith(package):
                return entry
874962
def get_preview_url(resource):
    '''
    
    '''
    candidates = (p.preview_url(resource)
                  for p in get_enabled_plugins()
                  if p.can_preview(resource))
    return next(iter(candidates), None)
95252
def _filter_disabled_regions(contents):
    """"""
    contents = list(contents)

    in_backticks = False
    contents_len = len(contents)

    index = 0
    while index < contents_len:
        character = contents[index]
        if character == "`":
            # Check to see if we should toggle the in_backticks
            # mode here by looking ahead for another two characters.
            if ((index + 2) < contents_len and
                    "".join(contents[index:index + 3]) == "```"):
                in_backticks = not in_backticks
                index += 3
                continue

        if in_backticks:
            contents[index] = " "

        index += 1

    return "".join(contents)
363504
def exclude(self, twig=None, check_visible=True, **kwargs):
        
        return self - self.filter(twig=twig,
                                  check_visible=check_visible,
                                  **kwargs)
653283
def preview_filter_from_query(query, id_field="id", field_map={}):
    """"""
    f = groups_filter_from_query(query, field_map=field_map)
    # NOTE: we don't exclude the excluded ids here so they show up in the editor
    # include these, please
    included_ids = query.get("included_ids")
    if included_ids:
        if f:
            f |= Terms(pk=included_ids)
        else:
            f = Terms(pk=included_ids)
    return f
225411
def remove_priors(self):
        """"""

        for src in self.roi.sources:

            for par in self.like[src.name].funcs["Spectrum"].params.values():
                par.removePrior()
476988
def warn_disabled(scraperclass, reasons):
    """"""
    out.warn(u"Skipping comic %s: %s" % (scraperclass.getName(), ' '.join(reasons.values())))
827821
def filter(self):
        '''
        
        '''

        if self.deprecated_filtering_enabled():
            print('warning: event filtering in sensu-plugin is deprecated,' +
                  'see http://bit.ly/sensu-plugin')
            self.filter_disabled()
            self.filter_silenced()
            self.filter_dependencies()

            if self.deprecated_occurrence_filtering():
                print('warning: occurrence filtering in sensu-plugin is' +
                      'deprecated, see http://bit.ly/sensu-plugin')
                self.filter_repeated()
319557
def hide(self):
        
        if not self.isHidden():
            QWidget.hide(self)
            self._qpart.updateViewport()
895899
def terminate(self):
        """"""
        logger.debug('Terminating initialized providers')
        for name in list(self.initialized_providers):
            del self[name]
778174
def options
      exclude = %w[
        docs
        spec
        vendor
        core.rb
        .js
        templates
        commands
        internal
        support
        Dockerfile
        Dockerfile.base
        Gemfile
        Gemfile.lock
        Guardfile
        LICENSE
        Procfile
        Rakefile
        bin
      ]
      exclude = exclude.map { |word| ['-x', word] }.flatten
      ["-m", "README.md", "--markup", "tomdoc"] + exclude
    end
320989
private function cleanUpExpiredPreviews() {
        $expiredPreviews=KapostObject::get()->filter('IsKapostPreview', true)->filter('LastEdited:LessThan', date('Y-m-d H:i:s', strtotime('-'.(KapostService::config()->preview_data_expiry).' minutes')));
        if($expiredPreviews->count()>0) {
            foreach($expiredPreviews as $kapostObj) {
                $kapostObj->delete();
            }
        }
    }
881141
function (data, options) {
                if (data.audio && !options.disabled) {
                    data.files[data.index][options.name || 'preview'] = data.audio;
                }
                return data;
            }