# Runnable examples

Run `python examples/python_example.py`. Compile the TypeScript implementation
and example with the repository TypeScript compiler, then run the emitted
JavaScript. Both use the same visibly synthetic two-asset fixture.

## Reproduce locally

Run these commands from this topic folder. Python 3.10+ uses only its standard library.

```bash
python examples/python_example.py
python -m unittest discover -s tests -p "test_*.py"
```

For TypeScript, use the repository's installed compiler and Node.js. The explicit-source command below uses the installed TypeScript 7.0.2 compiler's `--ignoreConfig` option:

```bash
node ../../../../../node_modules/typescript/bin/tsc --ignoreConfig --target ES2022 --module NodeNext --moduleResolution NodeNext --types node --strict --skipLibCheck --outDir .build examples/typescript_example.ts
node .build/examples/typescript_example.js
```

The Python/TypeScript fixture values and regression cases are shared. Use `status` and residuals before interpreting an iterative result. The lab embeds the compiled canonical TypeScript calculation and needs no server or network to compute.
