Skip to content

Instantly share code, notes, and snippets.

@lukeyeager
lukeyeager / Dockerfile
Last active February 2, 2017 20:26
NVcaffe on CentOS7
FROM nvidia/cuda:7.0-devel-centos7
RUN yum install -y epel-release
RUN yum install -y gcc gcc-c++ make cmake \
git \
gflags-devel glog-devel \
opencv-devel \
boost-devel \
openblas-devel \
FROM nvidia/cuda:8.0-cudnn5-devel-ubuntu16.04
MAINTAINER Luke Yeager <lyeager@nvidia.com>
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential \
ca-certificates \
curl \
git \
emacs \
# Create a new virtualenv
# Allow it to use system standard packages
virtualenv venv --system-site-packages
# Activate the new environment
source venv/bin/activate
# Install any requirements that aren't already satisfied
pip install -r requirements.txt
#!/usr/bin/env python2
import argparse
import csv
from collections import OrderedDict
import os.path
import re
def parse_timings(input_filename, output_filename):
@lukeyeager
lukeyeager / git-lg.cfg
Last active June 1, 2016 20:39
My version of `git lg`
# Add to ~/.gitconfig
[alias]
# http://stackoverflow.com/a/9074343/2404152
# Show parents of HEAD (1 line per commit)
lg1 = log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)'
# Show parents of HEAD (2 lines per commit)
lg2 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)'
lg = !"git lg1"
# Show all commits (1 line per commit)
lga = !"git lg --all"
@lukeyeager
lukeyeager / compare_versions.py
Created September 30, 2015 21:39
Nobody sorts semantic versions correctly
#!/usr/bin/env python
import distutils.version
import pkg_resources
import random
import semantic_version
import sys
versions = sys.argv[1:]