Skip to content

Instantly share code, notes, and snippets.

View btel's full-sized avatar
💡
open to freelance opportunities

Bartosz Telenczuk btel

💡
open to freelance opportunities
View GitHub Profile
@btel
btel / gist:6053648
Created July 22, 2013 12:58 — forked from anonymous/gist:5059144
edit viewBox in svg_utils
import matplotlib as pyplot
from lxml import etree
#do some plotting
plt.savefig(fig_file)
width, height = '3.8in', '2.8in'
with file(fig_file, 'r') as fid:
tree = etree.parse(fid)
#!/bin/bash
python $*
fname="${@: -1}"
width=`identify -format %w $fname`
gitversion=`git rev-parse --short HEAD`
origin_name=`basename $(git remote show -n origin | grep Fetch | cut -d: -f2-)`
branch=`git rev-parse --abbrev-ref HEAD`
@btel
btel / peakdetect.py
Created November 11, 2015 00:34 — forked from sixtenbe/analytic_wfm.py
Peak detection in Python
import numpy as np
from math import pi, log
import pylab
from scipy import fft, ifft
from scipy.optimize import curve_fit
i = 10000
x = np.linspace(0, 3.5 * pi, i)
y = (0.3*np.sin(x) + np.sin(1.3 * x) + 0.9 * np.sin(4.2 * x) + 0.06 *
np.random.randn(i))
@btel
btel / README
Last active February 4, 2016 13:52 — forked from alperyeg/line_prof_cch_results.txt
profiling of elephant.spike_train_correlation.cross_correlation_histogram
To see simple statistics, run without arguments:
$ python profile_cch.py
To save results to file, provide a filename:
$ python profile_cch.py my.csv
You can compare results from different version. First checkout a different branch of elephant, then run the benchmark again:
@btel
btel / jekyll.py
Created February 9, 2016 17:05 — forked from cscorley/jekyll.py
IPython to Jekyll Markdown
try:
from urllib.parse import quote # Py 3
except ImportError:
from urllib2 import quote # Py 2
import os
import sys
BLOG_DIR = os.environ['BLOG_DIR']
# BLOG_DIR = '/Users/cscorley/git/cscorley.github.io/'
@btel
btel / view_or_copy.ipynb
Last active July 4, 2016 15:17 — forked from anonymous/copy_or_view.ipynb
copy or view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.