e4378ddc530abc356c8ca4e3e6a317562b104c96,gb/node.py,Node,_internal_links,#Node#Any#,68
Before Change
for node_id in nodes.keys():
self.execute("SELECT id FROM link WHERE orig=%s", (node_id,))
rows = self.cur.fetchall()
for row in rows:
link = Link().get_by_id(row[0] )
if link.targ in nodes.keys():
ilinks.append(link)
After Change
def _internal_links(self, nodes):
ilinks = {}
for key, node in nodes.items():
ilinks[node.d["_id"]] = []
for key, orig in nodes.items():
targs = orig.d["targs"]
for targ_id, targ_list in targs.items():
if targ_id in nodes.keys():
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances Project Name: graphbrain/graphbrain
Commit Name: e4378ddc530abc356c8ca4e3e6a317562b104c96
Time: 2011-10-26
Author: telmo@telmomenezes.net
File Name: gb/node.py
Class Name: Node
Method Name: _internal_links
Project Name: graphbrain/graphbrain
Commit Name: e4378ddc530abc356c8ca4e3e6a317562b104c96
Time: 2011-10-26
Author: telmo@telmomenezes.net
File Name: gb/node.py
Class Name: Node
Method Name: _neighbors
Project Name: pymc-devs/pymc3
Commit Name: 5b2766aae94c0615aef2c8d6ac178428e6d28745
Time: 2008-07-20
Author: fonnesbeck@15d7aa0b-6f1a-0410-991a-d59f85d14984
File Name: pymc/database/mysql.py
Class Name: Trace
Method Name: _initialize