Retrieve the current value of a zone variable.  If the variable is
        not found in the local cache then the value is requested from the
        controller.
974811
def get_zone_variable(self, zone_id, variable):
        

        try:
            return self._retrieve_cached_zone_variable(zone_id, variable)
        except UncachedVariable:
            return (yield from self._send_cmd("GET %s.%s" % (
                zone_id.device_str(), variable)))
1112258
def get(self, key):
    '''
    '''
    value = self.cache_datastore.get(key)
    return value if value is not None else self.child_datastore.get(key)
651473
def get(self, request, pzone_pk):
        """"""

        # attempt to get given pzone
        try:
            pzone = PZone.objects.get(pk=pzone_pk)
        except PZone.DoesNotExist:
            raise Http404("Cannot find given pzone.")

        # bulid filters
        filters = {"pzone": pzone}

        if "from" in request.GET:
            parsed = dateparse.parse_datetime(request.GET["from"])
            if parsed is not None:
                filters["when__gte"] = parsed

        if "to" in request.GET:
            parsed = dateparse.parse_datetime(request.GET["to"])
            if parsed is not None:
                filters["when__lt"] = parsed

        # get operations and serialize them
        operations = PZoneOperation.objects.filter(**filters)

        # return a json response with serialized operations
        return Response(self.serialize_operations(operations), content_type="application/json")
1003977
def get(self, key, no_cache=False):
        
        section, name = self.parse_lookup(key)
        preference = self.registry.get(
            section=section, name=name, fallback=False)
        if no_cache or not preferences_settings.ENABLE_CACHE:
            return self.get_db_pref(section=section, name=name).value

        try:
            return self.from_cache(section, name)
        except CachedValueNotFound:
            pass

        db_pref = self.get_db_pref(section=section, name=name)
        self.to_cache(db_pref)
        return db_pref.value
809894
public int getZoneNAry(int zoneId, int nodeId, byte[] key) {
        if(cluster.getNodeById(nodeId).getZoneId() != zoneId) {
            throw new VoldemortException("Node " + nodeId + " is not in zone " + zoneId
                                         + "! The node is in zone "
                                         + cluster.getNodeById(nodeId).getZoneId());
        }

        List<Node> replicatingNodes = this.routingStrategy.routeRequest(key);
        int zoneNAry = -1;
        for(Node node: replicatingNodes) {
            // bump up the replica number once you encounter a node in the given
            // zone
            if(node.getZoneId() == zoneId) {
                zoneNAry++;
            }
            // we are done when we find the given node
            if(node.getId() == nodeId) {
                return zoneNAry;
            }
        }
        if(zoneNAry > -1) {
            throw new VoldemortException("Node " + nodeId + " not a replica for the key "
                                         + ByteUtils.toHexString(key) + " in given zone " + zoneId);
        } else {
            throw new VoldemortException("Could not find any replicas for the key "
                                         + ByteUtils.toHexString(key) + " in given zone " + zoneId);
        }
    }
87360
def _get_cached_values(instance, translated_model, language_code, use_fallback=False):
    
    if not appsettings.PARLER_ENABLE_CACHING or not instance.pk or instance._state.adding:
        return None

    key = get_translation_cache_key(translated_model, instance.pk, language_code)
    values = cache.get(key)
    if not values:
        return None

    # Check for a stored fallback marker
    if values.get('__FALLBACK__', False):
        # Internal trick, already set the fallback marker, so no query will be performed.
        instance._translations_cache[translated_model][language_code] = MISSING

        # Allow to return the fallback language instead.
        if use_fallback:
            lang_dict = get_language_settings(language_code)
            # iterate over list of fallback languages, which should be already
            # in proper order
            for fallback_lang in lang_dict['fallbacks']:
                if fallback_lang != language_code:
                    return _get_cached_values(
                        instance, translated_model, fallback_lang,
                        use_fallback=False
                    )
        return None

    values['master'] = instance
    values['language_code'] = language_code
    return values
135728
public Object getVariableValue(String namespaceURI, String prefix, String localName) throws UnresolvableException {
        if (this.request.hasAttribute(localName)) {
            return String.valueOf(this.request.getAttribute(localName));
        }
        
        return null;
    }
1198897
def zone_position(self):
		
		if self.zone == Zone.HAND:
			return self.controller.hand.index(self) + 1
		return 0
739037
def reload_localzone():
    """"""
    global _cache_tz
    _cache_tz = pytz.timezone(get_localzone_name())
    utils.assert_tz_offset(_cache_tz)
    return _cache_tz
893064
def get_zone(self, id=None, name=None):
        
        log.info("Picking zone: %s (%s)" % (name, id))
        return self.zones[id or name]
95907
def get_zone(self, zone_id, records=True):
        
        mask = None
        if records:
            mask = 'resourceRecords'
        return self.service.getObject(id=zone_id, mask=mask)
517691
def update(self, callback=None, errback=None, **kwargs):
        
        if not self.data:
            raise ZoneException('zone not loaded')

        def success(result, *args):
            self.data = result
            if callback:
                return callback(self)
            else:
                return self

        return self._rest.update(self.zone, callback=success, errback=errback,
                                 **kwargs)
854299
def get_record(self, zone_name, record_id):
        
        return self._client.get(
            '/domain/zone/{}/record/{}'.format(zone_name, record_id))
896947
public int getNodeIdForZoneNary(int zoneId, int zoneNary, byte[] key) {
        List<Node> replicatingNodes = this.routingStrategy.routeRequest(key);
        int zoneNAry = -1;
        for(Node node: replicatingNodes) {
            // bump up the counter if we encounter a replica in the given zone;
            // return current node if counter now matches requested
            if(node.getZoneId() == zoneId) {
                zoneNAry++;

                if(zoneNAry == zoneNary) {
                    return node.getId();
                }
            }
        }
        if(zoneNAry == -1) {
            throw new VoldemortException("Could not find any replicas for the key "
                                         + ByteUtils.toHexString(key) + " in given zone " + zoneId);
        } else {
            throw new VoldemortException("Could not find " + (zoneNary + 1)
                                         + " replicas for the key " + ByteUtils.toHexString(key)
                                         + " in given zone " + zoneId + ". Only found "
                                         + (zoneNAry + 1));
        }
    }
784541
def search_local(name)
      if variable = variables[name]
        return variable.nested_reference
      end

      if variable = search_scopes(name)
        variables[name] = variable
        return variable.nested_reference
      end
    end
138480
def get_local_variable_from_name(self, variable_name):
        
        return next((v for v in self.variables if v.name == variable_name), None)
1010041
function getStatus(localHash: string, cacheHash: ?string): string {
  if (!cacheHash) {
    return LocalStatus.New;
  }

  return localHash === cacheHash
    ? LocalStatus.Unchanged
    : LocalStatus.Changed;
}