Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def __init__(self, mod_idendesc, get_link_fn):
Mail.db = AsyncDB(config.CORE_DBNAME, config.CORE_DBUSER,
config.CORE_DBPASSWORD)
Mail._idendesc = mod_idendesc
self.get_link = get_link_fn
Proxy.instance.register_call(
'core/mail/', 'send_mail', self.send_mail)
Proxy.instance.register_call(
'core/mail/', 'recv_mail', self.recv_mail)
Proxy.instance.register_call(
'core/mail/', 'list_mail', self.list_mail)
Proxy.instance.register_call(
'core/mail/', 'del_mail', self.del_mail)
Proxy.instance.register_call(
'core/mail/', 'get_mail_count', self.get_mail_count)
def __init__(self, pubkey, privkey = None):
super().__init__()
self.set_verifykey(pubkey)
if privkey != None:
self.set_signkey(privkey)
TOJAuth.instance = self
TOJAuth.db = AsyncDB(config.CORE_DBNAME, config.CORE_DBUSER,
config.CORE_DBPASSWORD)
def __init__(self, mod_idendesc, get_link_fn):
ProblemMg.db = AsyncDB(config.CORE_DBNAME, config.CORE_DBUSER,
config.CORE_DBPASSWORD)
ProblemMg._idendesc = mod_idendesc
self.get_link = get_link_fn
self._pmod_list = {}
Proxy.instance.register_filter('pro/', self.pmod_filter)
Proxy.instance.register_call(
'core/problem/', 'create_problem', self.create_problem)
Proxy.instance.register_call(
'core/problem/', 'delete_problem', self.delete_problem)
Proxy.instance.register_call(
'core/problem/', 'set_problem', self.imc_set_problem)
Proxy.instance.register_call(
'core/problem/', 'list_problem', self.list_problem)
Proxy.instance.register_call(
def __init__(self, mod_idendesc, get_link_fn):
Notice.db = AsyncDB(config.CORE_DBNAME, config.CORE_DBUSER,
config.CORE_DBPASSWORD)
Notice._idendesc = mod_idendesc
self.get_link = get_link_fn
Proxy.instance.register_call(
'core/notice/', 'list_notice', self.list_notice)
Proxy.instance.register_call(
'core/notice/', 'read_notice', self.read_notice)
Proxy.instance.register_call(
'core/notice/', 'del_notice', self.del_notice)
Proxy.instance.register_call(
'core/notice/', 'get_unseen_count', self.get_unseen_count)
def __init__(self, mod_idendesc, get_link_fn):
SquareMg.db = AsyncDB(config.CORE_DBNAME, config.CORE_DBUSER,
config.CORE_DBPASSWORD)
SquareMg._idendesc = mod_idendesc
self.get_link = get_link_fn
self._sqmod_list = {}
Proxy.instance.register_filter('sq/', self.sqmod_filter)
Proxy.instance.register_call(
'core/square/', 'list_category', self.list_category)
Proxy.instance.register_call(
'core/square/', 'list_square', self.list_square)
Proxy.instance.register_call(
'core/square/', 'join_square', self.join_square)
Proxy.instance.register_call(
'core/square/', 'quit_square', self.quit_square)
Proxy.instance.register_call(
def __init__(self, mod_idendesc, get_link_fn):
UserMg.db = AsyncDB(config.CORE_DBNAME, config.CORE_DBUSER,
config.CORE_DBPASSWORD)
UserMg._idendesc = mod_idendesc
self.get_link = get_link_fn
Proxy.instance.register_call(
'core/user/', 'register', self.register)
Proxy.instance.register_call(
'core/user/', 'login', self.login)
Proxy.instance.register_call(
'core/user/', 'cookie_login', self.cookie_login)
Proxy.instance.register_call(
'core/user/', 'get_user_info', self.get_user_info)
Proxy.instance.register_call(
'core/user/', 'set_user_info', self.set_user_info)
Proxy.instance.register_call(
'core/user/', 'change_user_password', self.change_user_password)
for i in range(0,1024):
cur.execute('INSERT INTO "mcdtest" VALUES(%s,%s)',('bob2_' + str(i),data))
et = time.perf_counter();
print(et - st)
st = time.perf_counter();
for i in range(0,1024):
cur.execute('SELECT "value" FROM "mcdtest" WHERE "key"=%s',('bob2_' + str(i),))
et = time.perf_counter();
print(et - st)
mc = AsyncMCD()
db = AsyncDB('testdb','pzread','pz3655742')
testmcd()
tornado.ioloop.IOLoop.instance().start()