Skip to content

Instantly share code, notes, and snippets.

View danielballan's full-sized avatar

Dan Allan danielballan

View GitHub Profile
# This is Dan Allan's setting of Liana Vaccari's plotting style preferences.
# Updated August 2014
#
# Invoke in Python matplotlib like so:
#
# import matplotlib as mpl
#
# mpl.style.use('https://gist.github.com/danielballan/eb09ae11cfa1ad34163a/raw')
#
# This feature is only available in matplotlib version 1.4 or higher.
#!/bin/bash
# Bash script to install latest version of ffmpeg and its dependencies on Ubuntu 12.04 or 14.04
# Inspired from https://gist.github.com/faleev/3435377
# Remove any existing packages:
sudo apt-get -y remove ffmpeg x264 libav-tools libvpx-dev libx264-dev yasm
# Get the dependencies (Ubuntu Server or headless users):
sudo apt-get update
@danielballan
danielballan / gist:74e0de4312db9e10642b
Created October 14, 2014 16:47
matplotlib-0.14.1rc1 fail
distutils.errors.DistutilsError: Setup script exited with error: Command "gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DHAVE_NPY_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -Inumpy/core/include -Ibuild/src.linux-i686-2.7/numpy/core/include/numpy -Inumpy/core/src/private -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -Inumpy/core/include -I/home/dallan/anaconda/envs/bare/include/python2.7 -Ibuild/src.linux-i686-2.7/numpy/core/src/private -Ibuild/src.linux-i686-2.7/numpy/core/src/private -Ibuild/src.linux-i686-2.7/numpy/core/src/private -Ibuild/src.linux-i686-2.7/numpy/core/src/private -c build/src.linux-i686-2.7/numpy/core/src/multiarray/lowlevel_strided_loops.c -o build/temp.linux-i686-2.7/build/src.linux-i686-2.7/numpy/core/src/multiarray/lowlevel_strided_loops.o" failed with exit status 1
@danielballan
danielballan / leheny-serif.mplstyle
Last active August 29, 2015 14:07
Leheny Lab "House Style" for Python matplotlib plots -- serif version
# This is Dan Allan's setting of Professor Robert Leheny's plotting style preferences.
# Updated August 2014
#
# Invoke in Python matplotlib like so:
#
# import matplotlib as mpl
#
# mpl.style.use('https://gist.github.com/danielballan/be066529de85e87a5fe7/raw')
#
# This feature is only available in matplotlib version 1.4 or higher.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@danielballan
danielballan / leheny-safe
Last active August 29, 2015 14:08
Leheny Plotting Style - Safe Version
# This is Dan Allan's setting of Professor Robert Leheny's plotting style preferences.
#
# THIS IS THE "SAFE" VERSION, WHICH IS NOT AS PRETTY AS OTHER VERIONS,
# BUT LESS LIKELY TO RUN INTO ERRORS ON WINDOWS OR SYSTEMS WITHOUT A GOOD
# LATEX INSTALLATION.
#
# Updated October 2014
#
# Invoke in Python matplotlib like so:
#
@danielballan
danielballan / profile.py
Created October 27, 2014 17:30
Photoactivation Project - Intensity Profile Analysis Framework
from __future__ import division
import statsmodels.api as sm
import matplotlib.pyplot as plt
from lmfit import Model
import numpy as np
from numpy import exp, convolve
import pandas as pd
from pandas import Series, DataFrame
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.