1
0
mirror of https://github.com/osmarks/random-stuff synced 2024-12-21 07:30:35 +00:00
In the interest of transparency and/or being vaguely useful, I'm releasing my random junk publicly. Mirror of github copy.
Go to file
2024-10-11 20:17:33 +01:00
accursed-autoregex add more things??? 2020-08-12 20:31:12 +01:00
arbitrary-politics-graphs declassify some projects 2023-06-19 14:09:54 +01:00
binary-html upload failed binary HTML thing 2020-08-31 21:36:44 +01:00
calibre-indexer New things, documentation 2021-04-08 16:28:33 +01:00
code-guessing declassify some projects 2023-06-19 14:09:54 +01:00
computercraft Merge branch 'master' of https://github.com/osmarks/random-stuff 2024-06-21 12:38:58 +01:00
esolangs-iceberg declassify some projects 2023-06-19 14:09:54 +01:00
esolangs-interpreter-race initial commit v2 2020-08-12 19:16:20 +01:00
fractalart-rs minor tweak 2023-06-27 14:28:00 +01:00
heavbiome declassify some projects 2023-06-19 14:09:54 +01:00
it-was-inevitable add more things??? 2020-08-12 20:31:12 +01:00
iterated-prisoners-dilemma-contest reorganize, upload some things 2021-03-21 19:36:03 +00:00
KerbalName add more things??? 2020-08-12 20:31:12 +01:00
lan-chat reorganize LAN chat stuff 2021-06-14 22:27:54 +01:00
papers/automated-persuasion-networks APN paper, misc Lua 2024-03-29 14:35:43 +00:00
spectro declassify some projects 2023-06-19 14:09:54 +01:00
.gitignore Captive portal script 2024-08-24 18:42:02 +01:00
99-bottles.sql publish things 2021-01-29 16:34:10 +00:00
aidans_bad_code.py changes to things 2023-02-05 21:59:30 +00:00
alexandergriffing_spite.py fix typo 2024-02-25 14:33:15 +00:00
arbtt_wayland_toplevel.py various fixes, new code 2023-08-10 01:51:44 +01:00
arithmetic_coder.py files 2024-08-10 15:12:13 +01:00
art2.py publish backlog of things 2022-02-05 14:45:04 +00:00
art3.py publish backlog of things 2022-02-05 14:45:04 +00:00
audio-modem.html publish backlog of things 2022-02-05 14:45:04 +00:00
autoformat.py publish backlog of things 2022-02-05 14:45:04 +00:00
beep.py declassify some projects 2023-06-19 14:09:54 +01:00
block_scope.py various fixes, new code 2023-08-10 01:51:44 +01:00
bmp280_prometheus.py files 2024-08-10 15:12:13 +01:00
captive_portal.py new script 2024-10-11 20:17:33 +01:00
clipstack.py publish backlog of things 2022-02-05 14:45:04 +00:00
collatzz3.py reorganize, upload some things 2021-03-21 19:36:03 +00:00
config.ts add more things??? 2020-08-12 20:31:12 +01:00
CookieEnterKeyPresser.py add more things??? 2020-08-12 20:31:12 +01:00
cool-effect.glsl new script 2024-10-11 20:17:33 +01:00
count_words_in_directory.py declassify some projects 2023-06-19 14:09:54 +01:00
cycdec.py declassify some projects 2023-06-19 14:09:54 +01:00
cyclcm.py declassify some projects 2023-06-19 14:09:54 +01:00
db.ts add more things??? 2020-08-12 20:31:12 +01:00
diacriticize.py add more things??? 2020-08-12 20:31:12 +01:00
discord-message-dump-thing.py Upload Discord dump processor script 2021-03-03 12:00:26 +00:00
emoji_ternarize.py initial commit v2 2020-08-12 19:16:20 +01:00
eso-interpreter.py initial commit v2 2020-08-12 19:16:20 +01:00
fractalart.html fractalart things 2021-04-10 19:31:25 +01:00
fractalize_image.py declassify some projects 2023-06-19 14:09:54 +01:00
generate-tape-image-1.py initial commit v2 2020-08-12 19:16:20 +01:00
generate-tape-image.py initial commit v2 2020-08-12 19:16:20 +01:00
goose2function.py declassify some projects 2023-06-19 14:09:54 +01:00
gpu_mandelbrot.py publish backlog of things 2022-02-05 14:45:04 +00:00
green.png ptt.py 2021-01-13 13:09:09 +00:00
heavdrone.py heavdrone 2021-02-03 23:13:05 +00:00
heavpoots-game.html initial commit v2 2020-08-12 19:16:20 +01:00
hello.s initial commit v2 2020-08-12 19:16:20 +01:00
histretention.py declassify some projects 2023-06-19 14:09:54 +01:00
hyperplane.py declassify some projects 2023-06-19 14:09:54 +01:00
image-ec.py base32 thing, weird image esolang 2021-04-26 17:59:23 +01:00
image-eso.py base32 thing, weird image esolang 2021-04-26 17:59:23 +01:00
initialize_nnsql.py broken SQLite RNN 2024-02-25 14:36:32 +00:00
isqgrav.html changes to things 2023-02-05 21:59:30 +00:00
length_terminated_strings.c release length terminated strings upon an unsuspecting world 2021-03-20 22:50:28 +00:00
lesswrong_to_tiktok.py misc python 2024-02-25 14:26:53 +00:00
LICENSE Create LICENSE 2020-08-12 19:24:42 +01:00
log.ts add more things??? 2020-08-12 20:31:12 +01:00
luamin-api.js add more things??? 2020-08-12 20:31:12 +01:00
mandelbrot.c change break condition 2021-04-30 19:45:26 +01:00
mandelbrot.py Mandelbrot implementations for some reason 2021-04-30 19:39:23 +01:00
memeticize.py misc python 2024-02-25 14:26:53 +00:00
mpris_smart_toggle.py MPRIS toggler 2023-08-20 20:20:32 +01:00
naming.elm add more things??? 2020-08-12 20:31:12 +01:00
nn.sql broken SQLite RNN 2024-02-25 14:36:32 +00:00
output.wav declassify some projects 2023-06-19 14:09:54 +01:00
pid-controller.py changes to things 2023-02-05 21:59:30 +00:00
polcomp-visualizer.html initial commit v2 2020-08-12 19:16:20 +01:00
political_opinion_calendar.html Add some web things 2022-11-23 17:03:26 +00:00
portable_monitor_wallmount.py new script 2024-10-11 20:17:33 +01:00
ptt.py misc changes, cool demo 2023-12-01 15:48:21 +00:00
quick sort (real).c quick sort (real) 2023-11-13 19:47:01 +00:00
randomlookingthing.html declassify some projects 2023-06-19 14:09:54 +01:00
rank_ordering_assignment_system.html declassify some projects 2023-06-19 14:09:54 +01:00
README.md new script 2024-10-11 20:17:33 +01:00
realtau.txt add more things??? 2020-08-12 20:31:12 +01:00
rec_rewrite.py recursion (ethical) 2023-11-08 15:52:25 +00:00
red.png ptt.py 2021-01-13 13:09:09 +00:00
rng_trainer.html impractical B-M test 2024-02-12 10:56:27 +00:00
rotating_audio.py misc python 2024-02-25 14:26:53 +00:00
scd4x_prometheus.py SCD4x metrics script 2024-10-09 20:46:32 +01:00
screensaver.html misc changes, cool demo 2023-12-01 15:48:21 +00:00
sierpinski-index.py weird space-filling curve thing 2021-05-29 21:14:17 +01:00
smtp2rss.py various fixes, new code 2023-08-10 01:51:44 +01:00
snake.s Snake game for "AQA assembly language" 2021-04-30 19:42:20 +01:00
sparse_act_gram_matrix.py incomprehensible pytorch 2023-10-18 20:55:02 +01:00
spudnet-http.py fractalart things 2021-04-10 19:31:25 +01:00
square-law gravity - physics test.html new script 2024-10-11 20:17:33 +01:00
Stackulator.fs add more things??? 2020-08-12 20:31:12 +01:00
stb_image_write.h Mandelbrot implementations for some reason 2021-04-30 19:39:23 +01:00
steganography.py publish backlog of things 2022-02-05 14:45:04 +00:00
StringGroup.hs remove test code 2024-06-21 12:40:10 +01:00
tacnettest.lua broken SQLite RNN 2024-02-25 14:36:32 +00:00
thesaurwhy.py add more things??? 2020-08-12 20:31:12 +01:00
tictactoe.html publish backlog of things 2022-02-05 14:45:04 +00:00
tiscubed.py "TISCubed" thingy 2021-03-21 19:59:58 +00:00
unhex.py add more things??? 2020-08-12 20:31:12 +01:00
weight_painter.py new script 2024-10-11 20:17:33 +01:00
wfc.html misc changes, cool demo 2023-12-01 15:48:21 +00:00
whyjit.py initial commit v2 2020-08-12 19:16:20 +01:00
wpdumpidx.rs add more things??? 2020-08-12 20:31:12 +01:00
wssh.py add more things??? 2020-08-12 20:31:12 +01:00
yearbox.html declassify some projects 2023-06-19 14:09:54 +01:00

