Skip to content

Instantly share code, notes, and snippets.

View undergroundmonorail's full-sized avatar

undergroundmonorail

View GitHub Profile
@undergroundmonorail
undergroundmonorail / example_data.ipynb
Created December 11, 2022 06:44
POC for better example data heuristic for aocd
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#!/usr/bin/env python3
import random
switch_wins = 0
switch_losses = 0
no_switch_wins = 0
no_switch_losses = 0
for case in range(999999):
#!/usr/bin/env python3
switch_wins = 0
switch_losses = 0
no_switch_wins = 0
no_switch_losses = 0
# 1 is a car, 0 is a goat
for doors in [(1, 0, 0),
(0, 1, 0),
#!/usr/bin/env python3
from mastodon import Mastodon
import psycopg2
mastodon = Mastodon(access_token='automatic-tooter_usercred.secret', api_base_url='https://glaceon.social')
with psycopg2.connect('dbname=mastodon_production user=mastodon') as conn:
with conn.cursor() as cursor:
cursor.execute("""
SELECT l.username, STRING_AGG(r.username, ',')
/* hide list bullets on polls */
.poll li
{
list-style-type: none;
}
/* hide filtered posts */
.status__wrapper--filtered {
#!/usr/bin/env python3
# brute forcer of valid solutions to this bingo puzzle:
# https://i.imgur.com/50cpnw3.png
board = []
conditions = []
cells_in_bingo = []
class Cell:
def __init__(self, col, row, value, func):
// ==UserScript==
// @name Lunar Puzzle Solver
// @namespace http://reddit.com/u/undergroundmonorail
// @version 0.1
// @description Find the correct solution for the Shenkuu Lunar Temple
// @author monorail
// @match http://www.neopets.com/shenkuu/lunar/?show=puzzle
// @grant none
// ==/UserScript==
Sorcerer, 1st level, 1 CON: 1
Sorcerer, 1st level, 2 CON: 2
Sorcerer, 1st level, 3 CON: 2
Sorcerer, 1st level, 4 CON: 3
Sorcerer, 1st level, 5 CON: 3
Sorcerer, 1st level, 6 CON: 4
Sorcerer, 1st level, 7 CON: 4
Sorcerer, 1st level, 8 CON: 5
Sorcerer, 1st level, 9 CON: 5
Sorcerer, 1st level, 10 CON: 6
// ==UserScript==
// @name Look for fifthglyphs
// @namespace http://www.reddit.com/u/undergroundmonorail
// @version 0.1
// @description Point out fifthglyphs in /r/AVoid5 posts
// @author monorail
// @match *://*.reddit.com/r/AVoid5/comments*
// @match *://*.reddit.com/r/AVoid5/submit*
// @grant none
// ==/UserScript==
local shootCats = RegisterMod("shoot cats", 1)
local player
local beelzebubItems = {}
local beelzebubCounter
function table.shallow_copy(t)
local t2 = {}
for k,v in pairs(t) do
t2[k] = v