Retrieve a pinned object from the object store.
967661
def get_pinned_object(pinned_id):
    """"""

    from ray import ObjectID

    return _from_pinnable(
        ray.get(
            ObjectID(base64.b64decode(pinned_id[len(PINNED_OBJECT_PREFIX):]))))
393909
def is_pinned(self):
        # type: () -> bool
        
        specifiers = self.specifier
        return (len(specifiers) == 1 and
                next(iter(specifiers)).operator in {'==', '==='})
564987
def get(self):
        
        if not hasattr(self, '_instance'):
            raise ImplementationError("Impossible to get the PK of an unbound field")
        if not hasattr(self._instance, '_pk'):
            raise DoesNotExist("The current object doesn't exists anymore")

        if not self._instance._pk:
            self.set(value=None)

        return self.normalize(self._instance._pk)
728526
def get_object(self, id, **args):
        """"""
        return self.request("{0}/{1}".format(self.version, id), args)
396389
def get_referenced_object(self):
        

        if self._BunqMeTab is not None:
            return self._BunqMeTab

        if self._BunqMeTabResultResponse is not None:
            return self._BunqMeTabResultResponse

        if self._BunqMeFundraiserResult is not None:
            return self._BunqMeFundraiserResult

        if self._Card is not None:
            return self._Card

        if self._CardDebit is not None:
            return self._CardDebit

        if self._DraftPayment is not None:
            return self._DraftPayment

        if self._FeatureAnnouncement is not None:
            return self._FeatureAnnouncement

        if self._IdealMerchantTransaction is not None:
            return self._IdealMerchantTransaction

        if self._Invoice is not None:
            return self._Invoice

        if self._ScheduledPayment is not None:
            return self._ScheduledPayment

        if self._ScheduledPaymentBatch is not None:
            return self._ScheduledPaymentBatch

        if self._ScheduledInstance is not None:
            return self._ScheduledInstance

        if self._MasterCardAction is not None:
            return self._MasterCardAction

        if self._BankSwitchServiceNetherlandsIncomingPayment is not None:
            return self._BankSwitchServiceNetherlandsIncomingPayment

        if self._Payment is not None:
            return self._Payment

        if self._PaymentBatch is not None:
            return self._PaymentBatch

        if self._RequestInquiryBatch is not None:
            return self._RequestInquiryBatch

        if self._RequestInquiry is not None:
            return self._RequestInquiry

        if self._RequestResponse is not None:
            return self._RequestResponse

        if self._RewardRecipient is not None:
            return self._RewardRecipient

        if self._RewardSender is not None:
            return self._RewardSender

        if self._ShareInviteBankInquiryBatch is not None:
            return self._ShareInviteBankInquiryBatch

        if self._ShareInviteBankInquiry is not None:
            return self._ShareInviteBankInquiry

        if self._ShareInviteBankResponse is not None:
            return self._ShareInviteBankResponse

        if self._SofortMerchantTransaction is not None:
            return self._SofortMerchantTransaction

        if self._TabResultInquiry is not None:
            return self._TabResultInquiry

        if self._TabResultResponse is not None:
            return self._TabResultResponse

        if self._TransferwiseTransfer is not None:
            return self._TransferwiseTransfer

        raise exception.BunqException(self._ERROR_NULL_FIELDS)
298815
def get_pin(self, _code=None):
        """"""
        description = (
            'Use the numeric keypad to describe number positions.\n'
            'The layout is:\n'
            '    7 8 9\n'
            '    4 5 6\n'
            '    1 2 3')
        return interact(
            title='{} PIN'.format(self.device_name),
            prompt='PIN:',
            description=description,
            binary=self.pin_entry_binary,
            options=self.options_getter())
664013
def get_object(self, queryset=None):
        
        if queryset is None:
            queryset = self.get_queryset()

        # Take a GET parameter instead of URLConf variable.
        try:
            pk = long(self.request.GET[self.pk_url_kwarg])
        except (KeyError, ValueError):
            raise Http404("Invalid Parameters")
        queryset = queryset.filter(pk=pk)

        try:
            # Get the single item from the filtered queryset
            obj = queryset.get()
        except ObjectDoesNotExist as e:
            raise Http404(e)
        return obj
