Skip to content

Instantly share code, notes, and snippets.

View lmmx's full-sized avatar
💡
lights, camera, action

Louis Maddox lmmx

💡
lights, camera, action
View GitHub Profile
@lmmx
lmmx / table.md
Created February 13, 2026 14:01
Review of token classifier model
Category Oral / Literate Avg F1 (≈) Individual Markers (F1) Comment on Why / Causes Verdict
Address & Interaction Oral 0.604 vocative (.675), imperative (.606), second_person (.549), inclusive_we (.608), rhetorical_question (.661), phatic_check (.634), phatic_filler (.495) Strong lexical and syntactic cues; short-range dep
@lmmx
lmmx / demo_academic_hedged.py
Last active February 13, 2026 13:27
Token classifier demo
import json
import torch
from huggingface_hub import hf_hub_download
from transformers import AutoModel, AutoTokenizer
def main():
model_name = "HavelockAI/bert-token-classifier"
marker precision recall f1-score support
B-literate_list_structure 0.975 0.75 0.848 52
O 0.771 0.847 0.807 37244
B-oral_imperative 0.753 0.805 0.778 87
B-literate_footnote_reference 0.81 0.739 0.773 23
B-oral_rhetorical_question 0.649 0.809 0.72 89
I-literate_technical_abbreviation 0.687 0.731 0.709 108
B-oral_inclusive_we 0.603 0.793 0.685 266
I-literate_footnote_reference 0.57 0.821 0.673 84
I-oral_rhetorical_question 0.646 0.683 0.664 840
marker precision recall f1-score support
B-literate_list_structure 0.932 0.788 0.854 52
O 0.75 0.819 0.783 37244
B-oral_inclusive_we 0.581 0.921 0.712 266
B-oral_imperative 0.654 0.782 0.712 87
B-oral_rhetorical_question 0.535 0.933 0.68 89
B-literate_conditional 0.595 0.742 0.661 97
B-literate_concessive 0.517 0.818 0.634 55
I-oral_rhetorical_question 0.683 0.554 0.611 840
B-oral_phatic_check 0.467 0.875 0.609 24
@lmmx
lmmx / transcript.md
Last active February 8, 2026 13:36
Transcript of BlueSky thread in replies to Armin Ronacher post

A: This Tweet is making the rounds: "Nearly every ambitious person I know who has dived into Al is working harder than ever, and longer hours than ever. Fascinating dynamic tbh. I have NEVER worked this hard, nor had this much fun with work." I'm in this Tweet.

C: Suggests a very, ah, particular attitude to pre LLM SE imho. You're not the first people to invent excitement or better mechanical advantage in SE. The Al crowd are culturally rooted in old languages, building not proving etc. Fine. But different interests would mean different tools excite

@lmmx
lmmx / vcd.sh
Created February 7, 2026 21:41
Ascend to the dir containing a .venv
vcd() {
local dir="$PWD"
while [[ "$dir" != "/" ]]; do
if [[ -d "$dir/.venv" ]]; then
cd "$dir" || return
return
fi
dir="$(dirname "$dir")"
done
@lmmx
lmmx / demo.py
Last active February 3, 2026 20:53
Selecting between paths based on their existence on the filesystem using default validation at runtime
from pathlib import Path
from typing import Annotated
from pydantic import BaseModel, BeforeValidator, Field, FilePath
PathA = Annotated[FilePath, BeforeValidator(lambda _: Path("a.txt"))]
PathB = Annotated[FilePath, BeforeValidator(lambda _: Path("b.txt"))]
class MyModel(BaseModel):
@lmmx
lmmx / SKILL.md
Created January 29, 2026 20:47
PDF transcription skill

SKILL: Document Transcription Pipeline

This guide describes how to transcribe a PDF document (book or paper) into a hierarchical modular directory tree of markdown files. Follow each step in order.

Overview

The pipeline produces:

  1. Split PDFs - one per top-level group (chapter/section), extracted with qpdf
  2. Transcript files - page-level markdown files with YAML frontmatter, named by page number
@lmmx
lmmx / Review.md
Last active January 25, 2026 17:37
Claude Code analysis of the "AI Stupid meter" code base
@lmmx
lmmx / GUIDE.md
Last active January 22, 2026 23:13
Orality-to-Literacy Register Transformation prompt

Modulating Text Toward Literate Register: A Practical Guide

Theoretical Foundation

The distinction between oral and literate modes of expression, as elaborated in Walter J. Ong's Orality and Literacy: The Technologizing of the Word (1982), concerns not merely the medium of transmission but the underlying cognitive and syntactic structures that organise thought. Oral discourse—shaped by the constraints of memory and real-time performance—exhibits characteristic markers: additive syntax, formulaic aggregation, redundancy, participatory engagement,