Skip to content

Instantly share code, notes, and snippets.

View mwcraig's full-sized avatar

Matt Craig mwcraig

View GitHub Profile
### 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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mwcraig
mwcraig / run_profile_e73b93e.ipynb
Created August 14, 2018 18:55
Memory profile, PR astropy/ccdproc#630 -- Reduce number of open files and del some variables
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mwcraig
mwcraig / run_profile_df233f3.ipynb
Created August 14, 2018 18:54
Memory profile, PR astropy/ccdproc#642 , AFTER adding memory factor but BEFORE additional factor of 1.5
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mwcraig
mwcraig / run_profile_a73e72f.ipynb
Last active August 14, 2018 18:55
Memory profile, PR astropy/ccdproc#642, AFTER modification of memory factor by additional factor of 1.5
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.