Skip to content

Instantly share code, notes, and snippets.

@windytan
windytan / fm.c
Last active August 26, 2019 03:49
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include <fftw3.h>
#define FFTLEN 2048
#define SRATE 22050
// Return sinusoid power from complex DFT coefficients
double power (fftw_complex coeff) {
use warnings;
use Getopt::Std;
getopt('xytGgwsf',\%opts);
# pcm file = $opts{f}
# samples per pixel x
$xscale = $opts{x} // 1200;
@jrsmith3
jrsmith3 / getcites.py
Created May 5, 2013 04:13
Get a list of bibTeX keys from a LaTeX document using plasTeX.
from plasTeX.TeX import TeX
# The following can be a problem if you are using revtex.
doc = TeX(file="filename.tex").parse()
refs = doc.getElementByTagName("cite")
cites = []
for ref in refs: