Skip to content

Instantly share code, notes, and snippets.

Joseph Parker selfsame

View GitHub Profile
@selfsame
selfsame / notes.ex
Last active Mar 13, 2019
Elixir notes
View notes.ex
import IEx; IEx.pry #breakpoint debugging in iex
# attaching to docker iex
https://stackoverflow.com/questions/38491614/attach-an-iex-session-to-running-elixir-otp-process/38499447#38499447
metabase depreciated config
aws:elb:loadbalancer:SSLCertificateId "arn:aws:iam::883833862426:server-certificate/meta_cloverpos_com" => "null"
View aoc.apl
#day 1
+/INPUT
{1{(())/}+0,1000000}INPUT
#day 2
part 1 dyalog
View demo.pd
#N canvas 273 586 450 300 10;
#X obj 49 147 dac~;
#X obj 52 89 equa;
#X obj 193 16 vsl 15 128 0 1 0 0 empty empty volume 0 -9 0 10 -204786
-1 -159808 2700 1;
#X obj 55 14 hsl 128 15 0 127 0 0 empty empty midi_note -2 -8 0 10
-262130 -1 -4160 5400 1;
#X obj 55 45 hsl 128 15 0 1000 0 0 empty empty freq -2 -8 0 10 -261682
-1 -258113 4500 1;
#X obj 52 112 *~ 0.001;
View groups.py
>>> p = r"rip (?P<thing>.+) from (?P<object>.+)"
>>> re.search(p, "rip sheet from red book")
<_sre.SRE_Match object; span=(0, 23), match='rip sheet from red book'>
>>> res = re.search(p, "rip sheet from red book")
>>> res.groups
<built-in method groups of _sre.SRE_Match object at 0x7fa2c61e2938>
>>> res.groups()
('sheet', 'red book')
@selfsame
selfsame / selfie-dungeon.ni
Created Oct 3, 2018
selfie dungeon inform
View selfie-dungeon.ni
"dungeon-planet" by Joseph Parker
Chapter 1 - Rules
Section 1(a) - Substance
View computers.ni
"dungeon planet" by Joseph Parker
Book 1 - Rules
Chapter 1 - Computers
An operating system is a kind of value. The operating systems are linux.
A computer is a kind of device. Understand "computer" as computer.
A computer has a text called power_up_text.
@selfsame
selfsame / rnn.py
Created Sep 19, 2018
textgenrnn utility scrips
View rnn.py
import sys, os, re
import pprint
from util import *
import re
from textgenrnn import textgenrnn
textgen = textgenrnn()
def gen(cnt="10", temp="1.0"):
textgen.generate(int(cnt), temperature=float(temp))
View vr.md
@selfsame
selfsame / store.js
Last active May 24, 2018
generic react-redux store actions
View store.js
import { createStore } from "redux"
const deepcopy = (col) => {
return JSON.parse(JSON.stringify(col))}
const shallowcopy = (col) => {
return Array.isArray(col)?[...col]:{...col}}
const update = (col, k, f) => {
col = shallowcopy(col)
View store.js
import { createStore } from "redux"
const shallowcopy = (col) => {
if (Array.isArray(col)) {
return [...col]}
else {
return {...col}}}
const assoc = (col, k, v) => {
col = shallowcopy(col)
You can’t perform that action at this time.