Skip to content

Instantly share code, notes, and snippets.

View bbengfort's full-sized avatar
🎯
Focusing

Benjamin Bengfort bbengfort

🎯
Focusing
View GitHub Profile
@bbengfort
bbengfort / dist_extract.py
Created August 22, 2019 18:42 — forked from stewartm888/dist_extract.py
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
import nltk
import heapq
import string
import gensim
import itertools
from operator import itemgetter
from nltk import *
from nltk.corpus.reader.plaintext import PlaintextCorpusReader
/* 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 December 23, 2015 05:39 — 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.
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
#!/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";
;;