Skip to content

Instantly share code, notes, and snippets.

View swainjo's full-sized avatar

John Swain swainjo

View GitHub Profile
<!DOCTYPE html>
<meta charset="utf-8">
<style>
body {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
width: 960px;
height: 500px;
position: relative;
}
@swainjo
swainjo / index.html
Created May 30, 2014 15:12
Crimes EDA
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta name="generator" content="pandoc" />

Country Opinions

logo elite dangerous

In the video game Elite:Dangerous players can buy and sell commodities at stations around the galaxy. This gist shows how to use Neo4j and Cypher queries for trading decisions in this game.

Movie Recommendations with k-Nearest Neighbors and Cosine Similarity


Introduction

The k-nearest neighbors (k-NN) algorithm is among the simplest algorithms in the data mining field. Distances / similarities are calculated between each element in the data set using some distance / similarity metric ^[1]^ that the researcher chooses (there are many distance / similarity metrics), where the distance / similarity between any two elements is calculated based on the two elements' attributes. A data element’s k-NN are the k closest data elements according to this distance / similarity.


1. A distance metric measures distance; the higher the distance the further apart the neighbors. A similarity metric measures similarity; the higher the similarity the closer the neighbors.
@swainjo
swainjo / GreenMan
Last active August 29, 2015 14:05 — forked from pac19/Alpine Skiing.adoc
== Green Man POC
:neo4j-version: neo4j-2.1
:author: John Swain
:twitter: @swainjo
:tags: domain:POC
=== Load Sample Data
//setup
//hide
=== Load Sample Data
//setup
//hide
[source,cypher]
----
create
(_8:`Tweet` {`created_at`:"Tue Sep 16 07:49:19 +0000 2014", `favorites`:0, `id`:511783879238488064, `text`:"RT @selinasorrels: DON'T BE AFRAID~~~ BE AWARE...Computer Models Tell Us That This Ebola Pandemic Could Soon Kill Millions... #Geo-Eng~
ht…"}),
(_9:`User` {`followers`:193, `following`:282, `location`:"Lelystad 06-22.44.69.21", `name`:"Harmen Bouwstra", `profile_image_url`:"http://pbs.twimg.com/profile_images/498588508273922048/PrR7_4zL_normal.jpeg", `screen_name`:"HBouwstra"})

FIS Alpine Skiing seasons

Introduction