Skip to content

Instantly share code, notes, and snippets.

View Eight1911's full-sized avatar
🐝

Poom Chiarawongse Eight1911

🐝
View GitHub Profile
@Eight1911
Eight1911 / decorators.py
Last active April 8, 2018 00:12
useful Python decorators
#!/usr/bin/env python3
import threading
import functools
import time
import matplotlib.pyplot as plt
from functools import update_wrapper
from time import clock
@Eight1911
Eight1911 / radix-2-fft.py
Last active March 28, 2022 20:54
Naive implementation of non-recursive radix-2 fast Fourier transform in Python.
import math
# iterative cooley tukey fft for dyadics
def fft(v):
n, h = len(v), len(v) >> 1
old, new = v[:], [0] * n
sublen, stride = 1, n
while sublen < n:
stride >>= 1