Get a list of users in the channel.
        Required arguments:
        * channel - Channel to get list of users for.
486928
def names(self, channel):
        
        with self.lock:
            self.is_in_channel(channel)

            self.send('NAMES %s' % channel)
            names = []

            while self.readable():
                msg = self._recv(expected_replies=('353', '366'))

                if msg[0] == '353':
                    new_names = msg[2].split()[2:]
                    new_names[0] = new_names[0].replace(':', '', 1)
                    names.extend(new_names)
                elif msg[0] == '366':
                    channel = msg[2].split()[0]
                    break

            for name in names:
                prefix = ''
                if name[0] in self.priv_types:
                    prefix = name[0]
                    name = name[1:]
                if prefix == '~':
                    self.channels[channel]['USERS'][name] = \
                    ['~', '', '', '', '']
                elif prefix == '&':
                    self.channels[channel]['USERS'][name] = \
                    ['', '&', '', '', '']
                elif prefix == '@':
                    self.channels[channel]['USERS'][name] = \
                    ['', '', '@', '', '']
                elif prefix == '%':
                    self.channels[channel]['USERS'][name] = \
                    ['', '', '', '%', '']
                elif prefix == '+':
                    self.channels[channel]['USERS'][name] = \
                    ['', '', '', '', '+']
                else:
                    self.channels[channel]['USERS'][name] = \
                    ['', '', '', '', '']
            return names
1211564
def members(self):
        
        if self._members is None:
            self._members = MemberList(
                self._version,
                account_sid=self._solution['account_sid'],
                queue_sid=self._solution['sid'],
            )
        return self._members
996846
def get_channels(self):
        """"""
        self.request(EP_GET_TV_CHANNELS)
        return {} if self.last_response is None else self.last_response.get('payload').get('channelList')
424155
def list_slack():
    """"""
    try:
        token = os.environ['SLACK_TOKEN']
        slack = Slacker(token)

        # Get channel list
        response = slack.channels.list()
        channels = response.body['channels']
        for channel in channels:
            print(channel['id'], channel['name'])
            # if not channel['is_archived']:
            # slack.channels.join(channel['name'])
        print()

        # Get users list
        response = slack.users.list()
        users = response.body['members']
        for user in users:
            if not user['deleted']:
                print(user['id'], user['name'], user['is_admin'], user[
                    'is_owner'])
        print()
    except KeyError as ex:
        print('Environment variable %s not set.' % str(ex))
594903
def list(self, channels=None, server=""):
        """"""
        self.send_items('LIST', ','.join(always_iterable(channels)), server)
147661
def _retrieve_users(self):
        
        users_url = self._build_url('users')
        response = self._request('GET', users_url)
        users = response.json()
        return users
1069294
def get_all_users(self):
		""""""
		
		r = requests.get(api_url+'users/', headers=self.headers)
		print(request_status(r))
		r.raise_for_status()
		output = r.json()
		result = []
		for x in output:
			result.append(User(x))
		return result
1220681
def users_list(self, *args):
        """"""
        if len(self._users) == 0:
            self.log('No users connected')
        else:
            self.log(self._users, pretty=True)
293311
def user_list(auth=None, **kwargs):
    '''
    
    '''
    cloud = get_openstack_cloud(auth)
    kwargs = _clean_kwargs(**kwargs)
    return cloud.list_users(**kwargs)
62812
def get_consumers(self, _Consumer, channel):
        
        return [_Consumer(queues=[self.queue(channel)], callbacks=[self.main_callback], prefetch_count=self.prefetch_count)]
407795
def list_users(self, user=None):
    '''
    ''' 
    from expfactory.database.models import Participant
    participants = Participant.query.all()
    users = []
    for user in participants:
        users.append(self.print_user(user))
    return users
1287536
def get_users_in_project(self, projectname):
        
        cmd = ["list", "assoc", "where", "account=%s" % projectname]
        results = self._read_output(cmd)

        user_list = []
        for result in results:
            if result["User"] != "":
                user_list.append(result["User"])
        return user_list
1270335
def get_users():
    '''
    
    '''
    try:
        recs = psutil.users()
        return [dict(x._asdict()) for x in recs]
    except AttributeError:
        # get_users is only present in psutil > v0.5.0
        # try utmp
        try:
            import utmp  # pylint: disable=import-error

            result = []
            while True:
                rec = utmp.utmpaccess.getutent()
                if rec is None:
                    return result
                elif rec[0] == 7:
                    started = rec[8]
                    if isinstance(started, tuple):
                        started = started[0]
                    result.append({'name': rec[4], 'terminal': rec[2],
                                   'started': started, 'host': rec[5]})
        except ImportError:
            return False
120898
def hosts(self, **kwargs):
        
        kwargs['channelID'] = self.id
        return self.connection.listHosts(**kwargs)
206631
def get_consumers(self, consumer_cls, channel):
        
        _log.debug('setting up consumers %s', self)

        for provider in self._providers:
            callbacks = [partial(self.handle_message, provider)]

            consumer = consumer_cls(
                queues=[provider.queue],
                callbacks=callbacks,
                accept=self.accept
            )
            consumer.qos(prefetch_count=self.prefetch_count)

            self._consumers[provider] = consumer

        return self._consumers.values()
564200
def get(self, mail):
        
        users = (v for v in self.list() if v.get('mail') == mail)
        for i in users:
            self.log.debug(i)
            return i
        return None
227097
def get_channel_listing(self):
        
        return {'name': self.name,
                'key': self.channel.key,
                'type': self.channel.typ,
                'read_only': self.read_only,
                'is_online': self.is_online(),
                'actions': self.get_actions(),
                'unread': self.unread_count()}