本文整理汇总了Python中collector.Collector.collect方法的典型用法代码示例。如果您正苦于以下问题:Python Collector.collect方法的具体用法?Python Collector.collect怎么用?Python Collector.collect使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类collector.Collector
的用法示例。
在下文中一共展示了Collector.collect方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: main
# 需要导入模块: from collector import Collector [as 别名]
# 或者: from collector.Collector import collect [as 别名]
def main():
conf = parse_options()
c = Client(conf)
collector = Collector(c)
start = c.get_user(conf.start_user)
collector.collect(start)
g = collector.graph
nx.write_dot(g, conf.output_file)
示例2: main
# 需要导入模块: from collector import Collector [as 别名]
# 或者: from collector.Collector import collect [as 别名]
def main():
f = open('try_3.txt','w')
g = open('accs.txt', 'w')
g.close()
task = MarioTask("testbed", initMarioMode = 2)
task.env.initMarioMode = 2
task.env.levelDifficulty = 1
task.env.BASE_LEVEL = 500000
results = []
names = []
iterations = 20
rounds = 30
learning_samples = 33
eval_samples = 10
# iterations = 5
# rounds = 2
# learning_samples = 3
# eval_samples = 2
if args['noisy']:
agent = NoisySupervise(IT, useKMM = False)
dire = './training_data_noisy/'
else:
agent = Supervise(IT, useKMM = False)
dire = './training_data/'
exp = EpisodicExperiment(task, agent)
C = Collector(agent,exp)
C.collect(rounds = rounds, iterations = iterations,
learning_samples = learning_samples, eval_samples = eval_samples,
directory=dire)
print "finished"
示例3: collect
# 需要导入模块: from collector import Collector [as 别名]
# 或者: from collector.Collector import collect [as 别名]
def collect(self, folder_names):
collector = Collector()
registry = collector.collect(folder_names)
for event in registry:
self.__register_event__(event)
示例4: main
# 需要导入模块: from collector import Collector [as 别名]
# 或者: from collector.Collector import collect [as 别名]
def main():
conf = parse_options()
client = Client(conf)
collector = Collector(client, conf)
collector.collect(conf.start_user)
nx.write_dot(collector.graph, conf.output_file)