Skip to content

Instantly share code, notes, and snippets.

View drzhnn's full-sized avatar

Denis Druzhinin drzhnn

  • St Petersburg, Russia
  • 10:41 (UTC +03:00)
View GitHub Profile
@allenyllee
allenyllee / install_tools.sh
Last active April 3, 2025 12:17
mount vhdx in linux
#!/bin/bash
# install qemu utils
sudo apt install qemu-utils
# install nbd client
sudo apt install nbd-client
@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):
@endolith
endolith / README.md
Last active January 18, 2025 05:30
Cyclic noise from filtering white noise in Python

This generates cyclic/repeating/perfect loop noise by low-pass filtering white noise in a cyclic way. Useful for "random" but looping animations, etc.:

This one loops in both space and time, for instance:

ezgif-5-bea77d8739ezgif-5-bea77d8739

Simplex noise typically has a more trapezoidal value distribution:

lmas/opensimplex#18 (comment)