Skip to content

Instantly share code, notes, and snippets.

View EricThomson's full-sized avatar
🎯
Focusing

Eric Thomson EricThomson

🎯
Focusing
View GitHub Profile

Starting at the beginning:

Let's just assume you're using an Ubuntu-ish distro of Linux. In some ways that makes this a little more complicated, but on the other hand, it lets me assume you have experience with other package managers. So the big thing here is that conda is it's own little scientific apt-get (python packages, GIS tools, R + R packages, gcc, etc) that goes off and builds sandboxes contained in individual rooms. Then there's pip. Pip is specifically for python packages only and in my opinion, should only be used when the conda package isn't available.

Back to conda: conda is a package manager that depends on python, but is not per se an installation of python. So:

@endolith
endolith / frequency_estimator.py
Last active May 8, 2024 17:59
Frequency estimation methods in Python
from __future__ import division
from numpy.fft import rfft
from numpy import argmax, mean, diff, log, nonzero
from scipy.signal import blackmanharris, correlate
from time import time
import sys
try:
import soundfile as sf
except ImportError:
from scikits.audiolab import flacread