Skip to content

Instantly share code, notes, and snippets.

View fakufaku's full-sized avatar
🤓
Happy coding!

Robin Scheibler fakufaku

🤓
Happy coding!
View GitHub Profile
@fakufaku
fakufaku / stft_torch_paderbox.py
Created December 22, 2022 14:12
Matching the STFT of paderbox and torch
import torch
import paderbox
import numpy as np
from scipy.signal import hamming, blackman, get_window, hann
import matplotlib.pyplot as plt
f = 1500.0 # exactly periodic
fs = 48000.0
nfft = 512
@fakufaku
fakufaku / stft_librosa_pyroomacoustics.py
Created December 19, 2022 09:01
Matching librosa and pyroomacoustics STFT
from librosa import stft, istft
import pyroomacoustics as pra
import numpy as np
f = 1500.0
fs = 48000.0
nfft = 512
hop = 128
@fakufaku
fakufaku / gist:95be06e60b0e418c2cefebd21d30c848
Created September 5, 2020 01:03
Type dispatch in python
from typing import Callable, Dict, List
def match_signature(signature, args, kwargs):
ret = True
args = list(args)
kwargs = kwargs.copy()
for name, type_ in signature.__annotations__.items():
@fakufaku
fakufaku / 20180423_conda_list.txt
Created April 23, 2018 09:35
conda list 2018/04/23
# packages in environment at /Users/scheibler/anaconda3:
#
# Name Version Build Channel
_ipyw_jlab_nb_ext_conf 0.1.0 py36h2fc01ae_0 defaults
alabaster 0.7.10 py36h174008c_0 defaults
anaconda custom py36ha4fed55_0 defaults
anaconda-client 1.6.14 py36_0 defaults
anaconda-navigator 1.8.3 py36_0 defaults
anaconda-project 0.8.2 py36h9ee5d53_0 defaults
appnope 0.1.0 py36hf537a9a_0 defaults
@fakufaku
fakufaku / LCDShieldHelloWorld.pde
Created December 1, 2011 16:56
LCDShield v2.0 - Helloworld
/*
Example of using the LCDShield v2.0
2011 (c) Fakufaku
This examples is released in the public domain
The screen backlight is dimmed after 5s. A shake of the display will
restore the backlight, thanks to the tilt sensor.
*/