Skip to content

Instantly share code, notes, and snippets.


Teemu Sarapisto Tsarpf

View GitHub Profile
peterjc123 /
Last active Jan 20, 2020
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
jordanorelli / gif_example.pde
Created Feb 20, 2013
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);
chandlerprall /
Created Jun 9, 2011
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)

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.

radiatoryang / TriplanarWorld.shader
Created Feb 6, 2013
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