Return the score of an element

        :param name: str     the name of the redis key
        :param value: the element in the sorted set key
        :return: Future()
545544
def zscore(self, name, value):
        
        with self.pipe as pipe:
            return pipe.zscore(self.redis_key(name),
                               self.valueparse.encode(value))
1208356
def hkeys(self, name):
        
        with self.pipe as pipe:
            f = Future()
            res = pipe.hkeys(self.redis_key(name))

            def cb():
                m_decode = self.memberparse.decode
                f.set([m_decode(v) for v in res.result])

            pipe.on_execute(cb)
            return f
263297
def first_key(res):
    
    if not isinstance(res, dict):
        raise ValueError('Value should be of dict type')

    if len(res.keys()) != 1:
        raise RedisClusterException("More then 1 result from command")

    return list(res.values())[0]
730684
def _process_key_val(self, instance, key, val):
        '''
        
        '''
        if instance.check_precondition(key, val):
            combined = '{k}:{v}'.format(k=key, v=val)
            self._increment_total_stat(combined)
            self._increment_plugin_stat(
                instance.__class__.__name__,
                combined)
            instance.handle(key, val)
            self.redis_conn.delete(key)
            failkey = self._get_fail_key(key)
            if self.redis_conn.exists(failkey):
                self.redis_conn.delete(failkey)
529305
def rank(self, value):
        ''''''
        value = self.value_pickler.dumps(value)
        return self.backend_structure().rank(value)
568601
def get_or_set_score(self, member, default=0):
        
        default = float(default)

        def get_or_set_score_trans(pipe):
            pickled_member = self._pickle(member)
            score = pipe.zscore(self.key, pickled_member)

            if score is None:
                pipe.zadd(self.key, {self._pickle(member): default})
                return default

            return score

        return self._transaction(get_or_set_score_trans)
610452
def hexists(self, name, key):
        
        with self.pipe as pipe:
            return pipe.hexists(self.redis_key(name),
                                self.memberparse.encode(key))
805990
def llen(self, name):
        
        with self.pipe as pipe:
            return pipe.llen(self.redis_key(name))
15103
def get_first_key_from_value(self, value):
        

        for key, data in self.iteritems():
            if data == value:
                return key
180755
def Value(self, name):
    """"""
    if name in self._enum_type.values_by_name:
      return self._enum_type.values_by_name[name].number
    raise ValueError('Enum %s has no value defined for name %s' % (
        self._enum_type.name, name))
803478
def stats(self, name, value):
        
        for counter in self._counters:
            counter.stats(name, value)
1244935
def result(retn):
    '''
    
    '''
    ok, valu = retn

    if ok:
        return valu

    name, info = valu

    ctor = getattr(s_exc, name, None)
    if ctor is not None:
        raise ctor(**info)

    info['errx'] = name
    raise s_exc.SynErr(**info)
41455
def get_value(self, name):
        
        factory = self._registered.get(name)
        if not factory:
            raise KeyError('Name not registered')
        if factory._giveme_singleton:
            if name in self._singletons:
                return self._singletons[name]
            self._singletons[name] = factory()
            return self._singletons[name]
        elif factory._giveme_threadlocal:
            if hasattr(self._threadlocals, name):
                return getattr(self._threadlocals, name)
            setattr(self._threadlocals, name, factory())
            return getattr(self._threadlocals, name)
        return factory()
182170
def get(self, name):
        """"""
        # Asynchronously yield a result from a method
        res = yield gen.Task(self.hello, name)

        # When using the `schema.validate` decorator asynchronously,
        #   we can return the output desired by raising
        #   `tornado.gen.Return(value)` which returns a
        #   Future that the decorator will yield.
        # In Python 3.3, using `raise Return(value)` is no longer
        #   necessary and can be replaced with simply `return value`.
        #   For details, see:
        # http://www.tornadoweb.org/en/branch3.2/gen.html#tornado.gen.Return

        # return res  # Python 3.3
        raise gen.Return(res)
46920
def rank_for_in(self, leaderboard_name, member):
        '''
        
        '''
        member_score = str(float(self.score_for_in(leaderboard_name, member)))
        if self.order == self.ASC:
            try:
                return self.redis_connection.zcount(
                    leaderboard_name, '-inf', '(%s' % member_score) + 1
            except:
                return None
        else:
            try:
                return self.redis_connection.zcount(
                    leaderboard_name, '(%s' % member_score, '+inf') + 1
            except:
                return None
1185548
def exists(self, name):
        
        with self.pipe as pipe:
            return pipe.exists(self.redis_key(name))
893478
async def hset(self, name, key, value):
        
        return await self.execute_command('HSET', name, key, value)