Skip to content

Instantly share code, notes, and snippets.

@etjones
etjones / jaxtyping_torch_demo.py
Last active February 4, 2025 21:53
Minimal example of using Jaxtyping and Beartype to enforce Pytorch.Tensor dimensions at runtime.
#!/usr/bin/env python3
# `uv` makes this easier. Run this with `uv run jaxtyping_torch_demo.py`.
# /// script
# dependencies = [
# "beartype>=0.19.0",
# "jaxtyping>=0.2.36",
# "numpy>=2.1.3",
# "torch>=2.5.1",
@etjones
etjones / cut_operator_broken.step
Created August 25, 2026 19:31
build123d clean() seam-face geometry loss: reproduction script + broken/workaround STEP pairs
ISO-10303-21;
HEADER;
FILE_DESCRIPTION(('Open CASCADE Model'),'2;1');
FILE_NAME('Open CASCADE Shape Model','2026-08-25T14:28:32',('Author'),(
'Open CASCADE'),'Open CASCADE STEP processor 7.9','build123d',
'Unknown');
FILE_SCHEMA(('AUTOMOTIVE_DESIGN { 1 0 10303 214 1 1 1 1 }'));
ENDSEC;
DATA;
#1 = APPLICATION_PROTOCOL_DEFINITION('international standard',