Return the session flags for the mailbox session.

        Args:
            uid: The message UID value.
965695
def get(self, uid: int) -> FrozenSet[Flag]:
        
        recent = _recent_set if uid in self._recent else frozenset()
        flags = self._flags.get(uid)
        return recent if flags is None else (flags | recent)
224731
protected function _loadUids($mailbox, $uids, $uidvalid = null)
    {
        if (!isset($this->_data[$mailbox])) {
            $this->_data[$mailbox] = array();
        }

        $this->_loadSliceMap($mailbox, $uidvalid);

        if (!empty($uids)) {
            foreach (array_unique(array_intersect_key($this->_slicemap[$mailbox]['s'], array_flip($uids))) as $slice) {
                $this->_loadSlice($mailbox, $slice);
            }
        }
    }
477833
def get_user_by_id(uid,**kwargs):
    
    user_id = kwargs.get('user_id')
    try:
        user_i = _get_user(uid)
        return user_i
    except NoResultFound:
        return None
513804
def get_user(uid, **kwargs):
    
    user_id=kwargs.get('user_id')
    if uid is None:
        uid = user_id
    user_i = _get_user(uid)
    return user_i
162192
public function getUniqueEmails($uid, $body = false)
    {
        Argument::i()
            ->test(1, 'int', 'string', 'array')
            ->test(2, 'bool');

        //if not connected
        if (!$this->socket) {
            //then connect
            $this->connect();
        }

        //if the total in this mailbox is 0
        //it means they probably didn't select a mailbox
        //or the mailbox selected is empty
        if ($this->total == 0) {
            //we might as well return an empty array
            return array();
        }

        //if uid is an array
        if (is_array($uid)) {
            $uid = implode(',', $uid);
        }

        //lets call it
        $items = array('UID', 'FLAGS', 'BODY[HEADER]');

        if ($body) {
            $items = array('UID', 'FLAGS', 'BODY[]');
        }

        $first = is_numeric($uid) ? true : false;

        return $this->getEmailResponse('UID FETCH', array($uid, $this->getList($items)), $first);
    }
388956
def get_username(uid,**kwargs):
    
    rs = db.DBSession.query(User.username).filter(User.id==uid).one()

    if rs is None:
        raise ResourceNotFoundError("User with ID %s not found"%uid)

    return rs.username
186343
def _get_uid(name):
    """"""
    if getpwnam is None or name is None:
        return None
    try:
        result = getpwnam(name)
    except KeyError:
        result = None
    if result is not None:
        return result[2]
    return None
335384
def is_uid(uid):
    
    if not isinstance(uid, basestring):
        return False
    if uid != "0" and len(uid) != 32:
        return False
    return True
1224995
private static int getLoggedinState(Context context, String uid) {
        Cursor cursor = context.getContentResolver().query(
            LOGGED_IN_URI.buildUpon().appendPath(uid).build(), null, // projection
            null, // selection clause
            null, // selection args
            null); // sort order

        if (cursor == null) {
            // DropboxApp not installed
            return NO_USER;
        }
        cursor.moveToFirst();
        return cursor.getInt(cursor.getColumnIndex("logged_in"));
    }
562773
def flags(self, index):
        "
        return QtCore.Qt.ItemIsEditable | QtCore.Qt.ItemIsEnabled | QtCore.Qt.ItemIsSelectable
402685
def map_sid2uid(self, sid, uid):
        
        self.set('sid2uid', sid, uid)
        self.set('uid2sid', uid, sid)
1311106
def uid(self):
        
        exp = datetime.datetime.utcnow() + self.expDelay
        claims = {
            'user_info': self.user_info,
            # Note that we use JWT standard 'exp' field to implement session expiration
            # we completely bypass twisted.web session expiration mechanisms
            'exp': calendar.timegm(datetime.datetime.timetuple(exp))}

        return jwt.encode(claims, self.site.session_secret, algorithm=SESSION_SECRET_ALGORITHM)
946744
def getClientUID(self):
        
        client = api.get_parent(self)
        if not client:
            return ""
        return api.get_uid(client)
782242
def get_discord_user(self, uid=None, user=None, trainer=None):
		
		uids = ','.join(uid) if uid else None
		users =','.join(user) if user else None
		trainers = ','.join(trainer) if trainer else None
		params = {
			'provider': 'discord',
			'uid': uids,
			'user': users,
			'trainer': trainers
		}
		r = requests.get(api_url+'users/social/', params=params, headers=self.headers)
		print(request_status(r))
		r.raise_for_status()
		output = r.json()
		result = []
		for x in output:
			result.append(DiscordUser(x))
		return result
192192
async def find_deleted(self, seq_set: SequenceSet,
                           selected: SelectedMailbox) -> Sequence[int]:
        
        session_flags = selected.session_flags
        return [msg.uid async for _, msg in self.find(seq_set, selected)
                if Deleted in msg.get_flags(session_flags)]
296707
def get_all(self, uids: Iterable[int]) -> Mapping[int, Record]:
        
        return {uid: self._records[uid] for uid in uids
                if uid in self._records}
363304
def get_email_message(self, message_uid, message_type="text/plain"):
        
        self._mail.select("inbox")
        result = self._mail.uid('fetch', message_uid, "(RFC822)")
        msg = email.message_from_string(result[1][0][1])

        try:
            # Try to handle as multipart message first.
            for part in msg.walk():
                if part.get_content_type() == message_type:
                    return part.get_payload(decode=True)
        except:
            # handle as plain text email
            return msg.get_payload(decode=True)