add https://gist.githubusercontent.com/endolith/207d0dcf362fcac68cdfcf130f1876c6/raw/slow%2520amazon.txt to filter list
This file contains hidden or 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 skimage import io as sio | |
import skimage | |
import numpy as np | |
import matplotlib.pyplot as plt | |
filename = 'Lennert jet.png' | |
img = skimage.img_as_float(sio.imread(filename))[:,:,:3] | |
jet = plt.cm.jet |
This file contains hidden or 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 tkinter import Tk, Label | |
from PIL import Image, ImageTk | |
import os | |
import sys | |
# Skip every n frames. Use 1 to show all images | |
skip = 1 | |
try: | |
root = Tk() |

This file contains hidden or 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
# -*- coding: utf-8 -*- | |
""" | |
Created on Sat Dec 17 11:33:35 2016 | |
""" | |
from __future__ import division, print_function | |
from numpy.random import multivariate_normal | |
import matplotlib.pyplot as plt | |
from scipy.spatial.distance import cdist | |
import numpy as np |
This file contains hidden or 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
""" | |
Created on Wed Aug 24 2016 | |
""" | |
prefixes = { | |
'Y': 1e24, | |
'Z': 1e21, | |
'E': 1e18, | |
'P': 1e15, | |
'T': 1e12, |
This file contains hidden or 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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import subprocess | |
import re | |
weather = subprocess.check_output(['inxi', '-w']) | |
temp = int(re.search('\((\D?\d+) C\)', weather).groups()[0]) | |
if temp > 15: | |
subprocess.call(['systemctl', 'stop', 'boinc-client']) |
This file contains hidden or 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, print_function, absolute_import | |
import numpy as np | |
import scipy | |
from spectral import check_COLA # https://github.com/scipy/scipy/pull/6058 | |
windows = np.unique(scipy.signal.windows._win_equiv.values()) | |
windows = sorted(windows, key=lambda x: x.__name__) | |
for window in windows: | |
try: |
This file contains hidden or 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
Window | α | Highest Side-Lobe Level (dB) | Side-Lobe Fall-Off (dB/oct) | Coherent Gain | Equiv Noise BW (bins) | 3.0-dB BW (bins) | Scallop Loss (dB) | Worst Case Process Loss (dB) | 6.0-dB BW (bins) | Overlap Correlation (%) | Overlap Correlation (%) | |
---|---|---|---|---|---|---|---|---|---|---|---|---|
75% OL | 50% OL | |||||||||||
Rectangle | -13 | -6 | 1.00 | 1.00 | 0.89 | 3.92 | 3.92 | 1.21 | 75.0 | 50.0 | ||
Triangle | -27 | -12 | 0.50 | 1.33 | 1.28 | 1.82 | 3.07 | 1.78 | 71.9 | 25.0 | ||
cos^α(X) Hanning | 1.0 | -23 | -12 | 0.64 | 1.23 | 1.20 | 2.10 | 3.01 | 1.65 | 75.5 | 31.8 | |
cos^α(X) Hanning | 2.0 | -32 | -18 | 0.50 | 1.50 | 1.44 | 1.42 | 3.18 | 2.00 | 65.9 | 16.7 | |
cos^α(X) Hanning | 3.0 | -39 | -24 | 0.42 | 1.73 | 1.66 | 1.08 | 3.47 | 2.32 | 56.7 | 8.5 | |
cos^α(X) Hanning | 4.0 | -47 | -30 | 0.38 | 1.94 | 1.86 | 0.86 | 3.75 | 2.59 | 48.6 | 4.3 | |
Hamming | -43 | -6 | 0.54 | 1.36 | 1.30 | 1.78 | 3.10 | 1.81 | 70.7 | 23.5 | ||
Riesz | -21 | -12 | 0.67 | 1.20 | 1.16 | 2.22 | 3.01 | 1.59 | 76.5 | 34.4 |
This file contains hidden or 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 print_function | |
import numpy as np | |
from timeit_utils import timeit_fast | |
from numpy.random import rand | |
import matplotlib.pyplot as plt | |
import datetime | |
import socket | |
import sys | |
N_max = 100000 |