Skip to content

Instantly share code, notes, and snippets.

from collections import defaultdict
import copy
vertices = []
triangles = []
# map {(old vertex id, new material_id) => new vertex id}
new_vertex_mappings = {}
@realazthat
realazthat / generators.py
Created October 19, 2017 20:20
3-SUM-by-views created by realazthat - https://repl.it/MgQL/1787
import random
def pathological_generator(Nbits,n,certify):
if n == 0:
assert not certify
return (None,[])
@realazthat
realazthat / Lq62-0.js
Created September 29, 2017 17:55
null created by realazthat - https://repl.it/Lq62/0
var nunjucks = require('nunjucks');
nunjucks.configure('.');
nunjucks.render('test.html');
@realazthat
realazthat / README.md
Last active November 8, 2016 21:58
List of Small Things
@realazthat
realazthat / index.js
Created November 8, 2016 01:26
requirebin sketch
const regl = require('regl')();
const quad = require('glsl-quad');
const vert = `
precision highp float;
@realazthat
realazthat / index.js
Last active October 10, 2016 22:16
requirebin sketch
const quad = require('glsl-quad');
const regl = require('regl')();
let frag = `
THIS IS AN OBVIOUSLY BAD SHADER.
IT SHOULD THROW AN ERROR.
BUT REGL ONLY THROWS AN ERROR IN DEBUG MODE.
@realazthat
realazthat / index.js
Last active October 7, 2016 18:57
requirebin sketch
const quad = require('glsl-quad');
const $ = require('jquery-browserify');
const ms = require('microseconds');
const regl = require('regl')({});
let frag = `
precision float highp;
@realazthat
realazthat / pca-incremental-columns.ipynb
Created September 27, 2016 04:35
pca-incremental-columns.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@realazthat
realazthat / index.js
Created September 19, 2016 22:38
requirebin sketch
const clone = require('clone');
let wat = {
5: 50,
'wat': 500,
10: {20: 30, 50: 1},
11: {20: 30, 50: {1: 2, 3:4}}
};
@realazthat
realazthat / index.js
Last active September 19, 2016 22:06
requirebin sketch
const regl = require('regl')();
const resl = require('resl');
const quad = require('glsl-quad');
const createKDTree = require('static-kdtree');
let c = 16;
let url = 'https://github.com/youtube/api-samples/raw/master/java/src/main/resources/sample-video.mp4'