Skip to content

Instantly share code, notes, and snippets.

import math
import numpy as np
import jax.numpy as jnp
from cr.sparse.pursuit import omp
NUM_SAMPLES = 512 # reduce this if it's using too much memory!
def resample(signal, samples):
resampled = []
for i in range(samples):
x = i/samples
version = 1
title = 'icicle fall (9/9)'
[[modules]]
plugin = 'source.svelte'
data.contents = '''
use your mouse to dodge(?) the bullets! (click to play!)
<details class="clickthrough">
<summary class="clickthroughsummary">
<div class="container">
int frame = 0;
int depth_limit = 9;
int ti = -1;
String world = "";
String world_ending = "...";
int world_length = 3;
PVector main = new PVector(400, 400, 90);
PVector ba;
PVector bb;
PVector bc;
import math
import cmath
import numpy as np
NUM_SAMPLES = 4096
import matplotlib.pyplot as plt
def resample(signal, samples):
signal.append((1, signal[-1][1]))
resampled = []
from shapely.geometry import Polygon, MultiPoint, Point
from shapely.ops import voronoi_diagram
import matplotlib.pyplot as plt
import random
import math
NUM_EGGBUGS = 5
cursors = [
"nwse-resize",
@ubuntor
ubuntor / part1.py
Created August 19, 2021 23:46
CONS decompression
import struct
def u32(b, endian='big'):
e = '>' if endian == 'big' else '<'
return struct.unpack(e+'I', b)[0]
with open('DMR-EZ485V firmware.bin','rb') as f:
firmware = f.read()
cons = firmware[0x40000:] # start of CONS
import sys
import struct
import binascii
from collections import Counter
def u16(b):
return struct.unpack('<H', b)[0]
def p16(x):
return struct.pack('<H', x)
def p32(x):
@ubuntor
ubuntor / parabox.java
Last active June 20, 2020 06:53
parabox mockup in processing
int frame = 0;
int depth_limit = 6;
int ti = -1;
String world = "";
String world_ending = "...";
int world_length = 3;
PVector main = new PVector(400, 400, 90);
PVector ba;
PVector bb;
PVector bc;
@ubuntor
ubuntor / readme.txt
Created December 22, 2019 00:25
AntWorld [port] (PuzzleScript Script)
Play this game by pasting the script in http://www.puzzlescript.net/editor.html
@ubuntor
ubuntor / test.cpp
Last active April 20, 2019 06:00
Test case for ValveSoftware/Proton #2452
#ifndef UNICODE
#define UNICODE
#endif
const wchar_t CLASS_NAME[] = L"class";
#include <cstdio>
#include <windows.h>
#include <io.h>
#include <fcntl.h>