Returns the current user by executing "whoami".

		@param note:     See send()

		@return: the output of "whoami"
		@rtype: string
350196
def whoami(self,
	           note=None,
	           loglevel=logging.DEBUG):
		
		shutit = self.shutit
		shutit.handle_note(note)
		res = self.send_and_get_output(' command whoami',
		                               echo=False,
		                               loglevel=loglevel).strip()
		if res == '':
			res = self.send_and_get_output(' command id -u -n',
			                               echo=False,
			                               loglevel=loglevel).strip()
		shutit.handle_note_after(note=note)
		return res
1181039
def note_versions(self, updater_id=None, post_id=None, note_id=None):
        
        params = {
            'search[updater_id]': updater_id,
            'search[post_id]': post_id,
            'search[note_id]': note_id
            }
        return self._get('note_versions.json', params)
1077276
def get_current_user(custom_headers:nil)
      response = get_current_user_async(custom_headers:custom_headers).value!
      response.body unless response.nil?
    end
1244100
def get_current_user(self):
        
        from google.appengine.api import users

        if _IS_DEVELOPMENT_SERVER:
            return users.get_current_user()
        else:
            from google.appengine.api import oauth

            try:
                user = oauth.get_current_user()
            except oauth.OAuthRequestError:
                user = users.get_current_user()
            return user
399450
def get_user(self, user_id=None):
        
        if user_id:
            return self.get('/users/{0}/'.format(user_id))
        return self.get('/users/me/')
573338
def update
      note = find_note
      note.update!(note_params)

      flash[:notice] = t("socializer.model.update", model: "Note")
      redirect_to activities_path
    end
192368
def user(self):
        
        return self.users.get(self.contexts[self.current_context].get("user", ""), {})
970836
def current_id(self):
        
        cmd = ['hg', '-q', 'id', '-i']
        return self.sh(cmd, shell=False).rstrip().rstrip('+')
639156
def save_note(self, note_text, patient_id,
                  document_type,
                  document_status='Unsigned', wrapped_in_rtf='N'):
        
        allowed_document_status = ['Unsigned', 'Final']
        if document_status not in ['Unsigned', 'Final']:
            raise ValueError('document_status was invalid. allowed values are %s' %
                             allowed_document_status)
        magic = self._magic_json(action=TouchWorksMagicConstants.ACTION_SAVE_NOTE,
                                 patient_id=patient_id,
                                 parameter1=note_text,
                                 parameter2=document_type,
                                 parameter3=document_status,
                                 parameter4=wrapped_in_rtf)
        response = self._http_request(TouchWorksEndPoints.MAGIC_JSON, data=magic)
        result = self._get_results_or_raise_if_magic_invalid(
            magic,
            response,
            TouchWorksMagicConstants.RESULT_SAVE_NOTE)
        return result
357345
def stop_Note(self, note, channel=1):
        
        if hasattr(note, 'channel'):
            channel = note.channel
        self.stop_event(int(note) + 12, int(channel))
        self.notify_listeners(self.MSG_STOP_INT, {'channel': int(channel),
            'note': int(note) + 12})
        self.notify_listeners(self.MSG_STOP_NOTE, {'channel': int(channel),
            'note': note})
        return True
1146370
def current_user
      return unless token

      token_data = @base.token.token_data
      if guid = token_data[:user_id]
        user = user(guid)
        user.emails = [{ :value => token_data[:email] }]
        user
      end
    end
276380
def get_current_user():
    """"""
    thread_local = AutomatedLoggingMiddleware.thread_local
    if hasattr(thread_local, 'current_user'):
        user = thread_local.current_user
        if isinstance(user, AnonymousUser):
            user = None
    else:
        user = None

    return user
1353895
def _content(note, content):
        
        note.content = EvernoteMgr.set_header()
        note.content += sanitize(content)
        return note
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
143400
def _attributes(note, data):
        
        # attribute of the note: the link to the website
        note_attribute = EvernoteMgr.set_note_attribute(data)
        if note_attribute:
            note.attributes = note_attribute
        return note
1039166
def note_to_int(note):
    
    if is_valid_note(note):
        val = _note_dict[note[0]]
    else:
        raise NoteFormatError("Unknown note format '%s'" % note)

    # Check for '#' and 'b' postfixes
    for post in note[1:]:
        if post == 'b':
            val -= 1
        elif post == '#':
            val += 1
    return val % 12
1095421
def note_adapter(obj, request):
    '''
    
    '''
    return {
        'note': obj.note,
        'type': obj.type,
        'language': obj.language,
        'markup': obj.markup
    }