This file contains 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 __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 |
This file contains 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
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(); | |
} |
This file contains 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
#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; |
This file contains 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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |