Skip to content

Instantly share code, notes, and snippets.

Subject: Round 23: Tax man came and took my $$$, now all my other bills are gonna be late

(Have a complaint about this email? Want to make it better, fix a typo, or add more info? Fork the gist on GitHub! Or, click through to read a rendered version.)

Hello Hackers-

### Keybase proof
I hereby claim:
* I am jimn on github.
* I am jimn (https://keybase.io/jimn) on keybase.
* I have a public key whose fingerprint is ADDE A431 4676 5C13 C06B C6F8 F859 E8B0 EE55 721A
To claim this, I am signing this object:
@jimn
jimn / bikeweather.py
Created June 11, 2025 16:25
bikeweather - a command line tool to see upcoming weather and how wet the roads are likely to be
import requests, json
from datetime import datetime, timedelta
API_KEY = "<< weatherapi.com API key goes here >>"
LAT = << latitude >> # Approximately where home is
LON = << longitude >>
LOCATION = f"{LAT},{LON}"
now = datetime.now() # do this once
import sys
symbols = {
0: '__',
1: '❌',
2: '⭕'
}
grid = [[0,0,0], [0,0,0], [0,0,0]]
def generate_sequence(start: int, end: int, steps: int):
if steps < 2:
return [start] if steps == 1 else []
# Compute approximate ratio for geometric progression by doing end/start to the power of steps as a fraction
ratio = (end / start) ** (1 / (steps - 1))
seq = [start]
for i in range(1, steps - 1):