random-stuff

In the interest of transparency and/or being vaguely useful, I'm releasing many random and/or deterministic small things accumulated from various projects folders over the years. This comes with absolutely no guarantee of support or correct function, although if you need some of this for something I will try and answer any queries you might have.

Contents (incomplete and rough list)

  • some interpreters for various esolangs, written for competitions on an esolangs Discord server
  • trivial x86-64 assembly hello world for some reason
  • political compass visualizer thing for one Discord server
  • simple un-hexadecimal-izer program (base64 -d exists but somehow not base16 -d or some equivalent)
  • generate-tape-image.py - scripts for packing music + metadata onto Computronics (a Minecraft mod) tape images - these require LionRay to do the DFPWM conversion as of now. Can be played with something like this.
  • a thing to generate WAV files containing beeping noises
  • fairly transferable small bits of an abandoned JS project
  • an extremely bad cookie clicker-style incremental thing where you press the enter key instead of clicking
  • a very simple web API wrapper for luamin
  • a tweaked old version of it-was-inevitable which runs a local webserver instead of sending to Mastodon. Used to be used by PotatOS but this was discontinued due to RAM use.
  • an extremely accursed program which bruteforces regexes or something? Not that this actually does anything beyond using vast amounts of CPU and printing things.
  • realtau.txt, which seemingly contains 100000 digits of τ. I wonder if there's a faketau somewhere.
  • a strange thing which lets you use synonyms to get attributes on python objects
  • code for generating random vaguely human readable names in Elm. Please note that I do NOT endorse the use of Elm and this is provided mostly just to make the languages list at the side weirder rather than for any actual uses.
  • F# kerbal name generator & very basic stack calculator
  • Wikipedia dump index indexer (I think some of this is just example code for an oddly specific crate which parses the dump XML)
  • ptt.py - Python-based systemwide push to talk (mutes and unmutes microphone via PulseAudio) with tray icon
  • code-guessing - contains my entries, some test code, and build processes for my submissions to the Esolangs code guessing competition. There are also some things which never made it into an entry, such as my abuse of Z3 to solve mazes (it's surprisingly effective).
    • list-sort.py, which sorts lists of integers by interpreting a simple Lispy language and doing a continuation-passing-style quicksort (to avoid stack issues; it supports tail call optimization so this is "efficient").
    • maze2.py, which does simple depth first search to solve a maze in a pleasantly compact format.
    • multiply_matrices.py, which abuses many Python features and does matrix multiplication in an inefficient recursive way which looks like Strassen's algorithm but isn't.
    • anagram.c, which detects whether strings are (case-insensitively, and ignoring spaces) anagrams by uppercasing them, sorting them, and removing spaces and comparing them for equality. It does this by dividing the string into 16-byte chunks which can fit into a 128-bit xmm register (this had to run on Sandy Bridge systems, which lack AVX2), uppercasing them using three vector instructions (via the invariant that the input won't contain anything but [A-Za-z ]), applying a SIMD-based bubblesort to each chunk which swaps all the necessary pairs at once until it stops changing, and then using a 32-way (sequential; no idea how to parallelize this) merge to output a sorted string and discard spaces. These can then be checked for equality.
  • mcc.py - a chat program. Unlike most chat programs, it runs over IPv6 multicast so you can talk to anyone on your LAN who also happens to have this program somehow. Very flaky, due to trying to autoguess a network interface to use and also limited testing, as well as quite barebones.
  • tiscubed.py - an esolang somewhat like TIS-100, but with a somewhat exotic (almost no immediate operands, no registers, only 256B of memory per node) binary machine code format instead of assembly (there is an assembler available too). It's called "cubed" due to three dimensions, but I haven't actually done this yet.
  • iterated-prisoners-dilemma - some scripts from an iterated prisoners' dilemma competition. Unfortunately, nobody came up with any particularly exciting algorithms for this.
  • calibre-indexer - full text search for Calibre libraries, via SQLite.
    • SQLite may not have been a great choice for this, as it cannot do concurrent writes. Nevertheless, the code works, if not particularly efficiently, and allows you to build a full text table (using FTS5) to rapidly search in your Calibre library.
    • While searches are near-instant, building the index is very slow (several deciseconds per book) and it takes up large amounts of disk space (though less than the original books, funnily, because those contain images). It's smart enough to not operate again on books it already has which haven't been changed, though.
    • It only works on EPUBs, because I couldn't be bothered to support other formats (calibre can convert them anyway).
    • Text (and chapter titles, ish) is extracted using a simple but seemingly fairly reliable state machine and xml-rs.
    • I have not gotten round to releasing a nice-to-use frontend for this. You can use run-query.py for a less nice one.
  • length_terminated_strings.c - a revolution in computer science, combining the efficient strlen of null-terminated strings with the... inclusion of length? of length-prefixed/fat-pointer strings. A length-terminated string has its length at the end, occupying 1 to 8 bytes. To find its length, simply traverse the string until the data at the end matches the length traversed so far. Yes, this implementation might slightly have a bit of undefined behaviour.
  • discord-message-dump.py, which reads a GDPR data dump from Discord and copies all the messages in public channels to a CSV file. I used this for training of a GPT-2 instance on my messages (available on request).
  • spudnet-http.py - connect to the SPUDNET backend underlying PotatOS's backdoors remote debugging system via the convenient new HTTP long-polling-based API.
  • fractalart-rs - this in Rust and faster, see its own README for more details.
  • arbtt_wayland_toplevel.py - interfaces arbtt with Wayland foreign toplevel protocol and idle notifications.
  • fractalize_image.py - used for making a profile picture for someone once.
  • goose2function.py - converts goose neck profiles extracted from images of geese into activation functions for machine learning.
  • histretention.py - dump Firefox places.sqlite3 into a separate database (Firefox clears out old history internally for performance reasons or something like that) for later search.
  • memeticize.py - the script I use to process memes from a large directory of heterogenous files.
  • rng_trainer.html - a very unfinished attempt to implement a paper I found on training high-quality random number generation.
  • smtp2rss.py - bridge SMTP (inbound emails) to RSS.
  • yearbox.html - DokuWiki-type yearbox prototype for Minoteaur (I think this actually contains an off-by-one error somewhere; it isn't what's actually in use).
  • arbitrary-politics-graphs - all you need to run your own election campaign.
  • heavbiome - some work on biome generation with Perlin noise.
  • block_scope.py - Python uses function scoping rather than block scoping. Some dislike this. I made a decorator to switch to block scoping.
  • mpris_smart_toggle.py - playerctl play-pause sometimes does not play or pause the media I want played or paused (it seems to use some arbitrary selection order). This does it somewhat better by tracking the last thing which was playing.
  • rec_rewrite.py - in the spirit (and blatantly copypasted code) of block_scope.py, rewrite recursive functions as iterative using a heap-allocated stack and generators.
  • computercraft - CC(:T) projects - see folder README. Consolidated from Pastebin and various internal records.
  • rotating_audio.py - composite audio files such that they sound as if they are from sources orbiting you
  • nn.sql - half an RNN in SQLite, unfinished because it apparently can't do recursive common table expressions.
  • alexandergriffing_spite.py - spites sometime by doing bad numerics in Python.
  • screensaver.html - an attempt to replicate one of Apple's screensavers (incomplete).
  • StringGroup.hs - native Haskell strings are only a monoid, so I made an improved version which forms a group instead.
  • arithmetic_coder.py - arithmetic coding implementation apart from the fact that it doesn't work properly (it doesn't write enough digits for some reason I haven't worked out).
  • bmp280_prometheus.py - read BMP280 temperature/pressure sensors and export as Prometheus metrics.
  • captive_portal.py - automatically fill in captive portal forms (WIP).
  • scd4x_prometheus.py - read SCD4x temperature/humidity/CO2 sensors and export as Prometheus metrics.
  • weight_painter.py - paint arbitrary images into neural network weight matrices. Uses a permutation, so the distribution is preserved so training dynamics remain unaffected (so long as the network doesn't care about organization below the weight matrix level - this is not safe for attention heads etc).
  • cool-effect.glsl - a nice effect I made by accident whilst trying to make a cooler one.
  • portable_monitor_wallmount.py - very simple CADQuery script which generates a frame for my portable monitor's top/bottom bezels so it can be stuck to the wall and slid out easily.