Skip to content

Instantly share code, notes, and snippets.

@Radcliffe
Radcliffe / ccss.csv
Created January 21, 2024 02:40 — forked from philngo/ccss.csv
Common Core State Standards CSV
We can make this file beautiful and searchable if this error is corrected: It looks like row 8 should actually have 8 columns, instead of 7 in line 7.
id,content_type,category_id,category_name,grade_id,grade_name,item,description
CCSS.ELA-LITERACY.L.K.1,ELA-LITERACY,L,Language,K,Kindergarten,1,Demonstrate command of the conventions of standard English grammar and usage when writing or speaking.
CCSS.ELA-LITERACY.L.K.1.a,ELA-LITERACY,L,Language,K,Kindergarten,1a,Print many upper- and lowercase letters.
CCSS.ELA-LITERACY.L.K.1.b,ELA-LITERACY,L,Language,K,Kindergarten,1b,Use frequently occurring nouns and verbs.
CCSS.ELA-LITERACY.L.K.1.c,ELA-LITERACY,L,Language,K,Kindergarten,1c,"Form regular plural nouns orally by adding /s/ or /es/ (e.g., dog, dogs; wish, wishes)."
CCSS.ELA-LITERACY.L.K.1.d,ELA-LITERACY,L,Language,K,Kindergarten,1d,"Understand and use question words (interrogatives) (e.g., who, what, where, when, why, how)."
CCSS.ELA-LITERACY.L.K.1.e,ELA-LITERACY,L,Language,K,Kindergarten,1e,"Use the most frequently occurring prepositions (e.g., to, from, in, out, on, off, for, of, by, with)."
CCSS.ELA-LITERACY.L.K.1.f,ELA-LITERACY,L,Language,K,Kindergarten,
@Radcliffe
Radcliffe / minnesota-flag-2024.svg
Created December 30, 2023 01:30
New Minnesota flag (2024) in SVG format
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Radcliffe
Radcliffe / unit-fractions.py
Created November 1, 2023 17:05
Express a positive rational as a sum of unit fractions
from fractions import Fraction
import sys
"""
Represent a positive rational number as the sum of exactly k unit fractions, distinct or not.
This function returns the first solution in lexicographic order, represented as a list of denominators.
If no solution exists, the function returns None.
We can use the following observation to limit the search space to a finite number of possibilities.
Suppose that r = 1/n_1 + 1/n_2 + ... + 1/n_k, where n_1 ≤ n_2 ≤ ... ≤ n_k.
@Radcliffe
Radcliffe / euler-conjecture.py
Created June 27, 2023 22:15
Counterexample to Euler's conjecture on sums of powers
"""
In 1769, Euler conjectured that it was impossible to express an nth power as the sum of fewer than
n nth powers of positive integers. For example, the sum of two cubes is not a cube, the sum of three
fourth powers is not a fourth power, and so on.
In 1966, L. J. Lander and T. R. Parkin found a counterexample: 27^5 + 84^5 + 110^5 + 133^5 = 144^5.
They performed a computer search using a CDC 6600. This was a massive computation for its time, but
it's easy for modern computers.
The following Python script searches for positive integer solutions to a^5 + b^5 + c^5 + d^5 = e^5
@Radcliffe
Radcliffe / count_knots_with_arf_zero.py
Created January 16, 2023 00:58
Count knots with Arf invariant zero by crossing number
import csv
import requests
from collections import Counter
import json
url = 'https://raw.githubusercontent.com/soehms/database_knotinfo/main/database_knotinfo/csv_data/knotinfo_data_complete.csv'
with requests.Session() as session:
download = session.get(url)
decoded = download.content.decode('utf-8')
@Radcliffe
Radcliffe / square_and_cube_have_all_digits.py
Created December 13, 2022 21:47
Python script to solve a math puzzle related to 69
"""
The number 69 has a remarkable property: it is the only number whose square and cube together
contain every digit exactly once.
Is an AI agent able to write a program to solve this problem? I gave the following prompt to ChatGPT:
"Write a Python script to find a two-digit number whose square and cube together contain all 10 digits."
Here is the code that it produced. The code is well-written, and it actually works!
"""
We can't make this file beautiful and searchable because it's too large.
Plate_name
00018V
0007KEN
001M
001RAM
001VVVV
00360MV
00567MF
007BOND
007DIVA
row_no word entropy common
1 aahed 4.362783642191669 0
2 aalii 3.771990047586309 0
3 aargh 4.238290773544474 0
4 aarti 4.721152554643121 0
5 abaca 3.1609708082638783 0
6 abaci 3.8954555305197296 0
7 aback 3.5158731254520146 1
8 abacs 3.9283319916149892 0
9 abaft 3.8007453818790453 0
@Radcliffe
Radcliffe / wordle_github.py
Created April 9, 2022 21:32
Python script to determine the optimal starting guess for Wordle using Shannon information entropy.
# This Python script calculates the Shannon information entropy
# for each initial guess in Wordle. Words with high entropy are
# good starting guesses for Wordle.
import numpy as np
import requests
from collections import Counter
@Radcliffe
Radcliffe / banned-books-krause-tx.csv
Last active February 10, 2022 22:57
List of books targeted by TX Rep Matt Krause because they could make students feel uneasy - https://www.npr.org/2021/10/28/1050013664/texas-lawmaker-matt-krause-launches-inquiry-into-850-books
Id Title Author Published
1 2020 Black Lives Matter marches Markovics, Joyce L. 2021
2 A complicated love story set in space Hutchinson, Shaun David 2021
3 A lesson in vengeance Lee, Victoria 2021
4 As far as you'll take me Stamper, Phil 2021
5 Be dazzled La Sala, Ryan 2021
6 Black Lives Matter: from hashtag to the streets Tyner, Artika R. 2021
7 Can't take that away Salvatore, Steven 2021
8 Follow your arrow Verdi, Jessica 2021
9 Have I ever told you Black lives matter King, Shani M. 2021