本文整理汇总了Python中edge.Edge.combine方法的典型用法代码示例。如果您正苦于以下问题:Python Edge.combine方法的具体用法?Python Edge.combine怎么用?Python Edge.combine使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类edge.Edge
的用法示例。
在下文中一共展示了Edge.combine方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: get_inters_and_cons
# 需要导入模块: from edge import Edge [as 别名]
# 或者: from edge.Edge import combine [as 别名]
radius = {}
for thread_id in threads.keys():
cons = get_inters_and_cons(threads[thread_id], edges)
# Update cons
for uid in cons:
if uid in radius:
radius[uid] = radius[uid] + 1
else:
radius[uid] = 1
interactions[group_id] = edges
contributions[group_id] = radius
# OVERALL
all_id = 0
all_name = 'All'
all_edges = Edge.combine(interactions.values())
all_conts = User.combine(contributions.values())
interactions[all_id] = all_edges
contributions[all_id] = all_conts
group_hash[all_id] = all_name
outs = Exporter.export(contributions, user_hash, interactions)
#print outs
success = sql_handler.insert_plots(sys.argv[1], outs, group_hash)
if success == False:
print False
exit()
sql_handler.cleanup()
print True
#doc = xmltodict.parse(fd.read())