Skip to content

Instantly share code, notes, and snippets.

View johnymontana's full-sized avatar
🤠
I'm very normal

William Lyon johnymontana

🤠
I'm very normal
View GitHub Profile
@johnymontana
johnymontana / import.cypher
Last active November 9, 2015 23:36
Import orgs
MATCH n
OPTIONAL MATCH n-[r]->()
DELETE n,r;
LOAD CSV FROM 'https://dl.dropboxusercontent.com/u/67572426/persons.csv' AS line
MERGE (p:Person:Entity {name: line[0]});
LOAD CSV FROM 'https://dl.dropboxusercontent.com/u/67572426/orgs.csv' AS line
MERGE (o:Org:Dept:Entity {name: line[0]});
@johnymontana
johnymontana / FEC-2015.cql
Last active October 6, 2015 20:41
FEC Import
// Import Federal Election campaign contribution data into Neo4j
// /path/to/neo4j/bin/neo4j-shell < FEC-2015.cql
//first let us create indexes!
CREATE INDEX ON :Candidate(fullName);
CREATE INDEX ON :Candidate(lastName);
CREATE INDEX ON :Candidate(candidateID);
CREATE INDEX ON :Contributor(fullName);
CREATE INDEX ON :Contributor(occupation);
@johnymontana
johnymontana / options.adoc
Last active November 21, 2024 14:40
My entry for the Neo4j GraphGist December competition. Very simplified options trading in a graph.

Options Trading As A Graph


Introduction

This GraphGist will begin to explore how stock option data can be modeled as a graph, some simple Cypher queries for calculating payout at expiration for an options contract and a very basic look at finding profitable options trades given a specific forecast. Please note that some of the concepts here have been simplified and are only meant as an educational overview of exploring Neo4j and graph data modeling.

{
"metadata": {
"name": "Simple_ODEs_Conservation"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
{
"metadata": {
"name": "Coffee_Cooling"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
@johnymontana
johnymontana / coffee.ipynb
Created January 30, 2013 19:38
CSCI 577 - Coffee Cooling
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.