Skip to content

Instantly share code, notes, and snippets.

View thriveth's full-sized avatar

T. Emil Rivera-Thorsen thriveth

View GitHub Profile
@meredith-durbin
meredith-durbin / make_color_images.ipynb
Created April 18, 2018 02:42
Make images with HST luminance + DSS color
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kgullikson88
kgullikson88 / error_interpolation.py
Last active August 29, 2015 14:25
Interpolation with error propagation
import numpy as np
from scipy.interpolate import InterpolatedUnivariateSpline as spline
class ErrorPropagationSpline(object):
"""
Does a spline fit, but returns both the spline value and associated uncertainty.
"""
def __init__(self, x, y, yerr, N=1000, *args, **kwargs):
"""
See docstring for InterpolatedUnivariateSpline
@jakevdp
jakevdp / discrete_cmap.py
Last active August 26, 2024 01:46
Small utility to create a discrete matplotlib colormap
# By Jake VanderPlas
# License: BSD-style
import matplotlib.pyplot as plt
import numpy as np
def discrete_cmap(N, base_cmap=None):
"""Create an N-bin discrete colormap from the specified input map"""
@gitaarik
gitaarik / git_submodules.md
Last active September 14, 2024 13:38
Git Submodules basic explanation

Git Submodules basic explanation

Why submodules?

In Git you can add a submodule to a repository. This is basically a repository embedded in your main repository. This can be very useful. A couple of usecases of submodules:

  • Separate big codebases into multiple repositories.
@drj42
drj42 / org-mode-reference-in.org
Created February 6, 2012 23:53
This is a cheat sheet for Emacs org-mode... in org-mode format!