Skip to content

Instantly share code, notes, and snippets.

View waylonflinn's full-sized avatar

Waylon Flinn waylonflinn

View GitHub Profile
@waylonflinn
waylonflinn / lh.py
Last active December 20, 2020 21:06 — forked from prefiks/lh.py
Valve Index Lighthouse Control Script for Linux (Might Work on Windows Too)
#!/usr/bin/python3
# Usage:
#lh.py on
#lh.py off
# with no arguments, state will be toggled (off -> on, on -> off)
#lh.py
from bluepy import btle
import sys
@waylonflinn
waylonflinn / ipynb_output_filter.py
Last active May 25, 2018 17:45
Make ipython notebook files place nice with git. Remove output from notebooks when doing diffs and commits.
#! /usr/bin/env python
# this script filters output from ipython notebooks, for use in git repos
# http://stackoverflow.com/questions/18734739/using-ipython-notebooks-under-version-control
#
# put this file in a `bin` directory in your home directory, then run the following commands:
#
# chmod a+x ~/bin/ipynb_output_filter.py
# echo -e "*.ipynb \t filter=dropoutput_ipynb" >> ~/.gitattributes
# git config --global core.attributesfile ~/.gitattributes
# git config --global filter.dropoutput_ipynb.clean ~/bin/ipynb_output_filter.py
@waylonflinn
waylonflinn / camping-oklahoma.md
Last active April 15, 2018 00:00
Camping Spots in Oklahoma

New (and Unimproved?)

Lake Murray / Ardmore

South on I-35, 2 hours

  • Ski Jump Campground (unimproved), $14 / night

info | map

@waylonflinn
waylonflinn / How-to-Edit-Gameplay-Videos-for-YouTube
Last active August 4, 2017 21:55
How do you take some raw gameplay footage and turn it into an interesting YouTube video?
# How to Edit Gameplay Footage
## Identify the Narratives
There will likely be at least four narratives going on at any one time.
1. Channel/life narrative
a. Who are you as a person?
b. What's this channel about?
2. Personal/life narrative (more temporally local than the channel narrative)
@waylonflinn
waylonflinn / install-python-data-science.sh
Last active December 4, 2016 05:27
Install Data Science and NLP libraries for python3 in a virtualenv (Numpy, Scipy, Matplotlib, Pandas, Gensim, OpenBLAS and PyTables)
#!/usr/bin/env bash
## create an ubuntu 14.04 hvm instance, then from your home directory:
# 1. download this script
# wget https://gist.githubusercontent.com/waylonflinn/506f563573600d944923/raw/install-python-data-science.sh
# 2. make it executable
# chmod a+x install-python-data-science.sh
@waylonflinn
waylonflinn / al-pastor.md
Last active September 16, 2016 19:35
Authentic Al Pastor, Crockpot Style

Authentic Al Pastor, Crockpot Style

Ingredients

  • 1 pineapple

  • 1 bottle of beer

  • 1/4 cup vinegar

  • 2 pounds of pork (loin, shoulder or butt)

  • 1/2 cup onion

@waylonflinn
waylonflinn / HipsterMLMetrics.ipynb
Last active January 2, 2016 17:49
iPython Notebook Introduction to using the RankEval python package: a collection of metrics for evaluating Machine Learned rankings. To properly view it go here: http://nbviewer.ipython.org/gist/waylonflinn/8338948
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@waylonflinn
waylonflinn / nodeload.js
Created November 14, 2012 02:58
Patched nodeload.js for Windows
#!/usr/bin/env node
var util=require('util'),http=require('http'),url=require('url'),fs=require('fs'),path=require('path'),events=require('events'),querystring=require('querystring'),child_process=require('child_process');var EventEmitter=events.EventEmitter;var START=new Date();var BUILD_AS_SINGLE_FILE=true;var BUILD_AS_SINGLE_FILE,NODELOAD_CONFIG;if(!BUILD_AS_SINGLE_FILE){var EventEmitter=require('events').EventEmitter;}
exports.quiet=function(){NODELOAD_CONFIG.QUIET=true;return exports;};exports.usePort=function(port){NODELOAD_CONFIG.HTTP_PORT=port;return exports;};exports.disableServer=function(){NODELOAD_CONFIG.HTTP_ENABLED=false;return exports;};exports.setMonitorIntervalMs=function(milliseconds){NODELOAD_CONFIG.MONITOR_INTERVAL_MS=milliseconds;return exports;};exports.setAjaxRefreshIntervalMs=function(milliseconds){NODELOAD_CONFIG.AJAX_REFRESH_INTERVAL_MS=milliseconds;return exports;};exports.disableLogs=function(){NODELOAD_CONFIG.LOGS_ENABLED=false;return exports;};exports.setSlaveUpdateIntervalMs=fu
@waylonflinn
waylonflinn / filter-aggregate.py
Created September 30, 2015 16:38
Filtering and Aggregation with Bquery
import bcolz
import bquery
data_path = '/some/place/with/bcolz/data'
c_table = bquery.ctable(rootdir=data_path)
## Filter
# create the criteria
@waylonflinn
waylonflinn / why-node.md
Last active September 18, 2015 21:33
why node?

Why node.js?

Assumptions:

  • three things matter: developer productivity, production performance, infrastructure cost

    • developer productivity: prototyping, productionifying, maintenance
    • production performance: latency, concurrency
    • infrastructure cost: hardware baseline, hardware scaling, operations (dev-ops) overhead
  • same code on client and server (developer productivity)

    • no context switch