Skip to content

Instantly share code, notes, and snippets.

View peterneubauer's full-sized avatar

Peter Neubauer peterneubauer

View GitHub Profile
@tingletech
tingletech / load.grm
Created January 25, 2011 16:43
load snac data into a graph database with blueprints/gremlin
// groovy / gremlin script to load EAC-CPF relations into a graph database
// directory to troll
def data_root = "/home/btingle/rebuild/xtf/data"
// XTF Base URL used in inner loop to look up authorized form of name
def xtf_base = "http://socialarchive.iath.virginia.edu/xtf/search?raw=1&sectionType="
// create graph
g = new Neo4jGraph('snac-graph')
@mhermans
mhermans / neo4R_example.R
Created August 29, 2011 09:50
Neo4j-Cypher-R
# Requirements
#sudo apt-get install libcurl4-gnutls-dev # for RCurl on linux
#install.packages('RCurl')
#install.packages('RJSONIO')
library('RCurl')
library('RJSONIO')
query <- function(querystring) {
h = basicTextGatherer()
@g-eorge
g-eorge / build.sbt
Created November 17, 2011 14:05
basic sbt 0.11 project definition to get Neo4j embedded server (WrappingNeoServerBootstrapper) dependencies and neo4j-scala
organization := "your.org"
name := "your.name"
version := "your.version"
/** Deps for neo4j-scala (https://github.com/FaKod/neo4j-scala) */
libraryDependencies ++= Seq(
"org.neo4j" % "neo4j-scala" % "0.2.0-SNAPSHOT"
)
@andymcgrath
andymcgrath / starwars-universe.txt
Created October 25, 2012 03:34
Star Wars Universe Graph [use with Neo4j http://console.neo4j.org/?id=StarWars]
START LUKE=node(0)
CREATE
(HAN {name:"Han Solo"}),
(LEIA {name:"Princess Leia Organa"}),
(OBI_WAN {name:"Obi Wan Kenobi"}),
(YODA {name : "Yoda"}),
(TARKIN {name:"Grand Moff Tarkin"}),
(VADER {name:"Darth Vader"}),
(C3PO {name:"C3PO", droid:true}),
= Money Laundering with graphs
== The setup
Let's set up some data in the Money Laundering industry.
//setup
//hide
[source,cypher]
----
== Max you rock.
++++
<a href = "http://maxdemarzi.com/2013/06/26/neo4j-2-0-is-coming/" target="_blank"><img src="http://maxdemarzidotcom.files.wordpress.com/2013/06/neoiscoming.jpg?w=580"/></a>
++++
[source,cypher]
----
CREATE ({name:'MaxDeMarzi'})-[:WRITES]->(blogs{name:'awesome blogs'})
CREATE (blogs)-[:ABOUT]->({name:'neo4j'})

Neo4j GraphGist

Neo4j GraphGists are a way to share documents including Cypher queries. The queries can be executed in an online console. GraphGists can be used to share examples or ideas or outline a question you have.

See also the GraphGist Collection and check out the GraphGist Challenge!

You create a GraphGist by creating a GitHub Gist in AsciiDoc and enter the URL to it in the form on this page. The GraphGist is just as private as the GitHub Gist you created.