Skip to content

Instantly share code, notes, and snippets.

View smutch's full-sized avatar

Simon Mutch smutch

View GitHub Profile
@smutch
smutch / .slate
Created November 4, 2015 05:03
dotfiles
config defaultToCurrentScreen true
config windowHintsShowIcons true
config windowHintsIgnoreHiddenWindows false
config windowHintsSpread true
# Monitor Aliases
alias mon-laptop 1440x900
alias mon-thunderbolt 2560x1440
alias mon-dell 1920x1080
@smutch
smutch / .gitconfig
Last active November 4, 2015 00:42
My git aliases
[alias]
lg = log --graph --format='%Cred%h%Creset %C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
standup = log --since '1 day ago' --oneline --author 'YOUR_EMAIL_HERE'
standup-week = log --since '7 day ago' --oneline --author 'YOUR_EMAIL_HERE'
latest = for-each-ref --sort=-committerdate --format='%(committerdate:short) %(refname:short) [%(committername)]'
b = branch
ba = branch -a
d = !git diff | view -
@smutch
smutch / compare_to_old.ipynb
Last active March 28, 2016 23:04
py: compare to old
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@smutch
smutch / compare_runs.ipynb
Last active March 28, 2016 23:04
py: compare runs
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.
@smutch
smutch / sobacchi_params_from_run.py
Created May 24, 2015 13:14
py: Sobacchi global model params fitting.
#!/usr/bin/env python
"""Calculate the Sobacchi & Mesinger global model parameters from a run.
Usage: sobacchi_params_from_run.py <fname>
"""
import numpy as np
import matplotlib.pyplot as plt
from dragons import meraxes
@smutch
smutch / grab_reion_data.py
Created May 3, 2015 06:05
py: read grids and global_xH using dragons
import numpy as np
from dragons import meraxes
fname = "/lustre/projects/p021_astro/smutch/meraxes/tiamat/paper_runs/uvb/output/meraxes.hdf5"
# grab the snapshot list
snaplist, _, _ = meraxes.read_snaplist(fname)
# read all of the global_xH values
global_xH = meraxes.read_global_xH(fname, snaplist, quiet=True)
@smutch
smutch / read_grid.c
Created January 15, 2015 10:34
c: simple read of gbpCode grid
#include <stdlib.h>
#include <stdio.h>
#include <stdbool.h>
#include <math.h>
#define SNAPSHOT 99
#define INPUT_DIR "/home/gpoole/SSimPL/simulations/GiggleZ/GiggleZ_HR/grids/"
/**
* Compile with:
/*! normalize.css v2.1.3 | MIT License | git.io/normalize */
/* ==========================================================================
HTML5 display definitions
========================================================================== */
/**
* Correct `block` display not defined in IE 8/9.
*/
@smutch
smutch / tmux.md
Last active August 29, 2015 14:08 — forked from andreyvit/tmux.md

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a