Skip to content

Instantly share code, notes, and snippets.

View endolith's full-sized avatar
😑

endolith

😑
View GitHub Profile

Remove me from this list and please don't contact me again by any means. That means don't e-mail me, don't call me, don't find me at conferences, don't send carrier pigeons to my house with small notes attached to their feet, don't even wave to me in the street if you see me. I'll snub you right there in public and that will be really awkward for you. I can't be held responsible if your friends don't talk to you anymore after that. And no, I don't care how great your position supposedly is, what technology it's using, where it's at, how many celebrities are invested, how close they are to closing funding, how much equity they're offering, how many times Paul Graham has high-fived the founders, how close they are to the Mission in San Francisco, how much the position is paying, how great the company is, who claims they know me that works there, how big their signing bonus is, or who I'll supposedly be working for/with. I'm not interested.

Just once more to be totally clear: don't contact me again. At al

@deeplycloudy
deeplycloudy / audioplayer.py
Created March 21, 2012 20:37
Simple Python audio player with matplotlib and pyaudio
""" Play an audio file with pyaudio while concurrently showing audio playhead
on a matplotlib plot of the audio time series and spectrogram.
Adjust duration and filename in the script below to reflect your audio file.
v. 0.1
21 Mar 2012
Eric Bruning
"""
@sblom
sblom / fracgen.m
Created April 12, 2012 17:47
Stern–Brocot generator: generate all positive rational numbers
frac[1] = {{0, 1}, {1, 1}, {1,0}}
frac[n_] := frac[n] = frac[n - 1] ~Riffle~ newFracs[n - 1]
newFracs[n_] := Apply[Plus, #] & /@ Partition[frac[n], 2, 1]
(* Example usage: *)
Map[Apply[Divide, #] &, frac[14]]
(*
A few very surprising things happen here:
@jul
jul / spect2.py
Created June 24, 2012 14:55
dumb spectogram
from scikits.audiolab import Sndfile
import numpy as np
import pylab as plt
import csv
import matplotlib.mlab as mlab
from math import floor, log
#NFFT windows make calculus faster if a power of 2
closest_2_power=lambda x : 1<<int(floor(log(x,2)))
def load_freq(fn="freq.csv"):
#-*- coding: utf8 -*-
# implementation of recipe on: http://www.musicdsp.org/files/Audio-EQ-Cookbook.txt
import numpy as n, pylab as p
# variaveis de parametrizacao
fa=44100.
f=2.
# tipos: LPF, HPF, BPF, BPF2, notch
# APF, peakingEQ, lowShelf, highShelf
@kjordahl
kjordahl / bootstrap.ipynb
Created October 24, 2012 18:20
Gaussian process bootstrap plots in iPython notebook
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@boppreh
boppreh / balloontip.py
Created November 2, 2012 11:35 — forked from wontoncc/balloontip.py
Balloon tip module, Python, using win32gui. Display a notification in the tray bar and quits after 10 seconds.
# -- coding: utf-8 --
from win32api import *
from win32gui import *
import win32con
import sys, os
import struct
import time
class WindowsBalloonTip:
@ozh
ozh / gist:4131243
Created November 22, 2012 13:44
Create dot files/directories (ie .file) on Windows

#How to create a .file or .folder on Windows

There are several ways

1. Rename

  • Create file.txt
  • Rename to .file., the last dot will be dropped, you'll have .file

Works the same with a file or a directory.

@stefanv
stefanv / reverse_cmap.py
Created November 26, 2012 04:24
Reverse colormap
from skimage import io as sio
import skimage
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
img = skimage.img_as_float(sio.imread('im2.tif'))
@zxjinn
zxjinn / GenerateDiceware.sh
Created January 5, 2013 21:32
This is a way to generate a user-defined diceware passphrase list, instead of the one found at http://world.std.com/~reinhold/diceware.html. Only currently supports 5 dice. Tested on Ubuntu 12.04.
#!/bin/bash
DICTFN="/usr/share/dict/words"
NUMBERZ="1 2 3 4 5 6"
NUMDICE=5
WORDLIST=""
DICEARRAY=""
# TODO allow dynamic number of dice (up to a point, max size of dictfile)