Skip to content

Instantly share code, notes, and snippets.

View TheApeMachine's full-sized avatar

Daniel Owen van Dommelen TheApeMachine

View GitHub Profile
#!/usr/bin/env python3
"""
CCL-MNIST: Constructive Compression Learning on MNIST (no gradient descent, no pretrained models).
Pipeline:
1) Learn a patch "codec" with k-means (vector quantization).
2) Tokenize images into a 2D grid of discrete patch IDs.
3) Train class-conditional context models by counting:
p(token | left, up, upleft) with Dirichlet smoothing and interpolation backoff.
4) Classify by minimum codelength (maximum log-likelihood).
@TheApeMachine
TheApeMachine / docker-compose.yml
Created September 4, 2022 15:08
netmaker with CloudFlare
version: "3.4"
services:
netmaker:
container_name: netmaker
image: gravitl/netmaker:v0.15.0
cap_add:
- NET_ADMIN
- NET_RAW
- SYS_MODULE

Keybase proof

I hereby claim:

  • I am theapemachine on github.
  • I am theapemachine (https://keybase.io/theapemachine) on keybase.
  • I have a public key ASAGVI7hArdfAYt-frq6Mm4A49YDrWOrQmpA9ftvasMYYQo

To claim this, I am signing this object:

# This was my initial code, which sets the cursor before the prompt:
func _input(event):
if Input.is_key_pressed(KEY_ENTER):
insert_text_at_cursor(">")
# And this is how I tried to fix it, which seems to just make a mess of things:
func _input(event):
if Input.is_key_pressed(KEY_ENTER):