本文整理匯總了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)