expects a list of discord.py user objects
		returns a list of TrainerDex.py user objects
428706
def discord_to_users(self, memberlist):
		
		_memberlist = self.get_discord_user(x.id for x in memberlist)
		return list(set(x.owner() for x in _memberlist))
9544
def newlogins(sessions):
    
    if not sessions:
        return [], []
    users = {}
    dates = {}

    for session in sessions:
        user = session.user
        # time value is discarded to aggregate on days only
        date = session.started_at.strftime("%Y/%m/%d")
        # keep the info only it's the first time we encounter a user
        if user not in users:
            users[user] = date
            # build the list of users on a given day
            if date not in dates:
                dates[date] = [user]
            else:
                dates[date].append(user)

    data = []
    total = []
    previous = 0
    for date in sorted(dates.keys()):
        # print u"{} : {}".format(date, len(dates[date]))
        date_epoch = unix_time_millis(datetime.strptime(date, "%Y/%m/%d"))
        data.append({"x": date_epoch, "y": len(dates[date])})
        previous += len(dates[date])
        total.append({"x": date_epoch, "y": previous})

    return data, total
1354043
def get_userlist(self):
        
    # convert user/group  lists to arrays if strings
        if isinstance(self.config['user_include'], basestring):
            self.config['user_include'] = self.config['user_include'].split()
        if isinstance(self.config['user_exclude'], basestring):
            self.config['user_exclude'] = self.config['user_exclude'].split()
        if isinstance(self.config['group_include'], basestring):
            self.config['group_include'] = self.config['group_include'].split()
        if isinstance(self.config['group_exclude'], basestring):
            self.config['group_exclude'] = self.config['group_exclude'].split()

        rawusers = os.popen("lsof | awk '{ print $3 }' | sort | uniq -d"
                            ).read().split()
        userlist = []

        # remove any not on the user include list
        if ((self.config['user_include'] is None or
             len(self.config['user_include']) == 0)):
            userlist = rawusers
        else:
            # only work with specified include list, which is added at the end
            userlist = []

        # add any user in the group include list
        addedByGroup = []
        if ((self.config['group_include'] is not None and
             len(self.config['group_include']) > 0)):
            for u in rawusers:
                self.log.info(u)
                # get list of groups of user
                user_groups = os.popen("id -Gn %s" % (u)).read().split()
                for gi in self.config['group_include']:
                    if gi in user_groups and u not in userlist:
                        userlist.append(u)
                        addedByGroup.append(u)
                        break

        # remove any user in the exclude group list
        if ((self.config['group_exclude'] is not None and
             len(self.config['group_exclude']) > 0)):
            # create tmp list to iterate over while editing userlist
            tmplist = userlist[:]
            for u in tmplist:
                # get list of groups of user
                groups = os.popen("id -Gn %s" % (u)).read().split()
                for gi in self.config['group_exclude']:
                    if gi in groups:
                        userlist.remove(u)
                        break

        # remove any that aren't within the uid limits
        # make sure uid_min/max are ints
        self.config['uid_min'] = int(self.config['uid_min'])
        self.config['uid_max'] = int(self.config['uid_max'])
        tmplist = userlist[:]
        for u in tmplist:
            if ((self.config['user_include'] is None or
                 u not in self.config['user_include'])):
                if u not in addedByGroup:
                    uid = int(os.popen("id -u %s" % (u)).read())
                    if ((uid < self.config['uid_min'] and
                         self.config['uid_min'] is not None and
                         u in userlist)):
                        userlist.remove(u)
                    if ((uid > self.config['uid_max'] and
                         self.config['uid_max'] is not None and
                         u in userlist)):
                        userlist.remove(u)

        # add users that are in the users include list
        if ((self.config['user_include'] is not None and
             len(self.config['user_include']) > 0)):
            for u in self.config['user_include']:
                if u in rawusers and u not in userlist:
                    userlist.append(u)

        # remove any that is on the user exclude list
        if ((self.config['user_exclude'] is not None and
             len(self.config['user_exclude']) > 0)):
            for u in self.config['user_exclude']:
                if u in userlist:
                    userlist.remove(u)

        return userlist
