Get value from provider as requested by note.
964601
def handle_provider(self, provider_factory, note):
        """"""
        # Implementation in separate method to support accurate book-keeping.
        basenote, name = self.parse_note(note)

        # _handle_provider could be even shorter if
        # Injector.apply() worked with classes, issue #9.
        if basenote not in self.instances:
            if (isinstance(provider_factory, type) and
                    self.has_annotations(provider_factory.__init__)):
                args, kwargs = self.prepare_callable(provider_factory.__init__)
                self.instances[basenote] = provider_factory(*args, **kwargs)

            else:
                self.instances[basenote] = self.apply_regardless(
                        provider_factory)

            provider = self.instances[basenote]
            if hasattr(provider, 'close'):
                self.finalizers.append(self.instances[basenote].close)

        provider = self.instances[basenote]
        get = self.partial_regardless(provider.get)

        try:
            if name is not None:
                return get(name=name)
            self.values[basenote] = get()
            return self.values[basenote]

        except UnsetError:
            # Use sys.exc_info to support both Python 2 and Python 3.
            exc_type, exc_value, tb = sys.exc_info()
            exc_msg = str(exc_value)
            if exc_msg:
                msg = '{}: {!r}'.format(exc_msg, note)
            else:
                msg = repr(note)
            six.reraise(exc_type, exc_type(msg, note=note), tb)
62750
def get_value(self, name):
        """"""
        ns = self._get_current_namespace()
        value = ns[name]
        try:
            self.send_spyder_msg('data', data=value)
        except:
            # * There is no need to inform users about
            #   these errors.
            # * value = None makes Spyder to ignore
            #   petitions to display a value
            self.send_spyder_msg('data', data=None)
        self._do_publish_pdb_state = False
597046
def retrieve(self, request, project, pk=None):
        
        try:
            serializer = JobNoteSerializer(JobNote.objects.get(id=pk))
            return Response(serializer.data)
        except JobNote.DoesNotExist:
            return Response("No note with id: {0}".format(pk), status=HTTP_404_NOT_FOUND)
690984
def get(self, identifier):
        """"""
        for provider in self._providers:
            if provider.identifier == identifier:
                return provider
        return None
848653
public String getNotes()
   {
      String notes = (String) getCachedValue(AssignmentField.NOTES);
      return (notes == null ? "" : notes);
   }
754185
def get_prep_value(self, value):
        '''
        '''
        if isinstance(value, JSON.JsonDict):
            return json.dumps(value, cls=JSON.Encoder)
        if isinstance(value, JSON.JsonList):
            return value.json_string
        if isinstance(value, JSON.JsonString):
            return json.dumps(value)
        return value
665944
def notes_get(id)
      options = create_params({})
      note = self.class.get("/notes/#{id}", options)['note']

      return nil unless note

      # Complete hack, because the API is still broken
      content = '__content__'
      Note.new({
        id:      note['id'],
        # Remove whitespace around the title,
        # because of missing xml tag around
        title:   note[content].gsub(/\n|  +/, ''),
        length:  note['length'][content].to_i,
        text:    note['text'][content]
      })
    end
318386
def get_note(self, noteid):

        

        if self.standard_grant_type is not "authorization_code":
            raise DeviantartError("Authentication through Authorization Code (Grant Type) is required in order to connect to this endpoint.")

        response = self._req('/notes/{}'.format(noteid))

        return response
1073882
def get_prep_value(self, value):
        """"""
        try:
            return json.dumps(value, cls=DjangoJSONEncoder)
        except Exception as e:
            raise ValidationError(str(e))
592715
def get_value_from_session(key):
    
    def value_from_session_function(service, message):
        """Actual implementation of get_value_from_session function.

        :param service: SelenolService object.
        :param message: SelenolMessage request.
        """
        return _get_value(message.session, key)
    return value_from_session_function
361985
def send_note(self, to, subject="", body="", noetid=""):

        

        if self.standard_grant_type is not "authorization_code":
            raise DeviantartError("Authentication through Authorization Code (Grant Type) is required in order to connect to this endpoint.")

        response = self._req('/notes/send', post_data={
            'to[]' : to,
            'subject' : subject,
            'body' : body,
            'noetid' : noetid
        })

        sent_notes = []

        for item in response['results']:
            n = {}
            n['success'] = item['success']
            n['user'] = User()
            n['user'].from_dict(item['user'])

            sent_notes.append(n)

        return sent_notes
764084
def update_delivery_note(self, delivery_note_id, delivery_note_dict):
        
        return self._create_put_request(
            resource=DELIVERY_NOTES,
            billomat_id=delivery_note_id,
            send_data=delivery_note_dict
        )
855568
def _get_value(self, evt):
        """"""
        if evt.err:
            e = evt.errors[0]
            return "[%s] %s" % (e.reason, e.desc)

        if isinstance(evt, EventData):
            return "[%s] %s" % (
                evt.attr_value.quality, str(evt.attr_value.value))
        elif isinstance(evt, AttrConfEventData):
            cfg = evt.attr_conf
            return "label='%s'; unit='%s'" % (cfg.label, cfg.unit)
        elif isinstance(evt, DataReadyEventData):
            return ""
        elif isinstance(evt, PipeEventData):
            return evt.pipe_value
        elif isinstance(evt, DevIntrChangeEventData):
            print("utils::_get_value()")
            return
775442
def get_and_save_value(self, name, default=None):
        """"""
        if getattr(self, name, None):
            return getattr(self, name)

        value = self.get_session_value(name, default)
        value = self.request.POST.get(name, value)
        self.save_value(name, value)
        return value
14204
def _get_value(self, entity):
    """"""
    value = self._get_user_value(entity)
    if value is None and entity._projection:
      # Invoke super _get_value() to raise the proper exception.
      return super(StructuredProperty, self)._get_value(entity)
    return value
238175
public Note get(long id)
	{
		SingleElementHandler<Note> noteHandler = new SingleElementHandler<>();
		try
		{
			osm.makeAuthenticatedRequest(NOTES + "/" + id, null, new NotesParser(noteHandler));
		}
		catch (OsmNotFoundException e)
		{
			return null;
		}
		return noteHandler.get();
	}
476091
def _get_price(self, package):
        """"""

        for price in package['prices']:
            if not price.get('locationGroupId'):
                return price['id']

        raise SoftLayer.SoftLayerError("Could not find valid price")