Retrieve the rank for a member in the named leaderboard.

        @param leaderboard_name [String] Name of the leaderboard.
        @param member [String] Member name.
        @return the rank for a member in the leaderboard.
505836
def rank_for_in(self, leaderboard_name, member):
        '''
        
        '''
        if self.order == self.ASC:
            try:
                return self.redis_connection.zrank(
                    leaderboard_name, member) + 1
            except:
                return None
        else:
            try:
                return self.redis_connection.zrevrank(
                    leaderboard_name, member) + 1
            except:
                return None
625248
def get_member(self, username, api=None):
        
        api = api if api else self._API

        response = api.get(
            url=self._URL['member'].format(id=self.id, username=username),
        )
        data = response.json()
        return Member(api=api, **data)
145735
def total_members_in_score_range(self, min_score, max_score):
        '''
        
        '''
        return self.total_members_in_score_range_in(
            self.leaderboard_name, min_score, max_score)
881430
def rank_members_in(self, leaderboard_name, members_and_scores):
        '''
        
        '''
        for member, score in grouper(2, members_and_scores):
            self.rank_member_in(leaderboard_name, member, score)
166092
def show_member(self, member, **_params):
        """"""
        return self.get(self.member_path % (member), params=_params)
629988
public Member getMember(String memberName) {
		for (Member member : members) {
			if (member.getName().equals(memberName)) {
				return member;
			}
		}
		throw new FuzzerException(name + ": member '" + memberName + "' not found");
	}
809634
private int getDataMemberListIndex(Member member) {
        final Collection<Member> dataMembers = nodeEngine.getClusterService().getMembers(DATA_MEMBER_SELECTOR);
        int index = -1;
        for (Member dataMember : dataMembers) {
            index++;
            if (dataMember.equals(member)) {
                return index;
            }
        }
        return index;
    }
404691
function Leaderboard(leaderboardName, options, redisOptions) {
      this.leaderboardName = leaderboardName;
      if (options == null) {
        options = DEFAULT_OPTIONS;
      }
      if (redisOptions == null) {
        redisOptions = DEFAULT_REDIS_OPTIONS;
      }
      this.reverse = options['reverse'];
      this.pageSize = options['pageSize'];
      if (this.pageSize === null || this.pageSize < 1) {
        this.pageSize = Leaderboard.DEFAULT_PAGE_SIZE;
      }
      this.memberKeyOption = options['memberKey'] || 'member';
      this.rankKeyOption = options['rankKey'] || 'rank';
      this.scoreKeyOption = options['scoreKey'] || 'score';
      this.memberDataKeyOption = options['memberDataKey'] || 'member_data';
      this.memberDataNamespace = options['memberDataNamespace'] || 'member_data';
      this.redisConnection = redisOptions['redis_connection'];
      if (this.redisConnection != null) {
        delete redisOptions['redis_connection'];
      }
      if (this.redisConnection == null) {
        this.redisConnection = redis.createClient(redisOptions['port'], redisOptions['host']);
      }
    }
490140
def members(name, members_list):
    '''
    
    '''
    retcode = 1
    grp_info = __salt__['group.info'](name)
    if grp_info and name in grp_info['name']:
        cmd = '/usr/bin/dscl . -delete /Groups/{0} GroupMembership'.format(name)
        retcode = __salt__['cmd.retcode'](cmd) == 0
        for user in members_list.split(','):
            cmd = '/usr/bin/dscl . -merge /Groups/{0} GroupMembership {1}'.format(name, user)
            retcode = __salt__['cmd.retcode'](cmd)
            if not retcode == 0:
                break
            # provided list is '': users previously deleted from group
            else:
                retcode = 0

    return retcode == 0
417228
def filter_users(self, users):
		""""""
		return [LeaderboardInstance(x) for x in self._leaderboard if x['user_id'] in users]
1165441
def get_member(self, jid, default=None):
        """"""
        member = filter(lambda m: m['JID'] == jid, self.params['MEMBERS'])
        if len(member) == 1:
            return member[0]
        elif len(member) == 0:
            return default
        else:
            raise Exception('Multple members have the same JID of [%s]' % (jid,))
196125
def members_to_ask(self, name_id):
        

        vo_members = self._affiliation_members()
        for member in self.member:
            if member not in vo_members:
                vo_members.append(member)

        # Remove the ones I have cached data from about this subject
        vo_members = [m for m in vo_members if not self.sp.users.cache.active(
            name_id, m)]
        logger.info("VO members (not cached): %s", vo_members)
        return vo_members
442980
def update_member_data(self, member, member_data):
        '''
        
        '''
        self.update_member_data_in(self.leaderboard_name, member, member_data)
221776
def fetch_node_status(member):
        

        try:
            response = requests.get(member.api_url, timeout=2, verify=False)
            logger.info('Got response from %s %s: %s', member.name, member.api_url, response.content)
            return _MemberStatus.from_api_response(member, response.json())
        except Exception as e:
            logger.warning("Request failed to %s: GET %s (%s)", member.name, member.api_url, e)
        return _MemberStatus.unknown(member)
1240091
def get_ranked_players():
    """"""

    rankings_page = requests.get(RANKINGS_URL)
    root = etree.HTML(rankings_page.text)
    player_rows = root.xpath('//div[@id="ranked"]//tr')

    for row in player_rows[1:]:
        player_row = row.xpath('td[@class!="country"]//text()')
        yield _Player(
            name=player_row[1],
            country=row[1][0].get('title'),
            triple_crowns=player_row[3],
            monthly_win=player_row[4],
            biggest_cash=player_row[5],
            plb_score=player_row[6],
            biggest_score=player_row[7],
            average_score=player_row[8],
            previous_rank=player_row[9],
        )
64757
def _parse_guild_members(self, parsed_content):
        
        member_rows = parsed_content.find_all("tr", {'bgcolor': ["#D4C0A1", "#F1E0C6"]})
        previous_rank = {}
        for row in member_rows:
            columns = row.find_all('td')
            values = tuple(c.text.replace("\u00a0", " ") for c in columns)
            if len(columns) == COLS_GUILD_MEMBER:
                self._parse_current_member(previous_rank, values)
            if len(columns) == COLS_INVITED_MEMBER:
                self._parse_invited_member(values)
834491
def _get_member_ref_str(name, obj, role='obj', known_refs=None):
    """"""
    if known_refs is not None:
        if name in known_refs:
            return known_refs[name]
    ref = _get_fullname(name, obj)
    return ":%s:`%s <%s>`" % (role, name, ref)