Skip to content

Instantly share code, notes, and snippets.

View freeeve's full-sized avatar

Eve Freeman freeeve

  • Linden, VA
View GitHub Profile
@freeeve
freeeve / aaaa-front-loading-washing-machines-are-evil.md
Last active December 16, 2023 20:34
the saga of the busted front loading maytag washing machine

I have been trying to fix my dad's washing machine for more than a week--it originally got stuck last Thursday with an error message that came on the screen and the door locked (it's a front loading washing machine).

I read up about the error, which is E01 -> F09, which means generally something like "problem in the draining process"-- could be a clog or a busted pump, or apparently even too much soap can cause it. image of manually draining

I managed to break the handle of this drain plug cap because I was using the metal part of the pliers to turn it, like I saw in some youtube video, and it cracked and started leaking, so I ordered a new piece for that, which came wednesday. Oops! image of broken cap

#!/bin/python3
import requests
latest_json = requests.get('https://launchermeta.mojang.com/mc/game/version_manifest.json').json().get('versions')[0].get('url')
latest_server_url = requests.get(latest_json).json().get('downloads').get('server').get('url')
print(latest_server_url)
// merge movies
LOAD CSV WITH HEADERS FROM 'http://data.neo4j.com.s3.amazonaws.com/advanced/movies/new_movies.csv' AS row
with toFloat(row.avgVote) as avgVote, toInteger(row.releaseYear) as releaseYear, split(row.genres, ":") as genres, toInteger(row.movieId) as id,
row.title as title
merge (m:Movie {id:id})
set m.title = title,m.avgVote = avgVote,m.releaseYear=releaseYear,m.genres = genres
return count(1)
// merge people
LOAD CSV WITH HEADERS FROM 'http://data.neo4j.com.s3.amazonaws.com/advanced/movies/people.csv' as row
@freeeve
freeeve / restaurant_recommendation.adoc
Last active July 15, 2017 20:14 — forked from jexp/restaurant_recommendation.adoc
Restaurant Recommendation GraphGist

Restaurant Recommendations

Here’s an updated gist.

Here are some changes.

id,name
1,"Eve"
2,"Thomas"
3,"Ryan"
// get an idea of schema for node properties
match (n)
with n, keys(n) as ks
limit 100000
unwind ks as k
with n, k
order by k
return distinct labels(n), collect(distinct k)
// query to get actors/directors
@freeeve
freeeve / .block
Last active February 27, 2017 13:19 — forked from mbostock/.block
Population Pyramid
license: gpl-3.0
@freeeve
freeeve / constraints and indexes
Last active November 12, 2016 22:12
for the data import
create constraint ON ( movie:Movie ) ASSERT movie.id IS UNIQUE;
create constraint ON ( person:Person ) ASSERT person.id IS UNIQUE;
create index ON :Movie(title);
create index ON :Person(name);
// migrate genres to nodes
match (m:Movie)
unwind m.genres as genre
merge (g:Genre {name:genre})
@freeeve
freeeve / gist:455002a28bafb319ba2816d5c920cf3d
Last active September 16, 2016 00:04
movie import.cypher;
create index on :Movie(movieId);
create index on :Person(personId);
load csv with headers from 'file:///people.csv' as record
merge (p:Person {personId:record.personId})
set p = record;
load csv with headers from 'file:///movies.csv' as record
merge (m:Movie {movieId:record.movieId})
match (n)
with n, keys(n) as keys
limit 100000
unwind keys as key
with n, key
order by id(n), key
with n, collect(key) as keys
return distinct labels(n), keys, count(1)