code
stringlengths
3
6.57k
get_read_table_offset(f)
f.readline()
line.strip()
split()
chk23('CELL_DATA')
chk23('POINT_DATA')
f.readline()
f.tell()
f.readline()
OmegaConf.create()
L(build_data_loader)
L(FeatDataset)
yaml.load(open('/lfs/local/0/nomir/sMOOth/data/Adult/income.yml')
L(build_data_loader)
L(FeatDataset)
yaml.load(open('/lfs/local/0/nomir/sMOOth/data/Adult/income.yml')
L(DatasetEvaluators)
ClassificationAcc()
BinaryEqualizedOddsViolation()
LazyConfig.load("/lfs/local/0/nomir/sMOOth/src/configs/common/train.py")
L(MultiObjectiveLoss)
torch.Tensor([0.5, 0.5])
L(IncomeClassifier)
L(torch.optim.Adam)
L(get_default_optimizer_params)
L(WarmupParamScheduler)
L(CosineParamScheduler)
send()
random.choice(['info', 'error', 'warn'])
rb_conn.channel()
ch.exchange_declare(exchange='direct_logs', exchange_type='direct')
range(100)
ch.close()
print('send over')
recv()
rb_conn.channel()
ch.exchange_declare('direct_logs', exchange_type='direct')
callback(ch, method, p, msg)
print(threading.get_ident()
ch.queue_declare(queue='', exclusive=True)
ch.queue_bind(exchange='direct_logs', queue=queue_name, routing_key=tag)
ch.start_consuming()
threading.Thread(target=recv)
rv.start()
send()
rv.join()
os.path.expanduser("~/.techbot")
os.path.expanduser("~/.techbot/score.db")
Plugin(object)
__init__(self, config)
__init__(self)
RLock()
self.get_db()
get_db(self)
self.create_dir()
sqlite3dbm.sshelve.open(DB)
create_dir(self)
os.path.exists(CONFIG_DIR)
os.mkdir(CONFIG_DIR)
change_score(self, mess, **kwargs)
mess.getBody()
unicode(mess.getFrom()
split("/")
unicode(mess.getFrom()
split("/")
message.find('++')
message.find('--')
self.bot.log.info("plusplusbot: %s" % mess)
message.endswith("++")
message.endswith("--")
results.extend(self.process_message(message, room, user)
re.findall("\((.*?)
m.endswith("++")
m.endswith("--")
results.extend(self.process_message(m, room, user)
len(results)
join(results)
process_message(self, message, room, user)
message.endswith('--')
self.db.get(room, {})
scores.setdefault(victim, 0)
scores(self, mess, args, **kwargs)
self.bot.log.info("score: %s" % mess)
unicode(mess.getFrom()
split("/")
self.db.get(room, {})
ret.append("%s: %s" %(key, scores[key])
join(ret)
license (see LICENSE for details)
Copyright (c)
collections.namedtuple("Config", ["url", "key", "output"])
is_valid_file(parser, arg)
os.path.exists(arg)
parser.error("The file %s does not exist!" % arg)
main()
argparse.ArgumentParser()
argparse.FileType("r")
is_valid_file(parser, x)
argparse.FileType("w+")
parser.add_mutually_exclusive_group()