Skip to content

Instantly share code, notes, and snippets.

@cavedave
cavedave / july1976.ipynb
Created June 14, 2025 08:19
july1976.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cavedave
cavedave / judge.ipynb
Created June 10, 2025 09:01
Judge.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cavedave
cavedave / spring3.ipynb
Created June 6, 2025 09:36
Spring3.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cavedave
cavedave / armagh-weather.ipynb
Last active June 4, 2025 09:15
armagh-weather.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cavedave
cavedave / dollar.ipynb
Created June 1, 2025 17:44
dollar.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cavedave
cavedave / nationalgallery.ipynb
Created May 26, 2025 18:26
NationalGallery.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cavedave
cavedave / code
Last active May 25, 2025 14:33
The pointer that never lies. 1. put the code below into microbit 2. attache a kitronik 25105 servo to the microbit. ask questions like 'Does Daddy Smell?'
input.onButtonPressed(Button.A, function () {
angle = 110
// quick label
basic.showString("L")
pins.servoWritePin(AnalogPin.P0, angle)
basic.pause(200)
})
input.onButtonPressed(Button.B, function () {
angle = 0
basic.showString("R")
@cavedave
cavedave / dtesf2.csv
Last active January 2, 2026 16:45
People mentioned in We Didnt start the fire by Billy Joel. Data that is used to create the dots for when the event referenced in the song is from https://en.wikipedia.org/wiki/List_of_references_in_We_Didn%27t_Start_the_Fire and https://everyday-learning.org/we-didnt-start-the-fire-historical-references/
lyric subject date subject2 birth_year death_year category
"Harry Truman" Harry S. Truman November 2, 1948 Harry S. Truman 1884.0 1972.0 Politics
"Doris Day" Doris Day June 25, 1948 Doris Day 1922.0 2019.0 Entertainment
"Red China" Proclamation of the People's Republic of China October 1, 1949
"Johnnie Ray" Johnnie Ray 1949 Johnnie Ray 1927.0 1990.0 Entertainment
"South Pacific" South Pacific (musical) April 7, 1949
"Walter Winchell" Walter Winchell 1950 Walter Winchell 1897.0 1972.0 Other
"Joe DiMaggio" Joe DiMaggio February 7, 1949 Joe DiMaggio 1914.0 1999.0 Sports
"Joe McCarthy" Joseph McCarthy February 9, 1950 Joe McCarthy 1908.0 1957.0 Politics
"Richard Nixon" Richard Nixon November 7, 1950 Richard Nixon 1913.0 1994.0 Politics
@cavedave
cavedave / vesuvius.ipynb
Created May 14, 2025 09:08
vesuvius.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cavedave
cavedave / smalln.py
Created May 13, 2025 15:05
Chess puzzle by Martin Gardner: Place a queen, king, bishop, rook, and knight on a 4 by 4 chessboard so that no pieces is attacking any other.
from z3 import *
from itertools import combinations
# === Parameters ===
N = 4 # Board size
solver = Solver()
# === Helper functions ===
def z3_abs(x):
return If(x >= 0, x, -x)