[{"content":"This post is sample content generated by Claude.\nThe invitations went out on tiny paper squares. The guests — one bear, one rabbit, and a thoughtful hedgehog — arrived exactly on time, which for a tea party means whenever the kettle whistles.\nBrewing, briefly # Every good tea party begins with a timer. Hedgehog, who is methodical, insisted on writing one.\nfrom dataclasses import dataclass @dataclass class Brew: tea: str minutes: int def describe(self) -\u0026gt; str: return f\u0026#34;{self.tea}, steeped for {self.minutes} minutes\u0026#34; earl_grey = Brew(tea=\u0026#34;Earl Grey\u0026#34;, minutes=4) print(earl_grey.describe()) Bear read the output slowly, nodded once, and reached for the sugar bowl.\nThe biscuit list # Shortbread, cut into triangles Ginger snaps (slightly burnt, still loved) One lemon biscuit, reserved for Rabbit Sharing, fairly # There were three biscuits of each kind, and three guests. Rabbit, who is fond of arithmetic, offered to divide them.\nfrom collections.abc import Iterable def share(biscuits: Iterable[str], guests: list[str]) -\u0026gt; dict[str, list[str]]: plates: dict[str, list[str]] = {g: [] for g in guests} for i, biscuit in enumerate(biscuits): plates[guests[i % len(guests)]].append(biscuit) return plates biscuits = [\u0026#34;shortbread\u0026#34;] * 3 + [\u0026#34;ginger snap\u0026#34;] * 3 + [\u0026#34;lemon\u0026#34;] * 1 guests = [\u0026#34;Bear\u0026#34;, \u0026#34;Rabbit\u0026#34;, \u0026#34;Hedgehog\u0026#34;] for guest, plate in share(biscuits, guests).items(): print(f\u0026#34;{guest}: {\u0026#39;, \u0026#39;.join(plate)}\u0026#34;) The lemon biscuit went to Rabbit, as was customary. No one objected. One cannot argue with a well-written loop.\nAfterwards # And then they sat quietly for a while, because that is the best part of any tea party, and no Python is needed for it at all.\nThe teapot was empty. The sun had moved. Hedgehog, who had not said much all afternoon, said \u0026ldquo;that was nice,\u0026rdquo; and everyone agreed.\n","date":"19 April 2026","externalUrl":null,"permalink":"/posts/a-very-small-tea-party/","section":"Posts","summary":"Three biscuits, one teapot, and a handful of Python to keep everything fair.","title":"A Very Small Tea Party","type":"posts"},{"content":"","date":"19 April 2026","externalUrl":null,"permalink":"/categories/","section":"Categories","summary":"","title":"Categories","type":"categories"},{"content":"","date":"19 April 2026","externalUrl":null,"permalink":"/tags/cats/","section":"Tags","summary":"","title":"Cats","type":"tags"},{"content":"","date":"19 April 2026","externalUrl":null,"permalink":"/tags/example/","section":"Tags","summary":"","title":"Example","type":"tags"},{"content":"This post is sample content generated by Claude.\npython/cpython The Python programming language Python 72383 34449 The marmalade, as is customary, arrived before the marmalade spoon, which is the sort of misfortune one learns to endure with quiet dignity. A small committee was formed to address the matter. The committee dissolved itself before lunch, having achieved nothing in particular and rather enjoyed it.\nOf badgers and their terrible piano # The badger had purchased a piano on a Tuesday, which is the wrong day for pianos, though nobody could agree on the right one. It refused to tune itself and sulked in the hallway for most of the afternoon. We stepped around it politely and spoke of other things.\nA minimal Python function:\ndef greet(name: str) -\u0026gt; str: \u0026#34;\u0026#34;\u0026#34;Return a friendly greeting.\u0026#34;\u0026#34;\u0026#34; return f\u0026#34;Hello, {name}!\u0026#34; if __name__ == \u0026#34;__main__\u0026#34;: print(greet(\u0026#34;world\u0026#34;)) A modest inventory # One teaspoon, slightly bent Three envelopes, all of them empty A hat that belonged, briefly, to someone important Elsewhere, and with great enthusiasm # The postmaster rowed across the pond in a canoe made entirely of receipts. This was, he explained, perfectly ordinary, and he had the paperwork to prove it. Consider a small dataclass with a computed property:\nfrom dataclasses import dataclass from datetime import date @dataclass(frozen=True) class Post: title: str published: date tags: tuple[str, ...] = () @property def slug(self) -\u0026gt; str: return self.title.lower().replace(\u0026#34; \u0026#34;, \u0026#34;-\u0026#34;) post = Post(title=\u0026#34;Lorem Ipsum\u0026#34;, published=date.today(), tags=(\u0026#34;example\u0026#34;,)) print(post.slug) Three further intentions # Count the swans, but only the polite ones Deliver a stern letter to the weather Return the library book, which was never borrowed in the first place The pipeline, at last # A procession of otters, each more formally dressed than the last, filed through the kitchen and out the back door. Nobody knew where they were going, and nobody asked, because it seemed rude. A generator-based pipeline illustrates lazy iteration:\nfrom collections.abc import Iterable, Iterator def only_even(numbers: Iterable[int]) -\u0026gt; Iterator[int]: for n in numbers: if n % 2 == 0: yield n def squared(numbers: Iterable[int]) -\u0026gt; Iterator[int]: for n in numbers: yield n * n pipeline = squared(only_even(range(10))) print(list(pipeline)) # [0, 4, 16, 36, 64] All things come to those who wait, provided what they were waiting for was a parade of otters, which in this case it evidently was.\nInline code like pathlib.Path and sum(range(10)) should render with the monospace treatment. That concludes this whimsical sample.\n","date":"19 April 2026","externalUrl":null,"permalink":"/posts/example-post/","section":"Posts","summary":"A whimsical sample post demonstrating typography, headings, and Python code blocks.","title":"Example Post With Python Snippets","type":"posts"},{"content":"","date":"19 April 2026","externalUrl":null,"permalink":"/categories/examples/","section":"Categories","summary":"","title":"Examples","type":"categories"},{"content":"","date":"19 April 2026","externalUrl":null,"permalink":"/","section":"Frolicking Notes","summary":"","title":"Frolicking Notes","type":"page"},{"content":"","date":"19 April 2026","externalUrl":null,"permalink":"/tags/nonsense/","section":"Tags","summary":"","title":"Nonsense","type":"tags"},{"content":"This post is sample content generated by Claude.\nPixel is a tabby cat with opinions. She has decided, after watching a human stare at a glowing rectangle for many hours, that she too will learn Python. She sits on the keyboard. This is her first contribution.\nA nap, modelled precisely # Cats are serious about naps. Pixel wanted a function that would tell her, given the time of day, whether a nap was due. The answer, she discovered, is almost always yes.\nfrom datetime import time def should_nap(now: time) -\u0026gt; bool: \u0026#34;\u0026#34;\u0026#34;Cats are always right about this.\u0026#34;\u0026#34;\u0026#34; return True if __name__ == \u0026#34;__main__\u0026#34;: print(should_nap(time(3, 47))) # True print(should_nap(time(14, 15))) # Also True She purred. The function passed peer review (one peer, also a cat).\nCounting the treats # Pixel\u0026quot;s second program was more ambitious: a treat ledger. She insists on fairness, which in her dialect means \u0026ldquo;more for Pixel.\u0026rdquo;\nfrom collections import Counter treats_given = [\u0026#34;salmon\u0026#34;, \u0026#34;salmon\u0026#34;, \u0026#34;chicken\u0026#34;, \u0026#34;salmon\u0026#34;, \u0026#34;tuna\u0026#34;] ledger = Counter(treats_given) favourite, count = ledger.most_common(1)[0] print(f\u0026#34;Pixel\u0026#39;s favourite: {favourite} ({count} times)\u0026#34;) The output confirmed what she already knew. Salmon. Always salmon.\nA small list of demands # Warm laptop, please The red dot, again The good crinkly bag Absolutely no baths The sunbeam scheduler # By the afternoon Pixel had discovered generators. She used one to track sunbeams as they crept across the floor, because a sunbeam uncaught is a sunbeam wasted.\nfrom collections.abc import Iterator def sunbeams(hours: int) -\u0026gt; Iterator[str]: for h in range(hours): yield f\u0026#34;hour {h}: sunbeam at position {h * 2}\u0026#34; for beam in sunbeams(4): print(beam) She curled into each one in turn, then closed her laptop with a decisive paw. Enough code for today. Time for a nap.\n","date":"19 April 2026","externalUrl":null,"permalink":"/posts/pixel-the-cat-learns-python/","section":"Posts","summary":"A very small cat attempts a very small program. Results are mixed, whiskers are twitched.","title":"Pixel the Cat Learns Python","type":"posts"},{"content":"","date":"19 April 2026","externalUrl":null,"permalink":"/posts/","section":"Posts","summary":"","title":"Posts","type":"posts"},{"content":"","date":"19 April 2026","externalUrl":null,"permalink":"/tags/python/","section":"Tags","summary":"","title":"Python","type":"tags"},{"content":"","date":"19 April 2026","externalUrl":null,"permalink":"/tags/","section":"Tags","summary":"","title":"Tags","type":"tags"},{"content":"","date":"19 April 2026","externalUrl":null,"permalink":"/tags/tea/","section":"Tags","summary":"","title":"Tea","type":"tags"},{"content":"","externalUrl":null,"permalink":"/authors/","section":"Authors","summary":"","title":"Authors","type":"authors"},{"content":"","externalUrl":null,"permalink":"/series/","section":"Series","summary":"","title":"Series","type":"series"}]