This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import evdev | |
import curses | |
import string | |
import random | |
import math | |
import sys | |
import copy | |
import time | |
from selectors import DefaultSelector, EVENT_READ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#lang lazy | |
(require "Lambda.rkt") | |
; (provide (all-defined-out)) | |
; note to self: remember to replace this with an actual constant | |
; (define basic-cutoff (NAT (sub1 (expt 2 (quotient 64 2))))) | |
(define basic-cutoff (Cons True (Cons True (Cons True (Cons True (Cons True (Cons True (Cons True (Cons True (Cons True (Cons True (Cons True (Cons True (Cons True (Cons True (Cons True (Cons True (Cons True (Cons True (Cons True (Cons True (Cons True (Cons True (Cons True (Cons True (Cons True (Cons True (Cons True (Cons True (Cons True (Cons True (Cons True (Cons True Empty))))))))))))))))))))))))))))))))) | |
(define (adv-co co) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import dis | |
import types | |
_INSN = type("INSN", (), {x: (lambda arg=0, y=y: bytes((y, arg))) for x, y in dis.opmap.items()}) | |
_CFN = {y: x for x, y in dis.COMPILER_FLAG_NAMES.items()} | |
def build_proxy_to(fn, nargs): | |
""" | |
Do evil magic to build a function object of signature fn(x0, x1, ..., xnargs) which calls fn(*x) | |
""" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "json.h" | |
#include <iostream> | |
void show_stack(json::PathNode &pn) { | |
if (pn.is_root()) { | |
std::cout << "(root)"; | |
return; | |
} | |
std::cout << pn.name; | |
if (pn.is_array()) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
fixes idle by creating another shortcut with the name "realidle" that _really works_ 100% money back guaratee | |
this product is copyright (c) oo matthew under the WTFPL | |
""" | |
nongmoscript = r"""@echo off | |
set HOMEDRIVE=C: | |
set HOMEPATH=\Users\%USERNAME% | |
start pythonw -m idlelib.idle |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import math | |
""" | |
routines: | |
- fit spline (compute x_dot and x_dot_dot) | |
- interpolate_with_spline (compute full range of x, x_dot, x_dot_dot from spline output for visualization) | |
- init_times (compute times from velocity mins/maxs) max accel will limit this further | |
""" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/summon MinecartCommandBlock ~ ~1 ~ {Command:kill @e[type=MinecartCommandBlock,r=1],Riding:{id:MinecartCommandBlock,Command:setblock ~ ~-1 ~1 redstone_block,Riding:{id:MinecartCommandBlock,Command:setblock ~ ~ ~1 command_block 0 replace {Command:fill ~ ~-3 ~-1 ~ ~ ~ air},Riding:{id:MinecartCommandBlock,Command:"scoreboard objectives add qFUgq_I dummy",Riding:{id:MinecartCommandBlock,Command:"tellraw @p [\"\",{\"text\":\"[Portals]\",\"color\":\"light_purple\",\"underlined\":true},{\"text\":\" Please do not take credit for this command\",\"color\":\"green\",\"underlined\":false}]",Riding:{id:MinecartCommandBlock,Command:"tellraw @p [\"\",{\"text\":\"[Portals]\",\"color\":\"light_purple\",\"underlined\":true},{\"text\":\" Portals by mincrmatt12 is being installed.\",\"color\":\"gold\",\"underlined\":false}]",Riding:{id:MinecartCommandBlock,Command:"scoreboard players set ni2 tpd_a 1",Riding:{id:MinecartCommandBlock,Command:"scoreboard players set ni tpd_a 1",Riding:{id:MinecartCommandBlock,Command:"scoreboard ob |