Skip to content

Instantly share code, notes, and snippets.

View Jeremiah-England's full-sized avatar

Jeremiah England Jeremiah-England

View GitHub Profile
# Credit: Mostly generated by Gemini 2.5
import argparse
import random
from collections import deque
def generate_maze(width: int, height: int):
"""
Generates an ASCII maze of specified width and height with an entrance and exit.
@Jeremiah-England
Jeremiah-England / plot_tokens_over_time.py
Created April 3, 2025 17:20
Plot the tokens used over time by a git repository
#!/usr/bin/env python3
"""
Analyzes the token count (using ttok) of specified file types (.md, .py)
over the history of a Git repository branch (default: origin/master).
Plots the token count over time and adds a linear regression trend line
for the most recent period.
Requires: Python 3.10+, git, ttok, matplotlib, numpy.
@Jeremiah-England
Jeremiah-England / index.html
Created March 7, 2025 01:53
Simple WebRTC
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Simple WebRTC Chat</title>
<style>
video {
width: 300px;
height: 200px;
border: 1px solid black;
@Jeremiah-England
Jeremiah-England / index.html
Created March 4, 2025 17:33
Snowflake Generator - Canvas
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Snowflake Generator - JavaScript</title>
<style>
body {
background-color: black;
color: white;
@Jeremiah-England
Jeremiah-England / index.html
Last active March 4, 2025 06:16
Snowflakes Generator with Pygame and Pyscript
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title>Snowflake Generator - PyScript</title>
<link rel="stylesheet" href="https://pyscript.net/releases/2025.2.4/core.css">
<script type="module" src="https://pyscript.net/releases/2025.2.4/core.js"></script>
<style>
body {
@Jeremiah-England
Jeremiah-England / rule_of_72_accuracy_plot.py
Created April 2, 2024 23:59
Rule of 72 Accuracy Plot
"""
Plotting the accuracty of the rule of 72.
https://en.wikipedia.org/wiki/Rule_of_72
"""
import math
import matplotlib.pyplot as plt
@Jeremiah-England
Jeremiah-England / child_tax_credit_history_plot_2023.py
Last active March 10, 2024 16:05
Child Tax Credit history plot in 2023 dollars
import io
from itertools import pairwise
import matplotlib.pyplot as plt
import pandas as pd
# https://www.minneapolisfed.org/about-us/monetary-policy/inflation-calculator/consumer-price-index-1913-
inflation_table_str = """
year CPI inflation_rate
1997 160.5 2.3%
@Jeremiah-England
Jeremiah-England / simulate.py
Created February 5, 2024 02:40
Feminist Fertility Cult Simulation
import math
ATTRITION_RATE = 0.4
ADULT_AGE = 22
END_FERTILE_AGE = 42
DEATH_AGE = 75
PER_YEAR_PER_COUPLE = 1
SIM_YEARS = 200
@Jeremiah-England
Jeremiah-England / greenville_population.py
Created December 9, 2021 01:23
Generate some graphs and projections of the population of Greenville
"""
Graph the population of Greenville County over time.
Data from wikipedia.
https://en.wikipedia.org/wiki/Greenville_County,_South_Carolina
Need to `pip install sklearn` and `pip install matplotlib` first.
"""
import matplotlib.pyplot as plt
import math
@Jeremiah-England
Jeremiah-England / spartanburg-alltheplaces.geojson
Last active January 25, 2021 03:33
alltheplaces data for spartanburg MapRoulette challenge
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.