Skip to content

Instantly share code, notes, and snippets.

View drzhnn's full-sized avatar

Denis Druzhinin drzhnn

View GitHub Profile
@endolith
endolith / cyclic_noise.py
Last active December 13, 2023 18:23
Cyclic noise from filtering white noise in Python
import numpy as np
import matplotlib.pyplot as plt
from scipy.ndimage import gaussian_filter
rng = np.random.default_rng()
# shape = (1024, )
# shape = (512, 512)
shape = (128, 128, 128)
@HudsonHuang
HudsonHuang / audio_format.py
Created October 11, 2019 15:21
Convert audio data of PCM16/float32 to byte, and vice versa.
"""Helper functions for working with audio files in NumPy."""
"""some code borrowed from https://github.com/mgeier/python-audio/blob/master/audio-files/utility.py"""
import numpy as np
import contextlib
import librosa
import struct
import soundfile
def float_to_byte(sig):
@allenyllee
allenyllee / install_tools.sh
Last active June 16, 2024 06:19
mount vhdx in linux
#!/bin/bash
# install qemu utils
sudo apt install qemu-utils
# install nbd client
sudo apt install nbd-client