http://stackoverflow.com/questions/2685435/cooler-ascii-spinners
var spinners = [ "←↖↑↗→↘↓↙", "▁▃▄▅▆▇█▇▆▅▄▃", "▉▊▋▌▍▎▏▎▍▌▋▊▉", "▖▘▝▗", "▌▀▐▄", "┤┘┴└├┌┬┐", "◢◣◤◥",
# Interesting note on modifying globals in a function | |
a = np.zeros(5) | |
a[0] = 5 | |
print(a) | |
def f(): | |
b = a | |
b = b[::-1] | |
#a = a[::-1] # this will fail with local undefined error | |
return b |
''' | |
Plot the spectrogram (amplitude vs freq vs time plot) of a time series | |
''' | |
from matplotlib import pyplot as plt | |
import numpy as np | |
from scipy import signal | |
# Load or generate some data | |
y = np.random.normal(size=23000) | |
fs = 44000 # sample rate |
http://stackoverflow.com/questions/2685435/cooler-ascii-spinners
var spinners = [ "←↖↑↗→↘↓↙", "▁▃▄▅▆▇█▇▆▅▄▃", "▉▊▋▌▍▎▏▎▍▌▋▊▉", "▖▘▝▗", "▌▀▐▄", "┤┘┴└├┌┬┐", "◢◣◤◥",