Skip to content

Instantly share code, notes, and snippets.

@cchwala
cchwala / custom_roll.py
Created July 19, 2016 15:55
Speed of numpy.roll vs list with append and pop vs custom numpy rolling using slices
def my_roll(arr, x):
arr[0:-1] = arr[1:]
arr[-1] = x
return arr
@cchwala
cchwala / gist:f2f8c480c910b72bbd4c30c79daf6b97
Created March 28, 2017 09:01
Force update of local and remote fork if they diverged too far from upstream master
# Get the upstream, i.e. main repo, master
git fetch upstream
# Force the current local branch to equal upstream master
git reset --hard upstream/master
# Force update of remote repo. WARNING: THIS CAN BREAK STUFF
git push origin master --force
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cchwala
cchwala / test overflow handling in decode_cf_datetime (clean version).ipynb
Last active July 16, 2017 21:19
test overflow handling in decode_cf_datetime (clean version)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cchwala
cchwala / pandas to_timedelta overflow issue.ipynb
Created July 20, 2017 12:36
Show where pandas `to_timedelta()` overflows without raising an error
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cchwala
cchwala / test for pykrige differences in loop backend between version 1.3.1 and 1.4.0.ipynb
Last active August 24, 2018 15:15
Jupyter notebook to test for pykrige differences in loop backend between version 1.3.1 and 1.4.0
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cchwala
cchwala / Read cmlh5 to dask dataframe.ipynb
Created October 22, 2018 13:21
Manually read one CML from cmlh5 to dask Dataframe
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cchwala
cchwala / Read cmlh5 to dask dataframe.ipynb
Created October 22, 2018 13:22
Manually read in one CML from cmlh5 to dask Dataframe
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cchwala
cchwala / pandas_limit_nan_interpolation_to_max_gap_length.ipynb
Last active January 30, 2019 20:52
pandas_limit_nan_interpolation_to_max_gap_length.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.