Skip to content

Instantly share code, notes, and snippets.

lang,iso,word,translation,meaning_group,color,source
Spanish,spa,tres en raya,three in a line,three_in_row,yellow,https://www.collinsdictionary.com/dictionary/spanish-english/tres-en-raya
Portuguese,por,jogo do galo,rooster game,animal_folk,red,https://en.wiktionary.org/wiki/jogo_do_galo
Catalan,cat,tres en ratlla,three in a line,three_in_row,yellow,https://glosbe.com/en/ca/tic-tac-toe
Galician,glg,tres en raia,three in a line,three_in_row,yellow,https://en.wiktionary.org/wiki/tic-tac-toe
Basque,eus,hiruko artzain-joko,shepherd game,chess_metaphor,skyblue,https://eu.wikipedia.org/wiki/Hiruko_artzain-joko
French,fra,morpion,pubic louse,crab_louse,pink,https://www.cnrtl.fr/definition/morpion
Italian,ita,tris,thrice,three_in_row,orange,https://www.wordreference.com/enit/tic-tac-toe
German,deu,Drei gewinnt,three wins,three_in_row,lemonchiffon,https://glosbe.com/en/de/noughts%20and%20crosses
Dutch,nld,"boter, kaas en eieren","Butter
@cavedave
cavedave / 1984_match_analysis.csv
Last active June 9, 2026 19:41
Karpov Kasparov first match starting in 1984. Was Karpov really 'a boxer on the ropes' at the end. I wanted to see if a computer analysis showed he was. Data from lichess https://lichess.org/study/wgJ634pR/SgIZNfgR It looks to me that Karpov was playing worse by the end
Game kasp_accuracy kasp_ACPL kasp_inac kasp_mistake kasp_blun karp_accuracy karp_ACPL karp_inac karp_mistake karp_blun
1 93 19 3 0 0 94 18 1 0 0
2 83 40 3 1 2 84 40 4 3 1
3 87 36 4 1 0 95 14 0 1 0
4 97 9 0 0 0 96 10 1 0 0
5 97 8 0 0 0 96 12 0 0 0
6 88 38 7 2 2 92 31 5 2 1
7 89 27 1 0 1 94 17 0 1 0
8 96 8 1 0 0 96 9 1 0 0
9 90 28 1 2 2 92 18 1 2 1
@cavedave
cavedave / may.r
Last active May 26, 2026 13:28
UK May temperatures. data from https://www.metoffice.gov.uk/hadobs/hadcet/
#!/usr/bin/env Rscript
##
## HadCET — daily mean / min / max for every day in May (Central England)
##
## Mirrors the logic in may1st_v2.ipynb for sharing via gist.github or similar.
##
## Depends: tidyverse, lubridate
## install.packages(c("tidyverse", "lubridate"))
##
## Usage (writes three PNG files in current working directory):
# Electricity access (% of population) — World Bank WDI, geofacet layout
# Country labels: strip.position = "bottom" (below each small chart).
# Geofacet pads the grid with __blank* placeholders; use labeller(facet_col = …) — geofacet
# renames the facet variable to `facet_col`, so labeller(country = …) has no effect.
# Indicator: EG.ELC.ACCS.ZS (same series as "access to electricity" headline %)
library(tidyverse)
library(here)
library(geofacet)
@cavedave
cavedave / assists.csv
Last active May 9, 2026 18:11
top nba single game scorers
year assists player team game_date opponent score notes playoff
1990 30 Scott Skiles Orlando Magic December 30, 1990 Denver Nuggets 155–116 [a] no
1978 29 Kevin Porter New Jersey Nets February 24, 1978 Houston Rockets 126–112 [b] no
1959 28 Bob Cousy Boston Celtics February 27, 1959 Minneapolis Lakers 173–139 [c] no
1963 28 Guy Rodgers San Francisco Warriors March 14, 1963 St. Louis Hawks 109–114 [d] no
1991 28 John Stockton Utah Jazz January 15, 1991 San Antonio Spurs 124–102 [e] no
1982 27 Geoff Huston Cleveland Cavaliers January 27, 1982 Golden State Warriors 110–106 no
1989 27 John Stockton Utah Jazz December 19, 1989 New York Knicks 107–115 [f] no
1988 26 John Stockton Utah Jazz April 14, 1988 Portland Trail Blazers 123–128 no
1974 25 Ernie DiGregorio Buffalo Braves January 1, 1974 Portland Trail Blazers 120–119 [g] no
@cavedave
cavedave / breaks.csv
Created May 4, 2026 22:08
World Snooker Crucible: ggplot figures from snooker.org century data (R + CSV)
Year Centuries High Break_Makers
2026 81
2025 107 147 Mark Allen
2024 63 142 Jackson Page, Mark J Williams and Ricky Walden
2023 90 147 Kyren Wilson and Mark Selby
2022 109 147 Neil Robertson
2021 108 144 Shaun Murphy
2020 79 147 John Higgins
2019 100 143 John Higgins
2018 84 146 John Higgins
"start_year","end_year","start_value","end_value","change_value","pct_change","winner","winner_label","period","is_original_window"
1900,1910,1000,1057.58394685222,57.5839468522165,5.75839468522165,"Ehrlich","Ehrlich (prices rose)","1900->1910",FALSE
1901,1911,1000,1386.4192309077,386.4192309077,38.64192309077,"Ehrlich","Ehrlich (prices rose)","1901->1911",FALSE
1902,1912,1000,1341.73020560188,341.730205601884,34.1730205601884,"Ehrlich","Ehrlich (prices rose)","1902->1912",FALSE
1903,1913,1000,1487.37147860107,487.371478601067,48.7371478601067,"Ehrlich","Ehrlich (prices rose)","1903->1913",FALSE
1904,1914,1000,1135.6068795084,135.606879508398,13.5606879508398,"Ehrlich","Ehrlich (prices rose)","1904->1914",FALSE
1905,1915,1000,1881.17122655875,881.171226558753,88.1171226558753,"Ehrlich","Ehrlich (prices rose)","1905->1915",FALSE
1906,1916,1000,2024.47833008782,1024.47833008782,102.447833008782,"Ehrlich","Ehrlich (prices rose)","1906->1916",FALSE
1907,1917,1000,1527.06554576622,527.06554576622,52.706554576622,"
@cavedave
cavedave / bigbags.py
Last active March 23, 2026 18:20
Skittles charts: fun-size (Clare Wallace Excel) + full-size packs (possibly-wrong/skittles). https://www.clarewallace.co.uk/skittles | https://github.com/possibly-wrong/skittles | https://github.com/cavedave/skittles
"""
Skittles Analysis — Possibly Wrong dataset
-------------------------------------------
Analyzes 468 full-size Skittles packs from the possibly-wrong dataset.
Same chart style as the Clare Wallace fun-size analysis.
Source: https://github.com/possibly-wrong/skittles
Usage:
pip install pandas matplotlib
"""
Extract coal electricity generation (TWh) by year from Ember data.
China coal can use monthly or yearly data; World uses yearly.
"""
import argparse
import pandas as pd
from pathlib import Path
@cavedave
cavedave / Disruptions.csv
Last active March 12, 2026 13:42
Timeline for Iranian Nuclear weapon
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 5.
start_date,end_date,speaker,role,horizon,claim,source,source_url
1992-10-01,1999-12-31,Shimon Peres,Israeli FM,"by 1999","Iran ""set to have nuclear warheads by 1999"" (as reported in later timelines).",The Christian Science Monitor,https://www.csmonitor.com/World/Middle-East/2011/1108/Imminent-Iran-nuclear-threat-A-timeline-of-warnings-since-1979/Israel-paints-Iran-as-Enemy-No.-1-1992
1992-01-01,1997-12-31,Benjamin Netanyahu,Israeli MK,"within 3–5 years",Iran becoming autonomous in ability to develop/produce a nuclear bomb.,Al Jazeera,https://www.aljazeera.com/gallery/2025/6/18/the-history-of-netanyahus-rhetoric-on-irans-nuclear-ambitions
1993-02-01,1999-12-31,Benjamin Netanyahu,Israeli MK,"by 1999","In a Feb 1993 column (Yedioth Ahronoth) Netanyahu wrote that Iran would develop its first nuclear bomb by 1999.",Ynet,https://www.ynetnews.com/article/4633272
1995-01-05,2000-01-05,Senior US & Israeli officials (quoted),quoted,"less than five years","""Less than five years away"" from having a nuclear bomb (quot