Skip to content

Instantly share code, notes, and snippets.

@sylvia43
sylvia43 / frequency_estimator.py
Last active September 12, 2015 09:37 — forked from endolith/frequency_estimator.py
Frequency estimation methods in Python
from __future__ import division
from scikits.audiolab import flacread
from numpy.fft import rfft, irfft
from numpy import argmax, sqrt, mean, diff, log
from matplotlib.mlab import find
from scipy.signal import blackmanharris, fftconvolve
from time import time
import sys
from parabolic import parabolic
private boolean containsEmoji(String string) {
// if you're doing it frequently, move the pattern compile into a static / member variable instead
Pattern p = Pattern.compile("[\\uD83C-\\uDBFF\\uDC00-\\uDFFF]+");
Matcher m = p.matcher(string);
return m.find();
}
#define ADXL345_ADDR_ALT_LOW 0x53
#define FIMU_ACC_ADDR ADXL345_ADDR_ALT_LOW
#define ADXL345_POWER_CTL 0x2d
#define ADXL345_DATAX0 0x32
#define TO_READ (6)
#include <Wire.h>
int accelx;
int accely;
@sylvia43
sylvia43 / 0_reuse_code.js
Created May 15, 2014 01:41
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console