Skip to content

Instantly share code, notes, and snippets.

View schlady's full-sized avatar

schlady schlady

  • Greifswald, Germany
View GitHub Profile
'''
Code snippet to plot multiple triangle's in Matplotlib using different methods.
'''
import time
import sys
import matplotlib.pyplot as pp
import numpy as np
from matplotlib.collections import PolyCollection
import random
@schlady
schlady / Makefile
Created February 23, 2012 09:35 — forked from yy/Makefile
A sample makefile for a paper in LaTeX.
TEX = pdflatex -interaction nonstopmode
BIB = bibtex
GS = gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite
COVER = cover
PAPER = paper_main
SUPP = paper_supp
BIBFILE = temp.bib
BUNDLE = paper_bundle.pdf
@schlady
schlady / peakdetect.py
Created January 7, 2012 21:18 — forked from sixtenbe/analytic_wfm.py
Peak detection in Python
import numpy as np
def peakdetect(y_axis, x_axis = None, lookahead = 500, delta = 0):
"""
Converted from/based on a MATLAB script at http://billauer.co.il/peakdet.html
Algorithm for detecting local maximas and minmias in a signal.
Discovers peaks by searching for values which are surrounded by lower
or larger values for maximas and minimas respectively