Skip to content

Instantly share code, notes, and snippets.

View rmmh's full-sized avatar

Ryan Hitchman rmmh

  • Boulder, Colorado
View GitHub Profile
#!/usr/bin/env python3
# grab data from
import glob
import numpy
import PIL.Image
import scipy.stats
rmmh / crunch.js
Last active February 20, 2022 04:55
wordle dictionary compression
function dec(xs) {
function n2w(n) {
var o = '';
for (var i = 0; i < 5; i++) {
var c = n % 26;
n = (n / 26)|0;
return o;
rmmh / gist:8491b8408f6830d18c1fa92d78cb6c36
Created October 29, 2021 18:36
Connect 2021 Carmack Talk Transcript

Welcome to Connect 2021.

My process for these talks is that I basically go back through last year of internal posts and public tweets that I’ve made looking for things that are interesting and worthwhile to talk about ask then I try to roughly sort them in to some kind of a coherent topic flow. I’m also usually the one that’s lot more kind of grumpy and unhappy with the way things are going as I always want more and faster progress. But this year, I really have a lot of things to be quite happy about. By far the most important is that quest 2 has been a really big success and it was a heroic effort to get it out when it was last year in the space of all the headwinds that we had, but it was better, faster, cheaper, one of those just rare combinations that you almost never get to have in a product.

00:01:31 While there’s still a couple minor things where some people miss the displays or continuous IPD adjustments, it was a fantastic

#!/usr/bin/env python3
import re
import urllib
import dateutil
import requests_cache
session = requests_cache.CachedSession(allowable_codes=(200, 404))
session.headers['User-Agent'] = 'CovidDeathsPopularity/1.0 ( python3/requests'
#!/usr/bin/env python
# Copyright 2016 The Kubernetes Authors.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# Unless required by applicable law or agreed to in writing, software
rmmh / paths.go
Last active April 25, 2021 02:39
worm-polyomino counting
// How many distinct closed paths visit each cell in an NxN grid exactly once?
package main
import (
type walls struct {
rmmh / gist:6bcc6de6153f0467b1bec686a9ad832d
Created July 16, 2019 09:05
Project Gutenberg Initialisms
#!/usr/bin/env python3
# an experiment in using a large corpus of phrases to generate initialisms from
import re
import zipfile
from nltk import tokenize
phrases = {}
rmmh /
Created January 10, 2019 05:49
Minecraft Mod: Optimine 1.3_01v2 Source Code.
import org.lwjgl.opengl.GL11;
public abstract class bb {
protected pd b;
private ic a = new dx();
private bw e = new bw();
protected float c = 0.0F;
protected float d = 1.0F;
rmmh /
Last active January 10, 2019 05:29
Source code for the 2011 McRegion Minecraft mod, which was included in Beta 1.3. and are the integration points.
** 2011 January 5
** The author disclaims copyright to this source code. In place of
** a legal notice, here is a blessing:
** May you do good and not evil.
** May you find forgiveness for yourself and forgive others.
** May you share freely, never taking more than you give.
rmmh /
Last active January 10, 2019 05:30
Source for part of the ancient Minecraft FastRender mod. Pick the closest 3 chunks to render without doing a full sort.
public boolean a(ei camera, boolean firstRun)
hz cmp = new hz(camera);
bz[] toAdd = new bz[3]; //TODO: throughout: bz should be something like "Chunk"
ArrayList<bz> nearChunks = null;
int pendingChunkSize = this.m.size();
int pendingChunkRemoved = 0;