Returns the score of member in the sorted set at key.
961176
function zscore(key, member, req) {
  var zset = this.getKey(key, req);
  if(zset === undefined) return null;
  return zset.zscore(member);
}
1319910
def _ratio(self, key):
        ''''''
        total = float(self._total_votes())
        try:
            return math.floor(self[key] / total * 100)
        except ZeroDivisionError:
            return float(0)
245690
def quality(self, key):
        
        for item, quality in self:
            if self._value_matches(key, item):
                return quality
        return 0
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)
1161634
def get_rank(self, member, reverse=False, pipe=None):
        
        pipe = self.redis if pipe is None else pipe
        method = getattr(pipe, 'zrevrank' if reverse else 'zrank')
        rank = method(self.key, self._pickle(member))

        return rank
1087654
def zrevrange_with_int_score(self, key, max_score, min_score):
        
        self._prune_penalty_box()

        if len(self.active_clients) == 0:
            raise ClusterEmptyError("All clients are down.")

        element__score = defaultdict(int)
        for client in self.active_clients:
            revrange = client.zrevrangebyscore(
                key, max_score, min_score, withscores=True, score_cast_func=int
            )

            for element, count in revrange:
                element__score[element] = max(element__score[element], int(count))

        return element__score
1250236
def set_score(self, member, score, pipe=None):
        
        pipe = self.redis if pipe is None else pipe
        pipe.zadd(self.key, {self._pickle(member): float(score)})
402526
public Double score(final String member) {
        return doWithJedis(new JedisCallable<Double>() {
            @Override
            public Double call(Jedis jedis) {
                return jedis.zscore(getKey(), member);
            }
        });
    }
1371739
def scores(self):
        
        return map(
            lambda x: (x[0], sum(x[1]) * len(x[1]) ** -.5),
            iter(self.items.viewitems())
        )
1006316
def rank(self, score):
        '''
        '''
        node = self._head
        rank = 0
        for i in range(self._level-1, -1, -1):
            while node.next[i] and node.next[i].score < score:
                rank += node.width[i]
                node = node.next[i]
        node = node.next[0]
        if node and node.score == score:
            return rank
        else:
            return -2 - rank
1340740
private final int getRoundKey(final int key, final boolean upORdown, final boolean acceptEqual) {
		if (isEmpty())
			return NULL_VALUE;
		int slot = findSlotByKey(key);
		if (upORdown) {
			// ceiling / higher
			slot = ((slot < 0) ? (-slot) - 1 : (acceptEqual ? slot : slot + 1));
			if (slot >= allocated) {
				return NULL_VALUE;
			}
		} else {
			// floor / lower
			slot = ((slot < 0) ? (-slot) - 2 : (acceptEqual ? slot : slot - 1));
			if (slot < 0) {
				return NULL_VALUE;
			}
		}
		return keys[slot];
	}
300510
def _load_score(self):
        """"""
        score = int(self.score_file.read())
        self.score_file.seek(0, os.SEEK_SET)
        return score
597172
public function getSortedRankAsc($key, $member)
    {
        $score = $this->getScore($key, $member);
        if ($score === false || $score === null) return null;

        return $this->driver->zCount($key, '-inf', -- $score);
    }
1208506
public Long zadd(Object key, double score, Object member) {
		Jedis jedis = getJedis();
		try {
			return jedis.zadd(keyToBytes(key), score, valueToBytes(member));
		}
		finally {close(jedis);}
	}
162010
def sort_key(x):
    
    name, (r, u) = x
    return - len(u) + u.count('}') * 100
1039403
def get(key, default=-1):
        """"""
        if isinstance(key, int):
            return HI_Algorithm(key)
        if key not in HI_Algorithm._member_map_:
            extend_enum(HI_Algorithm, key, default)
        return HI_Algorithm[key]
135340
public static Double getFirstScore(Set<Tuple> set) {
		if (set == null || set.isEmpty()) {
			return null;
		}
		Tuple tuple = set.iterator().next();
		Double score = tuple.getScore();
		return score;
	}