Skip to content

Instantly share code, notes, and snippets.

View alexlib's full-sized avatar
:octocat:
Working

Alex Liberzon alexlib

:octocat:
Working
View GitHub Profile
@sixtenbe
sixtenbe / analytic_wfm.py
Last active May 27, 2024 01:24 — forked from endolith/peakdet.m
Peak detection in Python
#!/usr/bin/python2
# Copyright (C) 2016 Sixten Bergman
# License WTFPL
#
# This program is free software. It comes without any warranty, to the extent
# permitted by applicable law.
# You can redistribute it and/or modify it under the terms of the Do What The
# Fuck You Want To Public License, Version 2, as published by Sam Hocevar. See
@zerokarmaleft
zerokarmaleft / authoryear.bib
Created October 26, 2012 17:03
LaTeX: [author year] numbered references using natbib
@book{Jacky:1996,
author = {Jacky, Jonathan},
title = {The Way of Z: Practical Programming with Formal Methods},
year = {1996},
publisher = {Cambridge University Press},
address = {New York, NY, USA},
}
@rossant
rossant / numpy_tricks
Last active February 26, 2017 19:28
Numpy performance tricks
{
"metadata": {
"name": "numpy_tricks"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
@audreyfeldroy
audreyfeldroy / pypi-release-checklist.md
Last active February 23, 2023 15:03
My PyPI Release Checklist
  • Update HISTORY.md
  • Commit the changes:
git add HISTORY.md
git commit -m "Changelog for upcoming release 0.1.1."
  • Update version number (can also be minor or major)
bumpversion patch
@minrk
minrk / nbstripout
Last active June 6, 2023 06:23
git pre-commit hook for stripping output from IPython notebooks
#!/usr/bin/env python
"""strip outputs from an IPython Notebook
Opens a notebook, strips its output, and writes the outputless version to the original file.
Useful mainly as a git filter or pre-commit hook for users who don't want to track output in VCS.
This does mostly the same thing as the `Clear All Output` command in the notebook UI.
LICENSE: Public Domain
@sloria
sloria / bobp-python.md
Last active July 21, 2024 04:44
A "Best of the Best Practices" (BOBP) guide to developing in Python.

The Best of the Best Practices (BOBP) Guide for Python

A "Best of the Best Practices" (BOBP) guide to developing in Python.

In General

Values

  • "Build tools for others that you want to be built for you." - Kenneth Reitz
  • "Simplicity is alway better than functionality." - Pieter Hintjens
@jeanpat
jeanpat / MFISH_colorCombination.ipynb
Created March 20, 2014 14:41
An ipython notebook showing how to combine five greyscaled images into one RGB MFISH image using scikit-image
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@alexlib
alexlib / test_of_iter_trajectories_ptv_is.ipynb
Last active October 12, 2016 16:42
Another example of using `postptv` package from the OpenPTV software repository. This time it demonstrates the use of the generator instead of a list to keep the very long lists of trajectories.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@alexlib
alexlib / dynamic_masking_openpiv_python.ipynb
Created June 1, 2014 21:02
Dynamic masking of the large reflections, moving body, organisms in PIV images, for use with OpenPIV-Python and OpenPTV-Python packages
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jobovy
jobovy / post-commit
Last active October 3, 2016 17:10
Modified version of Andy Casey's (@andycasey) post-commit hook to run latexdiff between different revisions of a latex draft (see http://astrowizici.st/blog/2013/10/04/publishing-with-git); works on Macs and when the paper is in a sub-directory of the main git repository.
#!/bin/sh
# Post-commit hook for revision-awsm-ness
function gettempfilename()
{
tempfilename=$1-$RANDOM$RANDOM.tex
if [ -e $tempfilename ]
then
tempfilename=$(gettempfilename)