Skip to content

Instantly share code, notes, and snippets.

@belevtsoff
belevtsoff / warping.py
Created December 27, 2018 13:54
Warping of discrete functions using piece-wise linear functions (and linear interpolation)
"""Classes for frequency warping"""
import numpy as np
import scipy
def create_pl_warping_func(x, srcx, tgtx):
"""Creates a piece-wise linear warping function
Parameters
@belevtsoff
belevtsoff / gist:0bd15cb2574605bc940a
Created August 20, 2014 15:26
unfinished nipype wrapper
from earlpipeline.backends import base
# nipype imports
# ...
hello_iface=Function(input_names=[],
output_names=['out_file'],
function=Hello)
class HelloUnit(base.GenericUnit):
@belevtsoff
belevtsoff / mpl1.0.1_libpng1.5.patch
Created April 3, 2012 18:01
matplotlib 1.0.1 patches for libpng>=1.5 and python 2.7.2's tk support
--- matplotlib-1.0.1/src/_png.cpp 2010-10-12 19:14:42.000000000 +0300
+++ matplotlib-1.0.1.patched/src/_png.cpp 2012-04-03 20:27:10.310604265 +0300
@@ -1,3 +1,4 @@
+/* -*- mode: c++; c-basic-offset: 4 -*- */
/* For linux, png.h must be imported before Python.h because
png.h needs to be the one to define setjmp.
@@ -350,10 +351,10 @@
png_set_sig_bytes(png_ptr, 8);
png_read_info(png_ptr, info_ptr);