Skip to content

Instantly share code, notes, and snippets.

View techstep's full-sized avatar
🤔

Rob Jefferson techstep

🤔
View GitHub Profile
@techstep
techstep / gdp.js
Last active December 21, 2015 13:39
Task: get GDP data from the new JSON-ified FRED API. Works on command line in node, but not so much in a browser (Chrome 29).
function gdp_get() {
var fred_api_key = "abcdefghijklmnopqrstuvwxyz0123456789";
var fred_gdp_url = "http://api.stlouisfed.org/fred/series/observations?series_id=GNPCA&api_key="+fred_api_key+"&file_type=json&callback=?";
var x = $.getJSON(fred_gdp_url, function(data, status){
return data;
});
var gdp = '';
@techstep
techstep / nfl-import.sql
Last active April 5, 2016 14:59
Schema conversion for Dennis Erny's football play database from MySQL to SQLite3.
.mode csv
.import BLOCKS.csv blocks
.import COMPS.csv comps
.import CONVS.csv convs
.import CORE.csv core
.import DBACKS.csv dbacks
.import DEFENSE.csv defense
.import DRIVES.csv drives
.import FDOWNS.csv fdowns
.import FGXP.csv fgxp
@techstep
techstep / julia_log_2014_08_06
Created August 6, 2014 13:34
homebrew-julia logs for OS X 10.10 (~/Library/Logs/Homebrew/julia/{01,02}.make)
mkdir -p /private/tmp/julia-5xWM/usr/lib
mkdir -p /private/tmp/julia-5xWM/deps/SuiteSparse-SYSTEM/lib
cd /private/tmp/julia-5xWM/deps/SuiteSparse-SYSTEM/lib && \
rm -f /private/tmp/julia-5xWM/usr/lib/lib{amd,cholmod,colamd,spqr,umfpack}.dylib && \
clang -stdlib=libc++ -mmacosx-version-min=10.7 -m64 -shared -Xlinker -all_load /usr/local/opt/suite-sparse64-julia/lib/libamd.a -o /private/tmp/julia-5xWM/usr/lib/libamd.dylib && \
install_name_tool -id @rpath/libamd.dylib /private/tmp/julia-5xWM/usr/lib/libamd.dylib && \
clang -stdlib=libc++ -mmacosx-version-min=10.7 -m64 -shared -Xlinker -all_load /usr/local/opt/suite-sparse64-julia/lib/libcolamd.a -o /private/tmp/julia-5xWM/usr/lib/libcolamd.dylib && \
install_name_tool -id @rpath/libcolamd.dylib /private/tmp/julia-5xWM/usr/lib/libcolamd.dylib && \
clang++ -stdlib=libc++ -mmacosx-version-min=10.7 -m64 -shared -Xlinker -all_load /usr/local/opt/suite-sparse64-julia/lib/libsuitesparseconfig.a /usr/local/opt/suite-sparse64-julia/lib/libcholmod.a -o /privat
function condalist -d 'List conda environments.'
for dir in (ls $HOME/anaconda/envs)
echo $dir
end
end
function condactivate -d 'Activate a conda environment' -a cenv
if test -z $cenv
echo 'Usage: condactivate <env name>'
return 1
@techstep
techstep / 2014-11-11-julia_install.log
Created November 11, 2014 19:46
Output from brew install --HEAD julia
$ brew install --HEAD julia
==> Installing julia from staticfloat/homebrew-julia
==> Using Homebrew-provided fortran compiler.
This may be changed by setting the FC environment variable.
==> Building with an alternative Fortran compiler
This is unsupported.
==> Building with an alternative Fortran compiler
This is unsupported.
==> Cloning https://github.com/JuliaLang/julia.git
Cloning into '/Library/Caches/Homebrew/julia--git'...
@techstep
techstep / 2015-04-16-julia-head.log
Last active August 29, 2015 14:19
output from brew install -v -HEAD julia and config information
convexhull:Homebrew rjefferson$ HOMEBREW_MAKE_JOBS=1 brew install -v --HEAD julia > 2015-04-16-julia-head.log 2>&1
convexhull:Homebrew rjefferson$ cat 2015-04-16-julia-head.log
==> Installing julia from staticfloat/homebrew-julia
==> Using Homebrew-provided fortran compiler.
This may be changed by setting the FC environment variable.
==> Building with an alternative Fortran compiler
This is unsupported.
==> Building with an alternative Fortran compiler
This is unsupported.
==> Cloning https://github.com/JuliaLang/julia.git