Skip to content

Instantly share code, notes, and snippets.

Avatar

Teemu Sarapisto Tsarpf

View GitHub Profile
@peterjc123
peterjc123 / check_import.py
Last active Jan 20, 2020
Help to detect import errors for PyTorch on Windows
View check_import.py
# This script tries to figure out the reason of
# `ImportError` on Windows.
# Run it with `python check_import.py`.
import ctypes
import glob
import os
import sys
import subprocess
View BeginningOpenGl.md

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
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() {
smooth();
size(400, 400);
@radiatoryang
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
}
@chandlerprall
chandlerprall / threaded_download.py
Created Jun 9, 2011
Small Python multi-threaded file downloader
View threaded_download.py
import urllib2
import threading
from Queue import Queue
import sys, os, re
class ThreadedDownload(object):
REGEX = {
'hostname_strip':re.compile('.*\..*?/', re.I)
}
You can’t perform that action at this time.