How to wrangle data from source to a data product.
This is what works for me.
- Find the original source. Keep a copy somewhere. My inclination is to keep it in the Git repository if it's small enough, or add it to
#!/usr/bin/env -S uv run --script | |
# | |
# /// script | |
# requires-python = ">=3.12" | |
# dependencies = ["python-fasthtml"] | |
# /// | |
from datetime import datetime | |
from fasthtml.common import * |
import glob | |
import logging | |
import os | |
import sqlite3 | |
from contextlib import contextmanager | |
import config | |
class Database: | |
def __init__(self, path=None): |
import argparse | |
import datetime | |
import json | |
import os | |
import urllib.request | |
DOC = """ | |
<!doctype html> | |
<head> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> |
#!/usr/bin/env -S uv run --script | |
# /// script | |
# requires-python = ">=3.13" | |
# dependencies = [ | |
# "einops>=0.8.1", | |
# "pillow>=11.2.1", | |
# "pyvips>=3.0.0", | |
# "torch>=2.7.1", | |
# "transformers>=4.52.4" | |
# ] |
body { | |
color: #444; | |
font: 16px/1.5 Libre Baskerville, Serif; | |
margin: 40px auto; | |
max-width: 650px; | |
padding: 0 10px; | |
} | |
header, footer, nav { | |
text-align: center; |
TL;DR I want to use this camera without using the app, there are no buttons or screens on the camera itself, and the camera app isn't that great to use. Can I liberate it?
I bought this little action camera to use on my motorbike, and noticed that it creates a WiFi network to handle data transfer. Does it do anything else?
| SSID | Password |
import argparse | |
import csv | |
import json | |
""" | |
UK General Election Results to GeoJSON script. | |
Data used: | |
- <https://commonslibrary.parliament.uk/research-briefings/cbp-10009/>, use the CSV |
import argparse | |
import json | |
import xml.etree.ElementTree | |
""" | |
UK food hygiene rating API XML to GeoJSON converter. | |
How to use: | |
1. Download a food hygiene ratings file for your local authority area |
Summary of 8080 Instructions | |
------- -- ---- ------------ | |
Abbreviations used in this Summary: | |
R Any of the 8-Bit registers A,B,C,D,E,H,L. | |
data Any 8-bit or 16-bit value. | |
PC Program Counter. | |
SP Stack Pointer. |