Skip to content

Instantly share code, notes, and snippets.

@melpomene
Created May 16, 2013 07:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save melpomene/5590060 to your computer and use it in GitHub Desktop.
Save melpomene/5590060 to your computer and use it in GitHub Desktop.
(1000603665) {"1000046259": 1.0, "1000045077": 1.0}
(1001390102) {"1000913520": 1.0, "1000042346": 1.0}
(1004797975) {"1000046435": 1.0, "1003829903": 1.0}
.... some 200k rows more ...
(1004536000)-[:SIMILAR]->(1000840000)
(1004536000)-[:SIMILAR]->(1005442000)
from py2neo import geoff, neo4j, node, rel, cypher
graph_db = neo4j.GraphDatabaseService(neo4j.DEFAULT_URI)
s = geoff.Subgraph.load(open('graph.geoff', 'r'))
s.insert_into(graph_db)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment