Skip to content

Instantly share code, notes, and snippets.

View kforeman's full-sized avatar

Kyle Foreman kforeman

View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
\documentclass{article}
\usepackage{float}
\usepackage{hyperref}
\usepackage{amsbsy}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{tikz}
\usetikzlibrary{positioning}
\usepackage{fancyhdr}
@kforeman
kforeman / histogram.ipynb
Created May 7, 2014 21:52
map-reduce for efficient histograms in python
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kforeman
kforeman / index.html
Created September 9, 2011 03:50
treemap transitions
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>Treemap</title>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js"></script>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.layout.js"></script>
<script type="text/javascript" src="http://simiantics.net/d3/lib/jquery/jquery.min.js"></script>
<script type="text/javascript" src="http://simiantics.net/d3/lib/jquery-ui/jquery-ui.min.js"></script>
<style type="text/css"> @import url("http://simiantics.net/d3/lib/jquery-ui/jquery-ui.css"); text { font-family: sans-serif; } </style>
<script type="text/javascript" src="http://simiantics.net/treemap_USA.js"></script>
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kforeman
kforeman / Dockerfile
Last active December 13, 2017 07:24
demo Docker container with working PyMB
FROM ubuntu:17.04
MAINTAINER Kyle Foreman <kfor@uw.edu>
# update/install packages
RUN apt-get update --fix-missing && \
apt-get install --yes \
wget \
curl \
bzip2 \
import numpy as np
import PyMB
# create an empty model
m = PyMB.model(name='linreg')
# code for a simple linear regression
linreg_code = '''
#include <TMB.hpp>
template<class Type>
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.