Search for a matching provider for a key.
174212
private <T> Provider<T> lookupProvider(Key<T> key)
  {
    BindingInject<T> bean = findBean(key);

    if (bean != null) {
      return bean.provider();
    }

    BindingAmp<T> binding = findBinding(key);

    if (binding != null) {
      return binding.provider();
    }

    binding = findObjectBinding(key);

    if (binding != null) {
      return binding.provider(InjectionPoint.of(key));
    }


    return null;
  }
882054
def _lookup_vultrid(which_key, availkey, keyname):
    '''
    
    '''
    if DETAILS == {}:
        _cache_provider_details()

    which_key = six.text_type(which_key)
    try:
        return DETAILS[availkey][which_key][keyname]
    except KeyError:
        return False
712083
def has_key(self, key):
        """"""
        k = self._lowerOrReturn(key)
        return k in self.data
1240428
def get_provider(self, provider):
        """"""
        if self.provider is not None:
            return self.provider
        return providers.by_id(provider)
1345769
def get(key, default=-1):
        """"""
        if isinstance(key, int):
            return Routing(key)
        if key not in Routing._member_map_:
            extend_enum(Routing, key, default)
        return Routing[key]
744068
def get(self, key, default=None):
        """"""

        return self._data.get(key, compat_builtins.__dict__.get(key, default))
1068772
def key(self, direction, mechanism, purviews=False, _prefix=None):
        """"""
        return (_prefix, direction, mechanism, purviews)
690984
def get(self, identifier):
        """"""
        for provider in self._providers:
            if provider.identifier == identifier:
                return provider
        return None
746878
def lookup(source, keys, fallback = None):
  """"""
  try:
    for key in keys:
      source = source[key]
    return source
  except (KeyError, AttributeError, TypeError):
    return fallback
902133
def Search(self,key):
		

		results = []
		for alert in self.alerts:
			if alert.id.lower().find(key.lower()) != -1:  results.append(alert)
			elif alert.name.lower().find(key.lower()) != -1:  results.append(alert)

		return(results)
423016
def match_keys(inp, p=False):
    """"""
    _keys = []
    ssh_keys = DO.get_ssh_keys()
    for k in inp.split(","):
        done = False
        if k.isdigit():
            for _ in [s for s in ssh_keys if s["id"] == int(k)]:
                done = True
                _keys.append(_["fingerprint"])
        else:
            for _ in [s for s in ssh_keys if s["fingerprint"] == k]:
                done = True
                _keys.append(_["fingerprint"])
        if p and not done:
            print("Could not find a match for '{}', skipping".format(k), file=sys.stderr)
    return _keys
832076
def where(self, key, value):
        
        return self.filter(lambda item: data_get(item, key) == value)
1113490
def get(self, key):
        
        try:
            return self[self.id_lookup.get(key)]

        except TypeError:
            raise KeyError
803911
def simple_filter(self, key, value):
        ""
        searched = {key: value}
        return set([k for k, v in self.data.items() if
                    intersect(searched, v) == searched])
1155599
def get_from_human_key(self, key):
        """"""
        if key in self._identifier_map:
            return self._identifier_map[key]
        raise KeyError(key)
553979
def get_key(key_name, region=None, key=None, keyid=None, profile=None):
    '''
    
    '''
    conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)

    try:
        key = conn.get_key_pair(key_name)
        log.debug("the key to return is : %s", key)
        if key is None:
            return False
        return key.name, key.fingerprint
    except boto.exception.BotoServerError as e:
        log.debug(e)
        return False
815915
function (key, func) {
				if (needs[key]) {
					provide(nucleus, key, func);
				} else if (!providers[key]) {
					providers[key] = func;
				}
				return me;
			}