788654
public synchronized CachedObject get(int pos) {

        if (accessCount == Integer.MAX_VALUE) {
            resetAccessCount();
        }

        int lookup = getLookup(pos);

        if (lookup == -1) {
            return null;
        }

        accessTable[lookup] = accessCount++;

        return (CachedObject) objectValueTable[lookup];
    }
458238
void pin() {
		while (true) {
			int refCnt = pendingReferences.get();

			if (refCnt >= 0) {
				if (pendingReferences.compareAndSet(refCnt, refCnt + subpartitions.length)) {
					break;
				}
			}
			else {
				throw new IllegalStateException("Released.");
			}
		}
	}
833310
def fetch_object(self, doc_id):
        """"""
        try:
            return self.object_class.objects.get(pk=doc_id)
        except self.object_class.DoesNotExist:
            raise ReferenceNotFoundError
1136232
def _getCachedValue(obj, relicFunc, resultType):
    
    # If the value has not been previously cached, fetch 
    if not obj.cached:
        obj.cached = resultType()
        relicFunc(byref(obj.cached))
    return obj.cached
516702
def get_device(self, pin=None):
        
        url = self.base_url + '/device'
        try:
            r = requests.get(url, params={'pin': pin}, timeout=10)
            return r.json()
        except RequestException as err:
            raise Client.ClientError(err)
675441
def get_object(pid_type, pid_value):
    """"""
    from .models import PersistentIdentifier

    obj = PersistentIdentifier.get(pid_type, pid_value)
    if obj.has_object():
        click.echo('{0.object_type} {0.object_uuid} {0.status}'.format(obj))
919025
def get(cls, id=None, condition=None, fields=None, cache=False, engine_name=None, **kwargs):
        
        
        if id is None and condition is None:
            return None
        
        can_cacheable = (cache or getattr(cls, '__cacheable__', None)) and \
            isinstance(id, (int, long, str, unicode))
        if can_cacheable:
            #send 'get_object' topic to get cached object
            obj = dispatch.get(cls, 'get_object', id)
            if obj:
                return obj

        if condition is not None:
            _cond = condition
        else:
            if is_condition(id):
                _cond = id
            else:
                _cond = cls.c[cls._primary_field] == id
            #todo
            # if isinstance(id, (int, long)):
            #     _cond = cls.c.id==id
            # elif isinstance(id, (str, unicode)) and id.isdigit():
            #     _cond = cls.c.id==int(id)
            # else:
            #     _cond = id

        #if there is no cached object, then just fetch from database
        obj = cls.filter(_cond, **kwargs).fields(*(fields or [])).one()
        
        if obj and cache or getattr(cls, '__cacheable__', None):
            dispatch.call(cls, 'set_object', instance=obj)

        return obj
1265306
def read_object(ctx, pin, object_id):
    

    controller = ctx.obj['controller']

    def do_read_object(retry=True):
        try:
            click.echo(controller.get_data(object_id))
        except APDUError as e:
            if e.sw == SW.NOT_FOUND:
                ctx.fail('No data found.')
            elif e.sw == SW.SECURITY_CONDITION_NOT_SATISFIED:
                _verify_pin(ctx, controller, pin)
                do_read_object(retry=False)
            else:
                raise

    do_read_object()
653840
def get_handler(ptr, method):
    
    obj = CACHE.get(ptr, None)
    if obj is None:
        raise BridgeReferenceError(
            "Reference id={} never existed or has already been destroyed"
            .format(ptr))
    elif not hasattr(obj, method):
        raise NotImplementedError("{}.{} is not implemented.".format(obj,
                                                                     method))
    return obj, getattr(obj, method)
1089632
private Object extractObjectToStore(Object obj)
    {
        Object result = obj;
        // only do something if obj != null
        if(result != null)
        {
            // ProxyObjects only have to be updated if their real
            // subjects have been loaded
            result = getProxyFactory().getRealObjectIfMaterialized(obj);
            // null for unmaterialized Proxy
            if (result == null)
            {
                if(logger.isDebugEnabled())
                    logger.debug("No materialized object could be found -> nothing to store," +
                            " object was " + ObjectUtils.identityToString(obj));
            }
        }
        return result;
    }