Skip to content

Instantly share code, notes, and snippets.

View Maxobat's full-sized avatar
SCHOOL

Max Pennington Maxobat

SCHOOL
View GitHub Profile
@Maxobat
Maxobat / make_random_lang_and_plot_zipfs.py
Created February 14, 2024 23:28
Makes a random language, then plots its word distribution.
import random
import matplotlib.pyplot as plt
import matplotlib.colors
from collections import Counter
import numpy as np
alphabet = list("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ ")
random_weights = [random.randint(1, len(alphabet))
for _ in range(len(alphabet) - 1)] + [len(alphabet) * 10]
@Maxobat
Maxobat / install-and-run.py
Last active January 25, 2024 03:20
Set up for phil. of computation
# Instructions to install Python starting from scratch on MacOS
# NOTE: Lines starting with # should not be executed, they are comments
# that are only for human-readable instructions.
# 1. Install developer tools
xcode-select --install
# This will start a little installer dialog.
# Let this finish and close it out when it's done.