Skip to content

Instantly share code, notes, and snippets.

View Tsarpf's full-sized avatar

Teemu Sarapisto Tsarpf

View GitHub Profile
Tsarpf /
Last active March 20, 2023 03:14
Numpy wavetable "synthesizer", with a basic shapes wavetable + spectral time skew effect
# Based on and the code
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.widgets import Slider
from scipy.fft import rfft, irfft
from IPython.display import display, Audio
import sounddevice as sd
peterjc123 /
Last active January 20, 2020 09:41
Help to detect import errors for PyTorch on Windows
# This script tries to figure out the reason of
# `ImportError` on Windows.
# Run it with `python`.
import ctypes
import glob
import os
import sys
import subprocess
romanlarionov /
Last active June 5, 2023 07:29
OpenGL Startup

Travel Guide to OpenGL

I've figured out several things while trying to extend my knowledge of Computer Graphics.

  1. OpenGL can be a bitch if you don't know what you're doing.
  2. There is no worse pain than to experience CMake without knowing what you're doing.
  3. When walking to the depths of hell, it would be nice to have a travel guide.

And that's what this is, a travel guide.

jordanorelli / gif_example.pde
Created February 20, 2013 02:38
make an animated gif with Processing
View gif_example.pde
import gifAnimation.*;
GifMaker gifExport;
int frames = 0;
int totalFrames = 120;
public void setup() {
size(400, 400);
radiatoryang / TriplanarWorld.shader
Created February 6, 2013 19:24
a triplanar / procedural UV / world space UV shader for Unity, cobbled together bits from @quickfingerz and @Farfarer
View TriplanarWorld.shader
Shader "Tri-Planar World" {
Properties {
_Side("Side", 2D) = "white" {}
_Top("Top", 2D) = "white" {}
_Bottom("Bottom", 2D) = "white" {}
_SideScale("Side Scale", Float) = 2
_TopScale("Top Scale", Float) = 2
_BottomScale ("Bottom Scale", Float) = 2
chandlerprall /
Created June 9, 2011 17:41
Small Python multi-threaded file downloader
import urllib2
import threading
from Queue import Queue
import sys, os, re
class ThreadedDownload(object):
'hostname_strip':re.compile('.*\..*?/', re.I)