Skip to content

Instantly share code, notes, and snippets.

Ryan meowklaski

Block or report user

Report or block meowklaski

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@meowklaski
meowklaski / updatepypi.md
Last active Jan 8, 2017
Updating a pypi package
View updatepypi.md
  1. Tag the release: git tag x.x -m "Message."

  2. Push tag: git push --tags origin master

  3. Upload new package: python setup.py sdist upload -r pypi

@meowklaski
meowklaski / sliding_window.py
Last active Mar 14, 2019
Use numpy to produce a view from a sliding, striding window over an array of arbitrary dimensions
View sliding_window.py
def sliding_window_view(arr, window_shape, steps):
""" Produce a view from a sliding, striding window over `arr`.
The window is only placed in 'valid' positions - no overlapping
over the boundary.
Parameters
----------
arr : numpy.ndarray, shape=(...,[x, (...), z])
The array to slide the window over.
You can’t perform that action at this time.