Skip to content

Instantly share code, notes, and snippets.

View setanarut's full-sized avatar

Şeta Narut setanarut

  • Turkey
View GitHub Profile
@gasman
gasman / encode.py
Created October 25, 2020 12:23
Encoding a file as a Youtube video - https://www.youtube.com/watch?v=hyqLv2_zBdA
# Encode inputfile.tar.gz as a series of video frames
# Frames are written to frames/frameNNNN.png
from PIL import Image
with open('inputfile.tar.gz', 'rb') as f:
data = f.read()
WIDTH = 120
HEIGHT = 90
CHUNK_SIZE = int((WIDTH * HEIGHT) / 8)
@natowi
natowi / audio2midi.md
Last active April 18, 2024 11:37
List of open source audio to midi packages
@error454
error454 / w2rgb.py
Created December 6, 2014 23:35
Wavelength to RGB
#!/usr/bin/env python
# vim:set ft=python fileencoding=utf-8 sr et ts=4 sw=4 : See help 'modeline'
# From http://www.noah.org/wiki/Wavelength_to_RGB_in_Python
'''
== A few notes about color ==
Color Wavelength(nm) Frequency(THz)
Red 620-750 484-400
Orange 590-620 508-484