retrieves the registry for one scope
968272
protected Map<String, Object> getReplacedAttributes(int scope) {
        if (replacedAttributes == null) {
            replacedAttributes = new ArrayList<>();
        }
        while (replacedAttributes.size() <= scope) {
            replacedAttributes.add(new HashMap<String, Object>());
        }
        return replacedAttributes.get(scope);
    }
1081003
def get_auth_scope(cls, instance_config):
        
        auth_scope = instance_config.get('auth_scope')
        if not auth_scope:
            return None

        if not auth_scope.get('project'):
            raise IncompleteAuthScope()

        if auth_scope['project'].get('name'):
            # We need to add a domain scope to avoid name clashes. Search for one. If not raise IncompleteAuthScope
            if not auth_scope['project'].get('domain', {}).get('id'):
                raise IncompleteAuthScope()
        else:
            # Assume a unique project id has been given
            if not auth_scope['project'].get('id'):
                raise IncompleteAuthScope()

        return auth_scope
897544
def _get_from_registry(self):
        
        from ._windows import reg_keys
        for location in reg_keys:
            location = location.replace('\\', '/')
            jreKey = "/proc/registry/HKEY_LOCAL_MACHINE/{}".format(location)
            try:
                with open(jreKey + "/CurrentVersion") as f:
                    cv = f.read().split('\x00')
                versionKey = jreKey + "/" + cv[0]

                with open(versionKey + "/RunTimeLib") as f:
                    cv = f.read().split('\x00')

                return cv[0]

            except OSError:
                pass
        return None
886315
private Cache getScopeCache(String scope) throws InvalidScopeException {
        Cache scopeCache = scopeManager.getCache(scope);
        if (scopeCache == null) {
            throw new InvalidScopeException("The scope " + scope + " doesn't exist");
        } else {
            return scopeCache;
        }
    }
529178
def scopes(cls):
        
        # Why do we need this? This should either
        # * Be bubbled to the places where it is used (AcidXBlock).
        # * Be automatic. Look for all members of a type.
        return [cls.USAGE, cls.DEFINITION, cls.TYPE, cls.ALL]
251953
def get_scopes(self, vpnid='.*'):
        """"""
        request_url = self._build_url(['Scope'], vpn=vpnid)
        return self._do_request('GET', request_url)
1080650
public static Collection<IAction> getRegisteredActions(ActionScope scope) {
        Map<String, IAction> actions = new HashMap<>();
        
        if (scope == ActionScope.BOTH || scope == ActionScope.GLOBAL) {
            actions.putAll(getRegistry(true).map);
        }
        
        if (scope == ActionScope.BOTH || scope == ActionScope.LOCAL) {
            actions.putAll(getRegistry(false).map);
        }
        
        return actions.values();
    }
1298875
def get(self, name: str):
        
        dep = None
        try:
            dep = self._registry[name]
        except KeyError:
            raise DependencyNotFoundError(name) from None
        value = self.cached(dep)
        if value is None:
            value = dep.factory()
            self.cache(dep, value)
        return value
270474
def get_registry(registry_prefix)
      response = rest_get('/redfish/v1/Registries/')
      registries = response_handler(response)['Items']
      registry = registries.select { |reg| reg['Schema'].start_with?(registry_prefix) }
      info = []
      registry.each do |reg|
        response = rest_get(reg['Location'][0]['Uri']['extref'])
        registry_store = response_handler(response)
        info.push(registry_store)
      end
      info
    end
998024
private boolean fetchRegistry() {
        boolean success;
        Stopwatch tracer = fetchRegistryTimer.start();

        try {
            // If the delta is disabled or if it is the first time, get all applications
            if (serverConfig.shouldDisableDeltaForRemoteRegions()
                    || (getApplications() == null)
                    || (getApplications().getRegisteredApplications().size() == 0)) {
                logger.info("Disable delta property : {}", serverConfig.shouldDisableDeltaForRemoteRegions());
                logger.info("Application is null : {}", getApplications() == null);
                logger.info("Registered Applications size is zero : {}", getApplications().getRegisteredApplications().isEmpty());
                success = storeFullRegistry();
            } else {
                success = fetchAndStoreDelta();
            }
            logTotalInstances();
        } catch (Throwable e) {
            logger.error("Unable to fetch registry information from the remote registry {}", this.remoteRegionURL, e);
            return false;
        } finally {
            if (tracer != null) {
                tracer.stop();
            }
        }
        return success;
    }
830098
def _find_adapter(registry, ob):
    """"""
    types = _always_object(inspect.getmro(getattr(ob, '__class__', type(ob))))
    for t in types:
        if t in registry:
            return registry[t]
1101930
def get_scopes_information(self):
        
        scopes = StandardScopeClaims.get_scopes_info(self.params['scope'])
        if settings.get('OIDC_EXTRA_SCOPE_CLAIMS'):
            scopes_extra = settings.get(
                'OIDC_EXTRA_SCOPE_CLAIMS', import_str=True).get_scopes_info(self.params['scope'])
            for index_extra, scope_extra in enumerate(scopes_extra):
                for index, scope in enumerate(scopes[:]):
                    if scope_extra['scope'] == scope['scope']:
                        del scopes[index]
        else:
            scopes_extra = []

        return scopes + scopes_extra
793848
def get_scope_path(self, scope_separator="::"):
        
        if self.parent_scope is None:
            return ""
        elif isinstance(self.parent_scope, Root):
            return ""
        else:
            parent_path = self.parent_scope.get_scope_path(scope_separator)
            if parent_path:
                return(
                    parent_path
                    + scope_separator
                    + self.parent_scope.type_name
                )
            else:
                return self.parent_scope.type_name
349860
def _get_code_w_scope(data, position, obj_end, opts):
    """"""
    code, position = _get_string(data, position + 4, obj_end, opts)
    scope, position = _get_object(data, position, obj_end, opts)
    return Code(code, scope), position
288256
function getScope(identifier) {
            for (let currentNode = identifier; currentNode; currentNode = currentNode.parent) {
                const scope = sourceCode.scopeManager.acquire(currentNode, true);

                if (scope) {
                    return scope;
                }
            }
            return null;
        }
286915
def scope(self, key):
        '''
        '''
        if self.name is None:
            return key
        return '{:s}/{:s}'.format(self.name, key)
987127
def _get_registry_names(self, registry):
        
        return ', '.join(
            f.__name__ if not isinstance(f, tuple) else f[0].__name__
            for f in getattr(self, registry, []))