Returns ADC with right scopes.
338162
def _GetApplicationDefaultCredentials(
        client_info, skip_application_default_credentials=False,
        **unused_kwds):
    """"""
    scopes = client_info['scope'].split()
    if skip_application_default_credentials:
        return None
    gc = oauth2client.client.GoogleCredentials
    with cache_file_lock:
        try:
            # pylint: disable=protected-access
            # We've already done our own check for GAE/GCE
            # credentials, we don't want to pay for checking again.
            credentials = gc._implicit_credentials_from_files()
        except oauth2client.client.ApplicationDefaultCredentialsError:
            return None
    # If we got back a non-service account credential, we need to use
    # a heuristic to decide whether or not the application default
    # credential will work for us. We assume that if we're requesting
    # cloud-platform, our scopes are a subset of cloud scopes, and the
    # ADC will work.
    cp = 'https://www.googleapis.com/auth/cloud-platform'
    if credentials is None:
        return None
    if not isinstance(credentials, gc) or cp in scopes:
        return credentials.create_scoped(scopes)
    return None
934162
function (done) {
      user.authorizedScope(function (err, scopes) {
        if (err) { return done(err) }
        done(null, scopes)
      })
    }
1111281
def in_scope(self, scope: str):
        
        old_scope = self.resolution_scope
        self.resolution_scope = urlparse.urljoin(old_scope, scope)
        try:
            yield
        finally:
            self.resolution_scope = old_scope
307608
function getCurrentScope(statementType) {
            let currentScope;

            if (statementType === "var") {
                currentScope = functionStack[functionStack.length - 1];
            } else if (statementType === "let") {
                currentScope = blockStack[blockStack.length - 1].let;
            } else if (statementType === "const") {
                currentScope = blockStack[blockStack.length - 1].const;
            }
            return currentScope;
        }
383205
def _metric_when_multiplied_with_sig_vec(self, sig):
        
        return dot((self.B * self.D**-1.).T * sig, self.B * self.D)
1049698
def _at_return(self, calculator, rule, scope, block):
        
        # TODO should assert this only happens within a @function
        ret = calculator.calculate(block.argument)
        raise SassReturn(ret)
1009482
def calc_scope(client, user, requested_scope)
    possible_scope = ids_to_names(client[user ? :scope : :authorities])
    requested_scope = Util.arglist(requested_scope) || []
    return unless (requested_scope - possible_scope).empty?
    requested_scope = possible_scope if requested_scope.empty?
    granted_scopes = user ? (ids_to_names(user[:groups]) & requested_scope) : requested_scope # handle auto-deny
    Util.strlist(granted_scopes) unless granted_scopes.empty?
  end
817536
def sX(qubit: Qubit, coefficient: complex = 1.0) -> Pauli:
    """"""
    return Pauli.sigma(qubit, 'X', coefficient)
248872
def getfeedscope(self, geocodes):
        """"""
        states = self._get_states_from_samecodes(geocodes)
        if len(states) >= 2:
            return 'US'
        else:
            return states[0]
202988
def _compensate_temperature(self, adc_t):
        
        var_1 = ((adc_t / 16384.0 - self._calibration_t[0] / 1024.0)
                 * self._calibration_t[1])
        var_2 = ((adc_t / 131072.0 - self._calibration_t[0] / 8192.0)
                 * (adc_t / 131072.0 - self._calibration_t[0] / 8192.0)
                 * self._calibration_t[2])
        self._temp_fine = var_1 + var_2
        if self._delta_temp != 0.:  # temperature correction for self heating
            temp = self._temp_fine / 5120.0 + self._delta_temp
            self._temp_fine = temp * 5120.0
        else:
            temp = self._temp_fine / 5120.0
        return temp
1193916
def scope(cls, f):
        """"""
        if not hasattr(cls, "scopes"):
            cls.scopes = copy(STANDARD_SCOPES)

        cls.scopes.append(f)

        def create_builder(self, *args, **kwargs):
            bldr = ScopeBuilder(cls, cls.scopes)
            return getattr(bldr, f.__name__)(*args, **kwargs)

        setattr(cls, f.__name__, classmethod(create_builder))
        return f
174554
def getTopRight(self):
        
        return (float(self.get_cx()) + float(self.get_rx()), float(self.get_cy()) + float(self.get_ry()))
496056
private ScopeBlock findSynchronizedScopeBlock(ScopeBlock sb, int monitorEnterPC) {

        ScopeBlock monitorBlock = sb;

        if (sb.hasChildren()) {
            for (ScopeBlock child : sb.getChildren()) {
                if (child.isSync() && (child.getStart() > monitorBlock.getStart())) {
                    monitorBlock = child;
                    monitorBlock = findSynchronizedScopeBlock(monitorBlock, monitorEnterPC);
                }
            }
        }

        return monitorBlock;
    }
1104351
def default_scopes(self, scopes):
        """"""
        validate_scopes(scopes)
        self._default_scopes = " ".join(set(scopes)) if scopes else ""
1297460
private void sawIINC(int pc) {
        int reg = getRegisterOperand();
        if (!ignoreRegs.get(reg)) {
            ScopeBlock sb = findScopeBlock(rootScopeBlock, pc);
            if (sb != null) {
                sb.addLoad(reg, pc);
            } else {
                ignoreRegs.set(reg);
            }
        }
        if (catchHandlers.get(pc)) {
            ignoreRegs.set(reg);
        } else if (!monitorSyncPCs.isEmpty()) {
            ignoreRegs.set(reg);
        } else if (sawNull) {
            ignoreRegs.set(reg);
        }

        if (!ignoreRegs.get(reg)) {
            ScopeBlock sb = findScopeBlock(rootScopeBlock, pc);
            if (sb != null) {
                sb.addStore(reg, pc, null);
                if (sawDup) {
                    sb.addLoad(reg, pc);
                }
            } else {
                ignoreRegs.set(reg);
            }
        }
    }
183164
@Override
	public FieldDescriptor findOperandInScope(String scope, String operand)
    {
        ObjectDescriptor currentScope = m_classes.get(scope);
        StringTokenizer st = new StringTokenizer(operand,".");
        FieldDescriptor ret = null;
        while(st.hasMoreTokens())
        {
            if (currentScope == null)
            {
                return null;
            }
            String token = st.nextToken();
            ret = currentScope.get(token);
            if (ret == null)
            {
                if (currentScope.getParent() != null)
                {
                    return findOperandInScope(currentScope.getParent(),operand);
                }
                return null;
            }
            currentScope = m_classes.get(ret.getType());
        }
        return ret;
    }
251953
def get_scopes(self, vpnid='.*'):
        """"""
        request_url = self._build_url(['Scope'], vpn=vpnid)
        return self._do_request('GET', request_url)