当前位置: 首页>>代码示例>>Python>>正文


Python Collector.collect方法代码示例

本文整理汇总了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)
开发者ID:thomasernste,项目名称:twitter-followers,代码行数:12,代码来源:twitter_graph_gen.py

示例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"
开发者ID:mdlaskey,项目名称:marioai,代码行数:38,代码来源:collect_supervisor_demos.py

示例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)
开发者ID:AlexandrShestak,项目名称:mag_python,代码行数:7,代码来源:eventManager.py

示例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)
开发者ID:mariosv,项目名称:twitter-network,代码行数:8,代码来源:create_net.py


注:本文中的collector.Collector.collect方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。