Skip to content

Instantly share code, notes, and snippets.

@ndrewxie
ndrewxie / dedup_solver.rs
Last active October 29, 2025 03:15
???
// Quick terminology mapping:
// * "rule" => region constraint ("rule" is just shorter)
// * "category"/"cat" => group of constraints with similar structure, i.e.
// constraints can only be merged if they're in the
// same category
// * "mapping" => mapping from one set of variables to another. Mappings MUST
// be many-to-one. Obviously, they can't be one-to-many, and
// a one-to-one mapping isn't really productive, because
// we're not eliminating any variables that way
//
@ndrewxie
ndrewxie / fc.js
Created February 4, 2021 00:39
Force connect
document.body.innerHTML = "";
var sky = document.createElement('iframe');
sky.height = "100%";
sky.width = "100%";
document.body.innerHTML = "";
sky.onload = function() {
var cwd = sky.contentDocument;
var cww = sky.contentWindow;
#![feature(asm)]
#![allow(dead_code)]
#![allow(unused_imports)]
#![allow(unused_variables)]
#![allow(unused_assignments)]
use rand::distributions::{Distribution, Normal};
use std::{thread, time};
extern crate rand; // 0.6.5
use rand::Rng;
use std::time::{Duration, Instant};
@ndrewxie
ndrewxie / .vimrc
Last active February 8, 2019 22:52
Vimrc
set nocompatible
"begin vundle stuff
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
"install plugins below