Skip to content

Instantly share code, notes, and snippets.

@osm3000
osm3000 / benchmark.py
Last active June 10, 2025 03:29
Benchmarking matrix multiplication (on CPU) across different machines
import timeit
import torch
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
def main():
all_results = []
for dim in [16, 32, 64, 128, 256, 512, 1024, 2048]:
runtimes = []
@osm3000
osm3000 / kebab_analysis.py
Created March 9, 2025 14:55
My futile attempt to understand the kebab logic
"""
The core code for the kebab restaurant analysis project.
Notes:
- Given that I couldn't get the Google Maps python SDK to work, but the curl requests work perfectly (!!), this is a wrapper with "requests" to make the requests to the Google Maps API.
"""
from dotenv import load_dotenv
load_dotenv()
@osm3000
osm3000 / springer-free-maths-books.md
Created December 28, 2015 22:49 — forked from bishboria/springer-free-maths-books.md
Springer have made a bunch of maths books available for free, here are the direct links
[{"place_id":"97994878","licence":"Data \u00a9 OpenStreetMap contributors, ODbL 1.0. http:\/\/www.openstreetmap.org\/copyright","osm_type":"relation","osm_id":"161950","boundingbox":["30.1375217437744","35.0080299377441","-88.4731369018555","-84.8882446289062"],"lat":"33.2588817","lon":"-86.8295337","display_name":"Alabama, United States of America","place_rank":"8","category":"boundary","type":"administrative","importance":0.83507032450272,"icon":"http:\/\/nominatim.openstreetmap.org\/images\/mapicons\/poi_boundary_administrative.p.20.png"}]
[{"place_id":"97421560","licence":"Data \u00a9 OpenStreetMap contributors, ODbL 1.0. http:\/\/www.openstreetmap.org\/copyright","osm_type":"relation","osm_id":"162018","boundingbox":["31.3321762084961","37.0042610168457","-114.818359375","-109.045196533203"],"lat":"34.395342","lon":"-111.7632755","display_name":"Arizona, United States of America","place_rank":"8","category":"boundary","type":"administrative","importance":0.83922181098242,"icon":"http:\/\/nominatim.openst
{
"Mississippi": [30.1477890014648, 34.9960556030273, -91.6550140380859, -88.0980072021484],
"Oklahoma": [33.6191940307617, 37.0021362304688, -103.002571105957, -94.4312133789062],
"Delaware": [38.4511260986328, 39.8394355773926, -75.7890472412109, -74.9846343994141],
"Minnesota": [43.4994277954102, 49.3844909667969, -97.2392654418945, -89.4833831787109],
"Illinois": [36.9701309204102, 42.5083045959473, -91.513053894043, -87.0199203491211],
"Arkansas": [33.0041046142578, 36.4996032714844, -94.6178131103516, -89.6422424316406],
"New Mexico": [31.3323001861572, 37.0001411437988, -109.050178527832, -103.000862121582],
"Indiana": [37.7717399597168, 41.7613716125488, -88.0997085571289, -84.7845764160156],
"Louisiana": [28.9210300445557, 33.019458770752, -94.0431518554688, -88.817008972168],