Skip to content

Instantly share code, notes, and snippets.

View jexp's full-sized avatar
🐉
Watching the chamaeleon.

Michael Hunger jexp

🐉
Watching the chamaeleon.
View GitHub Profile
@jexp
jexp / graph_gist_template.adoc
Last active February 22, 2024 17:29 — forked from cheerfulstoic/graph_gist_template.adoc
CHANGEME: GraphGist Template. Fork to make your own, view source to see instruction comments

REPLACEME: TITLE OF YOUR GRAPHGIST

Introduction

@jexp
jexp / neo4j-wait.sh
Created January 19, 2017 15:01 — forked from benbc/neo4j-wait.sh
Example of using curl to wait for a Neo4j server to be up
#!/bin/bash
end="$((SECONDS+10))"
while true; do
[[ "200" = "$(curl --silent --write-out %{http_code} --output /dev/null http://localhost:7474)" ]] && break
[[ "${SECONDS}" -ge "${end}" ]] && exit 1
sleep 1
done

Dolphin Social Network

This gist is a little experiment based on this academic paper:

"" Many complex networks, including human societies, the Internet, the World Wide Web and power grids, have surprising properties that allow vertices (individuals, nodes, Web pages, etc.) to be in close contact and information to

@jexp
jexp / README.md
Last active March 24, 2020 02:13 — forked from knutwalker/README.md
Python script to parse a git commit log into Cypher create statements for Neo4j database

What is this about?

This script parses the git log and outputs Cypher statements to create a Neo4j database of your git history.

BEGIN
create constraint on (c:Commit) assert c.sha1 is unique;
COMMIT
BEGIN
CREATE (:Commit {author_email:'foo@bar.com',date_iso_8601:'2014-05-22 20:53:05 +0200',parents:['b6393fc9d5c065fd42644caad600a9b7ac911ae2'],refs:['HEAD', 'origin/master', 'master', 'in-index'],sha1:'934cacf9fe6cd0188be642b3e609b529edaad527',subject:'Some commit message',timestamp:'1400784785'});
= The Neo4j GraphGist Console =
This is a sample GraphGist explaining some of the base concepts of sharing graphs using http://docs.neo4j.org/chunked/milestone/cypher-query-lang.html[the Cypher query language].
[source,cypher]
----
CREATE ({name:'you'})-[:SEE]->({name:'This GraphGist'})-[:FORK_ON_GITHUB]->(your_gistfile{name:'Your Gist'})
CREATE (your_gistfile)-[:INSERT_ID_HERE]->({name:'Your GraphGist'})
----
@jexp
jexp / nfl_draft.adoc
Last active April 13, 2017 09:43 — forked from davidoliverSP2/nfl_draft.adoc
The 2016 NFL Draft

The 2016 NFL Draft

Introduction

Media, Politics and Graphs

My dear friend and neo4j community member Ron recently pointed me to an amazing piece of work. Thomas Boeschoten, of the Utrecht Data School among many other things, published some amazing work of analysing the Dutch Talk Shows from different perspectives, using Gephi as one of his tools. Some of his results are nothing short of fascinating, and very cool to look at.

netwerk

…​

@jexp
jexp / summary-stats.adoc
Last active February 6, 2016 17:38 — forked from Btibert3/summary-stats.adoc
Cypher query help: Summary stats for email marketing

Email Marketing Analytics App

Problem Statement

I want to summarize the email engagement for a particular contact in my database. The summary stats that I am looking for are:

@jexp
jexp / gist:26288bfebb15b9ae0b44
Last active February 5, 2016 01:38 — forked from PieterJanVanAeken/gist:6698581
Issue Tracking in Neo4j
= Why JIRA should use Neo4j
:neo4j-version: 2.1.0
== Introduction
There are few developers in the world that have never used an issue tracker. But there are even fewer developers who have ever used an issue tracker which uses a graph database. This is a shame because issue tracking really maps much better onto a graph database, than it does onto a relational database. Proof of that is the https://developer.atlassian.com/download/attachments/4227160/JIRA61_db_schema.pdf?api=v2[JIRA database schema].
Now obviously, the example below does not have all of the features that a tool like JIRA provides. But it is only a proof of concept, you could map every feature of JIRA into a Neo4J database. What I've done below, is take out some of the core functionalities and implement those.
== The data set
= People, books and cities
== Modeling the Graph
Let's take a look at the domain model:
image::http://i.imgur.com/TJCNW0b.jpg?1[]
//setup
//hide
[source, cypher]