762962
def user_list(self, params=None):
        """"""

        uri = 'openstack/users'
        if params:
            uri += '?%s' % urllib.urlencode(params)

        resp, body = self.get(uri)
        self.expected_success(200, resp.status)
        body = json.loads(body)
        return rest_client.ResponseBody(resp, body)
367514
def getUsers(context, roles, allow_empty=True):
    
    mtool = getToolByName(context, 'portal_membership')
    pairs = allow_empty and [['', '']] or []
    users = mtool.searchForMembers(roles=roles)
    for user in users:
        uid = user.getId()
        fullname = user.getProperty('fullname')
        if not fullname:
            fullname = uid
        pairs.append((uid, fullname))
    pairs.sort(lambda x, y: cmp(x[1], y[1]))
    return DisplayList(pairs)
831118
def list(self):
        
        response = self.session.get(self.url)
        return [Bot(self, **bot) for bot in response.data]
690458
def list(cls, params=None, custom_headers=None):
        

        if params is None:
            params = {}

        if custom_headers is None:
            custom_headers = {}

        api_client = client.ApiClient(cls._get_api_context())
        endpoint_url = cls._ENDPOINT_URL_LISTING
        response_raw = api_client.get(endpoint_url, params, custom_headers)

        return BunqResponseUserList.cast_from_bunq_response(
            cls._from_json_list(response_raw)
        )
1342767
def _get_members(o):
    
    result = []
    for n in dir(o):
        if hasattr(o, n) and n not in ["__globals__", "func_globals"]:
            result.append((n, getattr(o, n)))
    return result
442994
def list_(self):
        
        with self.lock:
            self.send('LIST')
            list_ = {}

            while self.readable():
                msg = self._recv(expected_replies=('322', '321', '323'))

                if msg[0] == '322':
                    channel, usercount, modes, topic = msg[2].split(' ', 3)
                    modes = modes.replace(':', '', 1).replace(':', '', 1)
                    modes = modes.replace('[', '').replace( \
                                                    ']', '').replace('+', '')
                    list_[channel] = usercount, modes, topic
                elif msg[0] == '321':
                    pass
                elif msg[0] == '323':
                    break

            return list_
1081141
def get_inline_instances(self, request, obj=None):
        
        inlines = super().get_inline_instances(request, obj)
        if obj:
            usergroup = RadiusUserGroupInline(self.model,
                                              self.admin_site)
            inlines.append(usergroup)
        return inlines
1199165
def users(self):
        
        if not hasattr(self, "_users"):
            us = {}
            if "users" in self.doc:
                for ur in self.doc["users"]:
                    us[ur["name"]] = u = copy.deepcopy(ur["user"])
                    BytesOrFile.maybe_set(u, "client-certificate")
                    BytesOrFile.maybe_set(u, "client-key")
            self._users = us
        return self._users
402614
def to_dict(self):
        
        users = dict(users=list())
        for user in self:
            users['users'].append(user.to_dict())
        return users
401785
def __public_objs(self):
        
        members = dict(inspect.getmembers(self.module))
        return dict([(name, obj)
                     for name, obj in members.items()
                     if self.__is_exported(name, inspect.getmodule(obj))])
1234794
def list(self):
        
        
        uri = URITemplate(self.baseuri + '/{owner}').expand(
            owner=self.username)
        return self.session.get(uri)
142833
def get_random_user(self):
        
        from provider.models import User
        u = User.objects.order_by('?')[0]
        return {"username": u.username, "password": u.password, "fullname": u.fullname}
608622
def connections
      response = Discordrb::API::User.connections(@token)
      JSON.parse(response).map { |e| Connection.new(e, self) }
    end
291582
def members(self):
        

        if self._this_occupant is not None:
            items = [self._this_occupant]
        else:
            items = []
        items += list(self._occupant_info.values())
        return items