Skip to content

Instantly share code, notes, and snippets.

View bryangingechen's full-sized avatar

Bryan Gin-ge Chen bryangingechen

View GitHub Profile
@alecjacobson
alecjacobson / procrusteanarxiv.sh
Last active March 16, 2022 21:16
This script will attempt to create a copy of the input tex directory whose total size is less than the 10000 KBs (i.e., 10MBs) limit of ArXiv.
#!/bin/bash
if [ -z "$1" ];then
echo "USAGE:
procrusteanarxiv path/to/input/dir/containing/tex/files/
This script tested with dependencies:
gs Ghostscript version 9.27 (9.21 is buggy)
import data.fintype tactic.ring
structure graph :=
(vertex : Type*)
(edge : vertex → vertex → bool)
namespace graph
class undirected (G : graph) :=
(symm : ∀ x y : G.vertex, G.edge x y = G.edge y x)
const {
canvasSketch,
GUI,
KeyPress,
FaviconRenderer
} = require('./hooks');
const settings = {
animate: true,
scaleToView: true,
@fpvandoorn
fpvandoorn / cube.lean
Last active May 29, 2019 05:27
cubing a cube
/-
Copyright (c) 2019 Floris van Doorn. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Author: Floris van Doorn
---
Proof that a cube (in dimension n ≥ 3) cannot be cubed:
there does not exist a partition of a cube into finitely many smaller cubes (at least two)
of different sizes.
@digama0
digama0 / itexp.txt
Created April 12, 2019 10:07
Metamath proof tutorial
*** The goal today is to prove the following theorem:
h50::itexp.1 |- ( ph -> A e. RR )
h51::itexp.2 |- ( ph -> B e. RR )
h52::itexp.3 |- ( ph -> A <_ B )
h53::itexp.4 |- ( ph -> N e. NN )
qed:: |- ( ph -> S. ( A [,] B ) ( x ^ N ) _d x = ( ( ( B ^ ( N + 1 ) ) - ( A ^ ( N + 1 ) ) ) / ( N + 1 ) ) )
*** Jon thinks it would be easier to do this without the "ph ->", but I think he may regret that decision later.
*** Anyway it is epsilon harder to have a context so let's just go with it.
@HarryStevens
HarryStevens / .block
Last active February 17, 2023 15:22
Radial Gradient Voronoi
license: gpl-3.0
@PatrickMassot
PatrickMassot / lean.json
Created February 12, 2019 13:13
VScode user code snippets for Lean
{
"Type*": {
"prefix": "Type*",
"body": [
"{$1 : Type*}$0"
],
"description": "Type* variable",
},
"Variables": {
"prefix": "var",
@PatrickMassot
PatrickMassot / pratt.lean
Created January 25, 2019 09:42
Logic puzzle from John P. Pratt in Lean (starts at line 38)
import tactic.interactive
import tactic.linarith
@[derive decidable_eq]
inductive people : Type | Brown | Jones | Smith
constant only_child : people → Prop
constant salary : people → ℕ
@[derive decidable_eq]
#!/usr/bin/env python3
import re, sys
from heapq import heapify, heappush, heappop
class Bot:
def __init__(self, x, y, z, r):
self.x = x
self.y = y
self.z = z
self.r = r
@duhaime
duhaime / .block
Last active March 30, 2019 06:10
Animated Dithering (2D Canvas)
license: MIT
height: 348
scrolling: no
border: yes