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
@olasitarska
olasitarska / pgessays.py
Created November 18, 2012 10:11
Builds epub book out of Paul Graham's essays.
# -*- coding: utf-8 -*-
"""
Builds epub book out of Paul Graham's essays: http://paulgraham.com/articles.html
Author: Ola Sitarska <ola@sitarska.com>
Copyright: Licensed under the GPL-3 (http://www.gnu.org/licenses/gpl-3.0.html)
This script requires python-epub-library: http://code.google.com/p/python-epub-builder/
"""
@ndarville
ndarville / business-models.md
Last active January 13, 2024 17:27
Business models based on the compiled list at http://news.ycombinator.com/item?id=4924647. I find the link very hard to browse, so I made a simple version in Markdown instead.

Business Models

Advertising

Models Examples
Display ads Yahoo!
Search ads Google
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active June 5, 2024 22:16
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@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'});
@ikwattro
ikwattro / GithubEventAnalysisWithNeo4j.markdown
Last active December 2, 2022 17:49
Github Events Analysis with Neo4j

Github Events Analysis with Neo4j

Imgur

On July 22, Github announced the 3rd Annual Github Data Challenge presenting multiple sources of data available.

This sounded to me a good opportunity to use their available data and import it in Neo4j in order to have a lot of fun at analyzing the data that fits naturally in a graph.

As I work mainly offline or behind military proxies that do not permit me to use the ReST API, I decided to go for the Github Archive available here, you can then download json files representing Github Events on a daily/hour basis.

@rlucioni
rlucioni / senate-vote-graph.py
Last active August 10, 2022 08:59
Senate Vote Scraper and Graph Builder
import json
from itertools import combinations
import requests
import networkx as nx
def get_senate_vote(vote):
# Year can be replaced to fetch votes from different years (e.g., 2013). 1989 is used
# as an example.
@jexp
jexp / __numbers_31.txt
Last active December 14, 2016 00:59
Concurrent Neo4j Performance Tests via HTTP + Cypher (usage: ./_run_ab.sh 4 10000 create_plain.json)
Unusable on spinning disk, these results are from an SSD.
1M x create node+rel in 38s, 26k r/s
1M x create 2 nodes, 2 relationships, 2 properties in 47s, 21k r/s -> 80k records / s
1M x create 2 nodes with labels, 2 rels, 0 properties in 140s, 7k r/s
100k x create 100 rel + node -> 10M in 20s, 5k r/s
1M lookups by id in 22s, 43k r/s
1M lookup by id compiled runtime in 21s, 47k r/s
@dannguyen
dannguyen / game-of-thrones-char-api.py
Last active September 5, 2020 06:45
HBO Game of Thrones API
import requests
import json
from os import makedirs
from os.path import join, exists
from copy import copy
import requests
LIST_ENDPOINT='http://api.viewers-guide.hbo.com/service/charactersList'
FEATURED_ENDPOINT='http://api.viewers-guide.hbo.com/service/charactersFeatured'
DETAIL_ENDPOINT='http://api.viewers-guide.hbo.com/service/characterDetails'
DEFAULT_PARAMS = {'lang': 1}
@graphadvantage
graphadvantage / part1-neo4j-marketing-attribution.md
Last active March 21, 2024 13:23
Neo4j GraphGist: Real-Time Marketing Attribution & Recommendations - Part 1 Marketing Attribution Modeling

##Neo4j GraphGist - Marketing Recommendations Using Last Touch Attribution Modeling and k-NN Binary Cosine Similarity

Neo4j Use Case: Real-Time Marketing Recommendations

#Part 1. Neo4j Marketing Attribution Models

Introduction

Graphs are well suited for marketing analytics - a natural fit since marketing is principally about relationships. In this GraphGist, we'll take a look at how to use Neo4j to make real-time marketing recommendations.

@jexp
jexp / _usage.adoc
Last active February 13, 2017 01:53
Augment Neo4j Browser with Zoom, DataTable and Charts Moved to: https://github.com/jexp/spoon-neo4j/

Add Bookmarklet

Please note there is now a dedicated project for this: https://github.com/jexp/spoon-neo4j/

Adds these features to Neo4j Browser

  • DataTable (search, sort, paginage)

  • Zoom for graphs and query plans (Hold Alt- and drag / pan)

  • Charts (Currently Line-Charts)