Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Benjamin Bengfort bbengfort

🎯
Focusing
View GitHub Profile
View dist_extract.py
#!/usr/bin/env python3
import os
import glob
import argparse
import numpy as np
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
View keyphrases.py
import nltk
import heapq
import string
import gensim
import itertools
from operator import itemgetter
from nltk import *
from nltk.corpus.reader.plaintext import PlaintextCorpusReader
View Penn Treebank II Tags.md
View starwhy.css
/* Graph Stylesheet for Why-Visualization */
.node {
stroke: #fff;
stroke-width: 1.5px;
}
.text, .text-hover {
pointer-events: none;
font: 0.3em sans-serif;
@bbengfort
bbengfort / spinnaker.sql
Last active Dec 23, 2015 — forked from mazelife/spinnaker
Creates a test data set from star delta 0 - selecting ten sample coalesced urls and product names from the shelves for each vendor.
View spinnaker.sql
SELECT product, url FROM
(SELECT ROW_NUMBER() OVER (PARTITION BY vendor ORDER BY product DESC) AS r, t.* FROM
(SELECT vendor.name AS vendor, product.name AS product, COALESCE(shelf.detail_url, shelf.buy_url, NULL) AS url
FROM shelf
JOIN product ON product.id = shelf.product_id
JOIN vendor ON vendor.id = shelf.vendor_id)
AS t)
AS x
WHERE x.r <= 10
View etcinit.dhttp-proxy.sh
#!/bin/bash
DIR=/var/www/YOUR_APP_NAME
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
NODE_PATH=/usr/local/lib/node_modules
case $1 in
start)
nohup "node" "$DIR/proxy.js" 1>>"$DIR/logs/proxy.log" 2>&1 &
echo $! > "$DIR/pids/proxy.pid";
;;