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
# 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. |
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
#!/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. |
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
<!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; |
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
<!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; |
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
<!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 { |
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
""" | |
Plotting the accuracty of the rule of 72. | |
https://en.wikipedia.org/wiki/Rule_of_72 | |
""" | |
import math | |
import matplotlib.pyplot as plt |
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 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% |
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 | |
ATTRITION_RATE = 0.4 | |
ADULT_AGE = 22 | |
END_FERTILE_AGE = 42 | |
DEATH_AGE = 75 | |
PER_YEAR_PER_COUPLE = 1 | |
SIM_YEARS = 200 |
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
""" | |
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 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder