Skip to content

Instantly share code, notes, and snippets.

View mwcraig's full-sized avatar

Matt Craig mwcraig

View GitHub Profile
# Write the benchmarking functions here.
# See "Writing benchmarks" in the asv docs for more information.
from pathlib import Path
from tempfile import TemporaryDirectory
import numpy as np
import bottleneck as bn
from astropy.io import fits
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.
@mwcraig
mwcraig / try_blinking_cycling_through_images.ipynb
Created August 1, 2019 13:59
Quick try at blinking/cycling through images
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
### Define a function with kwargs
def kwargs_fun(**kwargs):
# Just print the content of kwargs
print(kwargs)
# Now call kwargs_fun in a few goofy ways and see what happens:
@mwcraig
mwcraig / shooting.py
Last active April 3, 2019 12:53
Shooting method of solving ODE with boundary conditions
"""
Code for solving a second order differntial equation using RK2, I then modified
it to solve for an initial launch velocity given a final target height for a"""
Code for solving a second order differntial equation using RK2, I then modified
it to solve for an initial launch velocity given a final target height for a
projectile fired straight up.
"""
import numpy as np
import matplotlib.pyplot as plt
@mwcraig
mwcraig / bqplot_try_2_semi-presentable.ipynb
Created March 11, 2019 02:46
A hacky implementation of a bqplot image viewer
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.
@mwcraig
mwcraig / generate_noisy_data.ipynb
Last active December 5, 2018 23:11
Sample of data sets
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.