當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。