This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/python | |
| import subprocess | |
| import sys | |
| import time | |
| import argparse | |
| parser = argparse.ArgumentParser() | |
| parser.add_argument("team1") | |
| parser.add_argument("team2") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "a": 1, | |
| "nested_dictionary": { | |
| "c": 1, | |
| "d": 2 | |
| }, | |
| "b": 2, | |
| "list": [ | |
| 1, | |
| 2, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Only in inkscape-0.48.4-patched/: patch-clang.diff | |
| diff -crB inkscape-0.48.4/src/2geom/sbasis.h inkscape-0.48.4-patched/src/2geom/sbasis.h | |
| *** inkscape-0.48.4/src/2geom/sbasis.h Fri Jul 8 20:25:09 2011 | |
| --- inkscape-0.48.4-patched/src/2geom/sbasis.h Fri Nov 8 00:42:01 2013 | |
| *************** | |
| *** 75,84 **** | |
| return d[i]; | |
| } | |
| Linear& operator[](unsigned i) { return d.at(i); } | |
| ! Linear const* begin() const { return (Linear const*)&*d.begin();} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/python | |
| import svgutils.transform as sg | |
| import sys | |
| import os | |
| #create new SVG figure | |
| fig = sg.SVGFigure("15cm", "10cm") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @jit(double[:,:2](double[:], double[:], double, double, double)) | |
| def lif_model(ge, gi, dt=dt, vreset=0, vthresh=-40*mV): | |
| v = vreset | |
| mem_pot = np.zeros((len(ge), 2)) | |
| Ee, Ei = 0, -100 | |
| El = -60 | |
| gl = 1/60 | |
| C = 250 | |
| for i in range(len(ge)): | |
| dv = (-gl*(v-El) - ge[i]*(v-Ee) - gi[i]*(v-Ei))*dt/C |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| TMPDIR=$(mktemp -d /tmp/git-latexdiff.XXXXXX) | |
| latexdiff "$1" "$2" > $TMPDIR/diff.tex | |
| pdflatex -interaction nonstopmode -output-directory $TMPDIR $TMPDIR/diff.tex | |
| pdflatex -interaction nonstopmode -output-directory $TMPDIR $TMPDIR/diff.tex | |
| evince $TMPDIR/diff.pdf | |
| rm -rf $TMPDIR |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| When improving the performance of plotting high-dimensional data using | |
| faceted scatter plots, I noticed that much of time was spent on the axis | |
| creation (even 50%!). | |
| On my machine creating 20x20 array of subplots without actually plotting | |
| anything takes about 11 seconds (for comparison plotting 5000 points on | |
| all of them takes only 0.6s!): | |
| import matplotlib | |
| matplotlib.interactive(True) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #from github.com/gdetor/SPySort | |
| def get_jitter(self, evts, center, centerD, centerDD): | |
| """ Estimates the jitter given an event or a matrix of events where | |
| individual events form the rows, a median event and the first two | |
| derivatives of the latter. | |
| **Parameters** | |
| evts : double (array) |