Skip to content

Instantly share code, notes, and snippets.

(Whisper) zmd@CaptiveFacility Whisper % whisper ep22_final.mp3 --model tiny
100%|█████████████████████████████████████| 72.1M/72.1M [00:03<00:00, 23.9MiB/s]
/Users/zmd/.local/share/virtualenvs/Whisper-JcksVwm9/lib/python3.9/site-packages/whisper/transcribe.py:78: UserWarning: FP16 is not supported on CPU; using FP32 instead
warnings.warn("FP16 is not supported on CPU; using FP32 instead")
Detecting language using up to the first 30 seconds. Use `--language` to specify the language
Detected language: English
[00:00.000 --> 00:05.000] Welcome to Robot Friends, the podcast that actively harms its audience.
[00:05.000 --> 00:08.000] Episode 22, I can robot vs. Extra-B.
[00:16.000 --> 00:19.000] JD Pressman, what's your deal?
[00:20.000 --> 00:23.000] What is my deal? Okay, well, um,
@zackmdavis
zackmdavis / vowel_swap_three_words.py
Last active March 27, 2022 19:46
words that are still words if you swap a vowel
from string import ascii_lowercase
def load_dictionary():
dictionary = set()
with open("/usr/share/dict/words") as dictionary_file:
for word in dictionary_file:
dictionary.add(word.strip())
return dictionary
VOWELS = ['a', 'e', 'i', 'o', 'u']
@zackmdavis
zackmdavis / blegg.py
Last active January 8, 2021 23:14
calculations for "Unnatural Categories Are Optimized for Deception"
from fractions import Fraction
from math import sqrt
def expected_squared_error(distribution, metric):
"""
If we know the distribution, and we "guess" the value of a sample from that
distribution, how much will we be wrong on average (with respect to a given
metric on the space, squared)?
"""
@zackmdavis
zackmdavis / message_length.rs
Created October 20, 2020 05:18
Rust source code for exposition of Minimum Description Length model selection for Markov chains
#!/usr/bin/env run-cargo-script
// cargo-deps: rand="0.7"
// Use cargo-script (https://github.com/DanielKeep/cargo-script) to run as a
// standalone script.
extern crate rand;
use std::collections::HashMap;
@zackmdavis
zackmdavis / slate_starchive.py
Last active June 30, 2020 03:25
replace links to Slate Star Codex posts with the last Internet Archive Wayback Machine version
import os
import re
import requests
import sys
slate_sturl_regex = re.compile(r"https?://slatestarcodex.com/\d{4}/\d{2}/\d{2}/[-a-z0-9]+/")
def slate_starchive_post_content(content):
@zackmdavis
zackmdavis / learning_to_signal.rs
Last active June 8, 2020 07:58
Rust source code for "Basics of the Evolution of Meaning" sender–receiver game
#!/usr/bin/env run-cargo-script
// cargo-deps: rand="0.7"
// Use cargo-script (https://github.com/DanielKeep/cargo-script) to run as a
// standalone script.
use std::collections::HashMap;
extern crate rand;
use rand::distributions::{Distribution, Uniform};
@zackmdavis
zackmdavis / factions.py
Created May 20, 2020 07:59
Python 3 source code for "Endogenous Epistemic Factionalization" replication/commentary
# Graphing requirements: scipy and matplotlib
import random
from math import factorial, sqrt
ε = 0.01 # size of edge for B
def binomial(p, n, k):
# https://www.vox.com/future-perfect/2020/1/7/21051910/predictions-trump-brexit-recession-2019-2020
from math import log2 as lg
predictions = [
# summary, probability, outcome
("Trump in office", 0.9, True),
("No Dem frontrunner", 0.6, False),
("No US recession", 0.8, True),
("No border wall", 0.95, True),
@zackmdavis
zackmdavis / comments.md
Created November 30, 2019 23:42
comments on "Seeking Power is Provably Instrumentally Convergent in MDPs"

(Thinking-out-loud comments on a not-yet-published draft.)

three choices: eat candy, eat chocolate, or hug a friend

(Some authors would consider chocolate a kind of candy?)

by generating triples in [0,1] here

"Here" links are terrible!

@zackmdavis
zackmdavis / last_friday_night.md
Last active November 13, 2019 03:14
Last Friday Night (Coalition Edition)

There's a claimant on the line
There's a regulator's fine
Brokers scream on Intercom
BD responds with aplomb
Integrate my CDF
And template that PDF
Running Docker in a chroot
Popping jobs off of the queue

Pictures of this spree