Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Created by 'mengqingyun' on 15/4/3.
from collections import defaultdict, OrderedDict
import json
poi = [
dict(typ='06', index=1.4, fl=1, rank=0.1),
dict(typ='05', index=1.2, fl=2, rank=1.5),
@mqingyn
mqingyn / sentinel_redis.py
Last active August 29, 2015 14:14
sentinel redis cache for torngas
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from torngas.cache.backends.rediscache import RedisClient, RedisCache, bytes_type
from redis.sentinel import Sentinel, SentinelConnectionPool
from torngas.exception import ConfigError
from torngas.storage import SortedDict
from torngas import safestr
class ZhihuDev(Developer) :
@property
def characteristics(self):
return set(["Teamwork", "Devoted", "Creative"])
@property
def skills(self) :
return {
"Language" : ["Python","Erlang", "Golang", "C/C++"],
"OS" : ["Linux", "Mac OS X", "BSD UNIX"] ,