Skip to content

Instantly share code, notes, and snippets.

View peterneubauer's full-sized avatar

Peter Neubauer peterneubauer

View GitHub Profile
= Artist test
== First paragraph
[source,cypher]
----
create
(a1:Artist{name:'Awesome1'}),
(a2:Artist{name:'Awesome2'}),

The OSCON Graph-in-a-Gist

At Neo4j, we love going to

oscon2014 logo

This year, there is a DYI Schedule page that we are very intrigued by, so let’s build a — graph of the conference!

The Model

@peterneubauer
peterneubauer / events
Created July 15, 2014 14:14
OSCON CSV export
"serial","name","time_start","time_end","venue_serial","speakers"
"33451","Migrating to the Web Using Dart and Polymer - A Guide for Legacy OOP Developers","2014-07-23 17:00:00","2014-07-23 17:40:00","1458","149868"
"33457","Refactoring 101","2014-07-23 11:30:00","2014-07-23 12:10:00","1458","169862"
"33463","Open Source and Mobile Development: Where Does it go From Here?","2014-07-23 10:40:00","2014-07-23 11:20:00","1449","169870,2216,96208,150073"
"33464","Open Source Protocols and Architectures to Fix the Internet of Things","2014-07-23 16:10:00","2014-07-23 16:50:00","1451","2216"
"33476","Scaling PHP in the Real World!","2014-07-23 14:30:00","2014-07-23 15:10:00","1458","54107"
"33481","API Ecosystem with Scala, Scalatra, and Swagger at Netflix","2014-07-23 17:00:00","2014-07-23 17:40:00","1456","113667"
"33485","XSS and SQL Injections: The Tip of the Web Security Iceberg ","2014-07-23 16:10:00","2014-07-23 16:50:00","1458","169932"
"33503","Scalable Analytics with R, Hadoop and RHadoop","2014-07-23 14:3
== Welcome! Create and share your own online graph here.
:neo4j-version: 2.0.0
:author: Peter Neubauer
:twitter: @neterneubauer
:tags: domain:example
Neo4j Graph Gists are a way to share documents including Cypher queries. Without installing any local software, you can prototype your idea with full database functionality here, in your browser. Consider the following:

Movie recommendation based on User preferences and Actor weights

Given a movie database, with a structure like

(actor:Actor)-[:ACTS_IN { percent: y }]→(film:Movie) so that the system knows how long each actor is physically present on the screen, and to what % of the movie duration that corresponds.

Each user can have preferences for some actors (ie: grade them from "bad" to "awesome" or whatnot). To each of this preference the system is associated to a modifier (say from -100 to +100).

A sales funnel model

This Gist is about analysing and visualizing the different paths of leads through the different stages of a sales funnel. There are lots of different models for sales funnels, this is one example

The setup

In this setup, for each path there is statistics to be stored for e.g. the frequency of occurence. Relationship typs are used to distinguish between paths touching the same stages.

# http://www.mono-project.com/Compiling_Mono_on_OSX
require 'formula'
class Mono < Formula
#url 'http://download.mono-project.com/sources/mono/mono-3.0.6.tar.bz2'
#sha1 'e2187f80366fcd65c55a1ab946f8d3b39e81be77'
url 'http://download.mono-project.com/sources/mono/mono-2.10.9.tar.bz2'
sha1 '1a6e8c5a0c3d88d87982259aa04402e028a283de'
@peterneubauer
peterneubauer / mono.rb
Last active August 29, 2015 13:57 — forked from shtirlic/mono.rb
# http://www.mono-project.com/Compiling_Mono_on_OSX
require 'formula'
class Mono < Formula
url 'http://download.mono-project.com/sources/mono/mono-3.2.8.tar.bz2'
sha1 'e2187f80366fcd65c55a1ab946f8d3b39e81be77'
#url 'http://download.mono-project.com/sources/mono/mono-2.10.9.tar.bz2'
#sha1 '1a6e8c5a0c3d88d87982259aa04402e028a283de'

US Flights & Airports: Delays, Cancellations, & Diversions


A sales funnel

CREATE (s:Stage{name:'Suspect'})
CREATE (mql:Stage{name:'Marketing Qualified Lead'})
CREATE (ssc:Stage{name:'Self-Serve Customer'})
CREATE (ec:Stage{name:'Existing Customer'})
CREATE (ecno:Stage{name:'Existing Customer-No Opportunity'})
CREATE (sql:Stage{name:'Sales Qualified Lead'})