"""I DROWNED MOBY-DICK: deterministic erasure + offline participatory instrument. No network, credentials, account, signature, tracking, package install or deployment. Python 3.10+ standard library. Original code: Grouper, MIT; Melville prose public domain (US). """ from pathlib import Path import argparse, hashlib, html, json, re, bisect, zipfile, datetime D=Path(__file__).resolve().parent CA='0x3eb2984a7eF1C2E33f2D919DB775B0f6E190FE16' URL='https://midaswhale.wtf/USDG/' WET={'sea','seas','ocean','oceans','water','waters','whale','whales','fish','fishes','swim','swam','swimming','gills','tide','tides','wave','waves','deep','depths','drowned','drowning','salt','foam','surf','current','currents'} def prepare(raw,seed=4663): body=raw.split('*** START OF THE PROJECT GUTENBERG EBOOK',1)[1].split('***',1)[1].split('*** END OF THE PROJECT GUTENBERG EBOOK',1)[0].strip() # Remove contents/front matter: the final CHAPTER 1 marker is the narrative's start. starts=list(re.finditer(r'(?m)^CHAPTER 1\. Loomings\.',body));assert len(starts)==2 body=body[starts[-1].start():] assert body.count('Call me Ishmael.')==1 and 'Project Gutenberg' not in body tokens=body.split(); n=len(tokens) anchors=[i for i,w in enumerate(tokens) if re.sub('[^a-z]','',w.lower()) in WET] assert anchors dist=[];j=0 for i in range(n): while j+1