import pandas as pd
visits = pd.read_csv("visits_2026.csv", parse_dates=["booked_for"])
visits["weekday"] = visits["booked_for"].dt.day_name()
Cron line, explained
A schedule taken apart field by field, each value sitting over its name, then the same thing in plain words and the next three runs. For settings pages and ops docs.
30minute
6hour
*day of month
*month
1-5day of week
runs/opt/roastery/bin/roast-plan --notify
Every weekday at 06:30, Monday to Friday, in any month.
The code
Plain HTML and CSS on your kit's variables. Put it next to tokens/variables.css from your kit's files and it draws in your look.
<div class="ukc-code-cron-explained">
<figure class="cx">
<figcaption class="cap"><span class="k">crontab · roastery-01</span><button class="copy" type="button" aria-label="Copy the cron line"><svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="8" y="8" width="12" height="12" rx="1"/><path d="M16 8V4H4v12h4"/></svg>Copy</button></figcaption>
<div class="expr" role="group" aria-label="Schedule, field by field">
<span class="fld"><code>30</code><span class="lb">minute</span></span>
<span class="fld"><code>6</code><span class="lb">hour</span></span>
<span class="fld any"><code>*</code><span class="lb">day of month</span></span>
<span class="fld any"><code>*</code><span class="lb">month</span></span>
<span class="fld"><code>1-5</code><span class="lb">day of week</span></span>
</div>
<p class="cmd"><span class="lb">runs</span><code>/opt/roastery/bin/roast-plan --notify</code></p>
<p class="means">Every weekday at <b>06:30</b>, Monday to Friday, in any month.</p>
<ol class="next" aria-label="Next three runs">
<li><time datetime="2026-11-30T06:30">Mon 30 Nov, 06:30</time></li>
<li><time datetime="2026-12-01T06:30">Tue 1 Dec, 06:30</time></li>
<li><time datetime="2026-12-02T06:30">Wed 2 Dec, 06:30</time></li>
</ol>
</figure>
</div>
.ukc-code-cron-explained { position: relative; font-family: var(--uk-font-body, system-ui, sans-serif); color: var(--uk-ink); font-size: 15px; line-height: 1.5;
--tint: color-mix(in srgb, var(--uk-accent) 12%, var(--uk-paper));
--tint-strong: color-mix(in srgb, var(--uk-accent) 22%, var(--uk-paper));
--accent-deep: color-mix(in srgb, var(--uk-accent) 72%, black);
--ink-soft: color-mix(in srgb, var(--uk-ink) 8%, var(--uk-paper));
--line-strong: color-mix(in srgb, var(--uk-ink) 32%, var(--uk-paper));
--danger-tint: color-mix(in srgb, var(--uk-danger) 12%, var(--uk-paper));
--high-tint: color-mix(in srgb, var(--uk-highlight) 28%, var(--uk-paper)); }
.ukc-code-cron-explained *, .ukc-code-cron-explained *::before, .ukc-code-cron-explained *::after { box-sizing: border-box; }
.ukc-code-cron-explained :where(h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote) { margin: 0; }
.ukc-code-cron-explained :where(ul, ol) { padding: 0; list-style: none; }
.ukc-code-cron-explained :where(button, input, select, textarea) { font: inherit; color: inherit; }
.ukc-code-cron-explained :where(a) { color: inherit; }
.ukc-code-cron-explained svg { flex: none; }
.ukc-code-cron-explained .cx { max-width: 480px; margin: 0; }
.ukc-code-cron-explained .cap { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--uk-line); }
.ukc-code-cron-explained .k { color: var(--uk-muted); font: 11px/1.5 var(--uk-font-mono, ui-monospace, monospace); letter-spacing: 0.08em; text-transform: uppercase; }
.ukc-code-cron-explained .copy { display: inline-flex; align-items: center; gap: 6px; flex: none; padding: 5px 10px; border: 1px solid var(--uk-line); border-radius: var(--uk-radius-sm); background: var(--uk-paper); color: var(--uk-ink); font-size: 12px; font-weight: 500; line-height: 1.4; cursor: pointer; transition: border-color var(--uk-motion-duration) var(--uk-motion-ease), background-color var(--uk-motion-duration) var(--uk-motion-ease); }
.ukc-code-cron-explained .copy:hover { border-color: var(--line-strong); }
.ukc-code-cron-explained .copy:focus-visible { outline: 2px solid var(--uk-accent); outline-offset: 2px; }
.ukc-code-cron-explained .expr { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; padding-top: 18px; }
.ukc-code-cron-explained .fld { display: grid; justify-items: center; align-content: start; gap: 8px; }
.ukc-code-cron-explained .fld code { font: 600 28px/1 var(--uk-font-mono, ui-monospace, monospace); letter-spacing: -0.02em; }
.ukc-code-cron-explained .fld.any code { color: var(--uk-muted); font-weight: 400; }
.ukc-code-cron-explained .lb { color: var(--uk-muted); font-size: 10.5px; font-weight: 600; line-height: 1.3; letter-spacing: 0.06em; text-align: center; text-transform: uppercase; }
.ukc-code-cron-explained .fld .lb { width: 100%; }
.ukc-code-cron-explained .fld .lb::before { content: ""; display: block; height: 5px; margin-bottom: 5px; border: 1px solid var(--line-strong); border-top: 0; }
.ukc-code-cron-explained .fld:not(.any) .lb { color: var(--uk-ink); }
.ukc-code-cron-explained .cmd { display: flex; align-items: baseline; gap: 10px; margin-top: 16px; padding: 8px 12px; border: var(--uk-border-width) solid var(--uk-line); border-radius: min(var(--uk-radius-md), 10px); background: var(--uk-surface); }
.ukc-code-cron-explained .cmd code { min-width: 0; font: 12.5px/1.5 var(--uk-font-mono, ui-monospace, monospace); overflow-wrap: anywhere; }
.ukc-code-cron-explained .means { margin-top: 14px; font-family: var(--uk-font-display, inherit); font-size: 19px; line-height: 1.35; text-wrap: balance; }
.ukc-code-cron-explained .means b { font-weight: 600; text-decoration: underline; text-decoration-color: var(--uk-accent); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.ukc-code-cron-explained .next { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.ukc-code-cron-explained .next li { padding: 2px 10px; border: 1px solid var(--uk-line); border-radius: var(--uk-radius-sm); font: 12px/1.6 var(--uk-font-mono, ui-monospace, monospace); font-variant-numeric: tabular-nums; }
.ukc-code-cron-explained .next li:first-child { border-color: var(--uk-ink); font-weight: 600; }
.ukc-code-cron-explained .next li:first-child::before { content: "Next "; color: var(--uk-muted); font-weight: 400; }
More code blocks
All 24Listing 4.2A running mean over tide gauge readings def moving_average(values, window): if window < 1 or window > len(values): return [] total = sum(values[:window]) out = [total / window] for i in range(window, len(values)): total += values[i] - values[i - window] out.append(total / window) return outLine 7Each step adds the newest reading and drops the oldest, so the loop never sums the whole window again.
No-shows by weekday
Harlow Street Clinic, bookings from January to October 2026.
[3][4]
[4]rate = visits.groupby("weekday")["no_show"].mean() * 100 rate.round(1).sort_values(ascending=False).head(3)weekday Monday 14.2 Friday 11.8 Wednesday 7.9 Name: no_show, dtype: float64
[*]visits.to_parquet("visits.parquet")Running for 4 s
Run 482 · main · a41c9e2
Fix family ticket rounding
Failed in 2m 03s
- PassedCheck out code2s
- PassedInstall dependencies41s
- PassedLint12s
-
FailedRun tests1m 08s
$ npm test PASS tests/cart.test.ts (14 tests) PASS tests/timeslots.test.ts (19 tests) FAIL tests/pricing.test.ts (9 tests, 1 failed) family ticket covers two adults and three children Expected: 38 Received: 47.5 at tests/pricing.test.ts:27:31 Tests: 1 failed, 41 passed, 42 total Process exited with code 1
- SkippedDeploy to stagingskipped
- src/hours/closed-days.tsConflict 1 of 3
export const closedDays = [ "2026-12-25", <<<<<<< mainkeptdropped "2026-12-31", // stocktake ======= "2027-01-02", // staff day >>>>>>> holiday-hourskeptdropped ];Result keeps the stocktake day from main.Result keeps the staff day from holiday-hours.Result keeps both days, main first.
Filter a day with a rangeMarina bookings · Postgres
AvoidThe function hides the column from its index. SELECT id, berth, starts_at FROM bookings WHERE date(starts_at) = '2026-12-05';PreferA plain range the index can walk. SELECT id, berth, starts_at FROM bookings WHERE starts_at >= '2026-12-05' AND starts_at < '2026-12-06';Git, the five you use daily
git switch -c fix/late-feesStart a branch and move onto itgit add -pStage your changes one hunk at a timegit commit --amend --no-editFold what is staged into the last commitgit stash push -m wip-feesPark unfinished work under a namegit log --oneline -5See the last five commits, one line each
Swap
fix/late-feesandwip-feesfor your own names.