Portfolio
Featured apps, libraries, and tools — organized by category.
Create stunning mathematical animations with a powerful GUI application. Microsoft Store compatible — no administrator rights required.
Created by: Yu Yao-Hsing
License: MIT License
LaTeX Engine: MiKTeX
Format: MSIX Package
Platform: Windows 10+
A complete offline Python animation studio for iPad and iPhone, built on the Manim engine. Edit Python in a Monaco editor, render to MP4 via Apple VideoToolbox hardware encode, drop in LaTeX with busytex — entirely on-device.
ImageMobject snippetCreated by: Yu Yao-Hsing
App Store ID: 6764472686 (manimstudio)
Branch: manim_app/ios
Python: 3.14 (iOS arm64)
Editor: Monaco · Terminal: SwiftTerm + PTY
A self-contained developer / scientific / AI workstation for iPad and Mac. Python 3.14, C, C++, Fortran, pdflatex, and local LLMs — all running on-device, no internet required.
Real Monaco editor in WKWebView. Python IntelliSense with ~70-entry signature DB, hover docs, and live resolve from the embedded Python daemon for numpy / scipy / sklearn / matplotlib / sympy completions.
SwiftTerm-backed terminal piped through a real PTY into the embedded CPython REPL. Type Python directly, or use POSIX-style builtins like ls, grep, ncdu, top, git clone.
busytex (pdftex 1.40.25 + xetex + luatex + bibtex8) running in a hidden WKWebView. TeX Live 2023 preloaded into MEMFS plus a 23 MB overlay with PGF/TikZ/beamer, hyperref, mathtools, microtype, fontspec, CJK.
llama.cpp as an XCFramework — load any Llama / Mistral / Qwen / Phi GGUF model and chat with streaming tokens. ExecuTorch backends for Apple Core ML / XNNPACK kernel-optimized PyTorch inference.
In-process sentence-embedding + vector store over user-imported text / PDF / markdown. Offline image generation via ExecuTorch-runnable diffusion models. All models stay in the app sandbox — no tokens leave the device.
iOS document browser with multiple concurrent workspaces. Auto-save debounced ~600 ms after every keystroke + on run, tab-switch, view-disappear, and app-backgrounding. Tombstone system records deleted files so seeders don't resurrect them.
Monkey-patched torch.matmul / mm / bmm / addmm, F.linear, and SDPA onto Apple's MPSMatrixMultiplication via ctypes → Swift @_cdecl. 2–10× speedup at training sizes. fp32/fp16 native, bf16 via fp32 cast. Autograd-aware via torch.autograd.Function. Auto-installed via sitecustomize.py — zero user code changes.
Live RAM sparkline in the top-right tab bar, command palette (⌘P), editor status bar, tab slide animation, drag-to-select in the terminal (via SwiftTerm doubleTap), and a real Stop button that interrupts the running task.
Opt-in _cb_training.py (~12 KB pure Python) ships OOMGuard, MemoryProfiler, KVCache, and TrainingMonitor. Plus a pure-Python safetensors reader (mmap + struct + torch.frombuffer) so transformers.from_pretrained() works without Rust crates.
Train a LoRA adapter on a GGUF base model in-place via llama.cpp's Metal backward kernels (LlamaFinetuner.swift). Closes the train→deploy loop: fine-tune with PyTorch + HF Trainer (Metal bridge for speed), then convert the .pt to a GGUF adapter with a pure-Python writer for fast Metal inference.
js shell builtin backed by Apple's JavaScriptCore (zero bundle cost) — persistent Node-style REPL globals, js -e one-liners, and js script.js file execution, sitting alongside the python builtin.
IntelliSense engine moved from a 3 s blocking loop to DispatchSource event watch (no held threads), Monaco file opens batched 3 JS round-trips → 1 (~100 ms saved per open), and C/C++/Fortran language providers lazy-register only on first non-Python file.
ChatGPT-style chat panel wired to the local LLM — streaming replies that render compiled LaTeX inline, code-aware assists into the editor, and a one-tap scratch file when there's no target. All on-device; no tokens leave the iPad.
Step through Python with a visual debugger wired into Monaco, data Quick Look for inspecting variables / arrays / frames, plus a redesigned Libraries tab, richer System Info, and a hidden debug panel with a native-lib test probe.
Created by: Yu Yao-Hsing
Platforms: iPad · iPadOS · Mac Catalyst
Runtime: Python 3.14 + four interpreters
Editor: Monaco (VS Code) in WKWebView
Status: Active Development
Full Python 3.14 runtime for iOS/iPadOS with 30+ offline libraries — including native PyTorch, HuggingFace transformers, and Rust tokenizers. Train on-device. No JIT, App Store safe. Powers CodeBench. Its Metal-accelerated pieces also ship as standalone repos: cairometal and torchmetal.
| Library | Ver |
|---|---|
| PyTorch BETA | 2.1.2 |
| transformers BETA | 4.41.2 |
| tokenizers BETA | 0.19.1 |
| scikit-learn | 40 modules |
Native PyTorch (95/95 asserts) + Metal GPU bridge (2–10× speedup) + HuggingFace transformers & Rust tokenizers — train on-device
| Library | Ver |
|---|---|
| matplotlib | 3.9.0 |
| Plotly | 6.6.0 |
| manim BETA | 0.20.1 |
145+ mobjects, 73 animations, interactive Plotly HTML charts
| Library | Type |
|---|---|
| PyAV | 17 C exts |
| FFmpeg | 7 dylibs |
| Cairo + Pango | Native iOS |
| Pillow | 12.2.0 |
| offlinai_latex | SwiftMath + 33MB texmf |
| Library | Purpose |
|---|---|
| PyWebView NEW | v5.4.0 — iOS WKWebView |
| requests | HTTP client |
| BeautifulSoup4 | HTML parse |
| NetworkX | Graphs |
| jsonschema | Validation |
| PyYAML | YAML |
| Library | Ver |
|---|---|
| psutil | 5.9.8 |
| watchdog | 4.0.0 |
| moderngl | 5.12.0 |
| svgelements | 1.9.6 |
| decorator NEW | 5.1.1 |
| safetensors | HF deps |
| huggingface-hub | HF deps |
Real VS Code editor in WKWebView with Python signature help, hover docs, and live resolve from Python for numpy / scipy / sklearn / matplotlib / sympy.
Full Latin Modern Type 1 fonts, expl3 (1.3 MB), firstaid, hyphenation, unicode-data, pdftex.map. Math-mode rendering via SwiftMath is unlimited.
ncdu with arrow-key navigation, top with Apple-chip detection, git clone via zipball fetch, universal --help interception.
Edits persist to disk on every keystroke (debounced) plus on run, tab-switch, view-disappear, and app-backgrounding. No more lost edits on reopen.
Files deleted via UI / shell rm / ncdu's d are recorded so starter-script seeders (pip_demo.py, torch_test_all.py) won't re-create them.
Full integration test for the transformers stack passes 24/24. PyTorch ships 95/95 correctness asserts. First public iOS builds for PyTorch + tokenizers.
_torch_metal_bridge.py patches torch matmul / mm / bmm / addmm, F.linear, and SDPA onto Apple's MPSMatrixMultiplication. 2–10× speedup at training sizes. fp32/fp16 native, bf16 via fp32 cast. Autograd-aware, auto-installed via sitecustomize.py.
Real git push / pull / commit via auto-installed dulwich. Plus pywebview FileDialog enum and faulthandler that writes C-level crashes to ~/Documents/log.txt.
pycairo-compatible 2D vector graphics rendered on the Apple GPU — 246 cm_* functions, stencil-then-cover fills, all 28 compositing operators, IOSurface-backed MTLTexture, pixel-diffed vs real cairo. Cairo has no other Metal backend — to our knowledge this is novel. Standalone repo: cairometal — now pip install cairometal on PyPI (macOS arm64 wheel).
App-Store-safe per-op Metal/MPS routing for PyTorch inference — matmul, linear, softmax, layer_norm, gelu, attention — size + dtype gated with bit-exact CPU fallback. fp16 matmul is often hundreds of times faster than CPU. Public MPS only, no private symbols. Standalone repo: torchmetal.
Memory-safe high-res rendering up to 8K (7680×4320) without tripping iOS jetsam — bounded GIF buffer, frames stream to mp4 instead of accumulating, resolution-tiered RAM pre-flight, h264_videotoolbox encode. Quality selectable 480p→8K.
js shell builtin backed by Apple's JavaScriptCore — zero bundle cost. Persistent REPL globals (Node-style), js -e "code" one-liners, and js script.js file execution. See js-engine.md.
site-packages/Created by: Yu Yao-Hsing
License: MIT
Runtime: Python 3.14 on iOS arm64
Libraries: 30+ (native + pure Python)
Platform: iOS 17+ / iPadOS 17+
A boot manager for your iPad. Bootbox is a native iOS app that boots real operating systems — 64-bit Linux (x86-64 and ARM64), classic Windows, graphical desktops — inside a WebKit-hosted emulation stack, with real internet, real multi-core, files in the iOS Files app, and one-tap downloads for every guest image. Everything runs on-device: no servers, no streaming, no jailbreak.
Genuine aarch64 Alpine (uname -m really reports aarch64) alongside a dual-core x86-64 console guest with Python 3.12, pip/uv, Wine, and real internet.
Windows 98 SE and Windows 2000 Pro boot natively to the desktop via v86, with working internet on Windows 2000 through the NDIS relay.
The x86-64 guest boots dual-core by default with genuine parallel execution (measured 2.0× wall-clock speedup). A cores selector (1/2/4/6/8) sits in the toolbar and UEFI Setup.
A patched engine sleeps on a real futex between polls instead of busy-spinning. Measured: idle ~120% → ~32% host CPU, boot time 30s → ~20s, cooler iPad, longer battery.
pip install backed by uv with ~24 packages pre-installed and 10-minute download timeouts for large wheels. A baked-in constraints file resolves NumPy to the 1.x line for correctness on the emulated CPU.
A classic NSFileProviderExtension exposes the Bootbox folder in the iOS Files app. Materialized files are hard links — drop in .iso/.img, pull guest exports out, zero-copy.
Iosnet.xcframework embeds a gVisor userspace TCP/IP stack — the guest's virtio NIC frames travel over a local WebSocket into native sockets. pip, apk, wget, DNS all work, fully on-device.
Import any .iso/.img via the Files app; paired save-states let a custom install resume in about a second instead of rebooting.
GRUB-style boot menu with per-system notes, a classic Aptio-blue UEFI Setup screen, then serial console on the left and GUI on the right — keyboard routing follows your last tap.
.iso / .imgCreated by: Yu Yao-Hsing
Platform: iPad · iPadOS (Swift host app + WKWebView)
Networking: gVisor userspace TCP/IP via Iosnet.xcframework
App size: ~60 MB · guest images download on demand, once, and are cached
Status: Active development — build from source (Xcode 16+, Apple developer team)
Advanced eigenvalue spectral distribution analysis for generalized covariance matrices. A powerful research tool for mathematicians and data scientists!
Perfect for: Statistical analysis, ML research, quantum mechanics, and financial modeling
Created by: Yu Yao-Hsing
Category: Research & Education
Platform: Windows Store
Type: Desktop App
Status: Active Development
Native macOS image denoiser using random matrix theory — the macOS counterpart to Generalized Covariance Matrix. Pure Swift, Metal-accelerated, App Store sandbox-ready.
MPSMatrixMultiplication for Gram stepdsyevd for eigen-decompositionFor X ∈ ℝ^(p×n) with i.i.d. N(0,1) entries, S_n = (1/n)XXᵀ and T_n = diag(t₁,…,t_p), the generalized sample covariance B_n = S_n T_n. Its Stieltjes transform satisfies a cubic:
a·z·s³ + (a(z − y + 1) + z)·s² + (a + z − y + 1 − y·β·(a − 1))·s + 1 = 0
Limiting density f_{y,H}(z) follows from Cardano's depressed-cubic root; support recovered via bulk-edge function and quartic discriminant for one-interval (Cases 1, 3) vs two-interval (Case 2) topology.
Created by: Yao-Hsing Yu
License: MIT
Platform: macOS 14+ (Apple Silicon)
Type: Native macOS App (App Store ready)
Status: Active Development
Precision GPS workout tracker for iPhone & Apple Watch. Kalman-filtered location, HealthKit sync, Live Activities, CarPlay, and route analytics — all in a clean SwiftUI interface.
Created by: Yu Yao-Hsing
App Store ID: 6764729098
Frameworks: SwiftUI · CoreLocation · HealthKit · ActivityKit · CarPlay
Stack: Pure Swift / SwiftUI
Status: Live on App Store (approved May 18, 2026)
A secure remote window into your Mac, with iPhone and iPad keyboard, trackpad, touch and Apple Pencil input. Everything stays on your own network — the Mac's screen is never published to the Internet.
Apple publishes no third-party API to start a Sidecar session, and its stream cannot be embedded in another iPad app. So In-App Display and System Sidecar stay two separate, honestly labelled modes rather than one pretending to be the other — and the App Store build opens the public Displays settings instead of loading private frameworks.
The in-app route mirrors the main display rather than creating a true extra one. For a real virtual Retina display, audio and extended desktop, Apple's own Sidecar is still the better path, and the app says so.
Created by: Yu Yao-Hsing
App Store ID: 6792298083 — one universal listing for iPhone, iPad and Mac (io.sidecarbridge.mac)
Frameworks: SwiftUI · ScreenCaptureKit · Network.framework · Multipeer Connectivity · CryptoKit · VideoToolbox
Transport: Bonjour + Network.framework on port 45454, Multipeer Connectivity as nearby fallback
Status: Live on the App Store — version 1.0, free, 6.6 MB, Utilities, rated 4+
My own tropical-cyclone model that forecasts a storm's next five days over the western Pacific — track, central pressure, intensity and the wind-field radii. The current release is Trackformer 1.2, which roughly halves track error against 1.1 on a matched benchmark. What this site serves is still Trackformer 1.1: 1.2 takes sea-surface temperature, nearby-storm context and static geography that the live pipeline does not fetch yet, so every forecast and hindcast you see here is a 1.1 run and is labelled as one. The historical Trackformer1.0 ensemble still runs in your browser wherever no 1.1 run covers the initialisation. Live on the Typhoon Tracks explorer, over real JMA forecasts and past storms.
The canonical comparison from the model card: the same 100 storms, the same earliest test initialisation for each, the same +6 h to +120 h leads and the same issue-time boundary. Track error roughly halves. It is not a clean sweep — the radius outputs come out slightly worse — and it is reported that way rather than by picking the flattering rows.
| Matched 100 storms | 1.1 | 1.2 |
|---|---|---|
| Track error, all leads | 802.4 km | 398.4 km |
| Track error, +120 h | 1604.3 km | 808.6 km |
| Wind MAE, all leads | 18.1 kt | 17.6 kt |
| Pressure MAE, all leads | 13.0 hPa | 12.8 hPa |
| RMW MAE, all leads | 26.4 km | 27.0 km |
| R34 MAE, +120 h | 69.4 km | 76.1 km |
Created by: Yu Yao-Hsing
Category: Research & Education — ML / weather
Frameworks: PyTorch · onnxruntime-web · Plotly
Data: NOAA NCEI IBTrACS · NOAA CFSR / CFSv2 analysis · NOMADS f000 · JMA (verification and display only)
Current release: Trackformer 1.2 — weights on Hugging Face and in the 1.2 release
Status: Trackformer1.1 is what runs the Typhoon Tracks explorer; 1.2 is released but not wired into the live pipeline
A complete static reverse-engineering of Apple's on-device foundation model — the sparse Mixture-of-Experts backbone shipped with Apple Intelligence — decoded from its container formats down to a component-validated PyTorch forward pass, plus a working CLI/server over Apple's own runtime. Original research only: the teardown paper and decode code — no Apple weights or tokenizer data are included or distributed. Everything operates on the asset files already present on an Apple device you own.
coreml2hwx toolchainafm, a Swift CLI and OpenAI-compatible server over Apple's FoundationModels runtime, alongside a reconstructed PyTorch forward pass. Component-complete, one mechanical assembly step from coherent from-weights textafmplus-v11.0-ifp — sparse MoE, ~9.86 B stored paramsifp1_r48 = 10 active + 4 sharedcom.apple.MobileAsset.UAF.FM.GenerativeModelsFINDINGS.mdodix parser, weight export, forward passafm CLI + OpenAI-compatible serverCreated by: Yu Yao-Hsing
Category: Research — reverse engineering / ML systems
Languages: TeX · Python · Swift
Target: Apple on-device afmplus-v11.0-ifp (Apple Intelligence, macOS 26/27)
Status: Component-complete teardown; runs the real model via afm
A compiler and application builder written with nothing but the Python standard library. It turns Python into real machine code — and where it needs C in the middle, it compiles that C with a C compiler it also wrote. No Cython, Nuitka, mypyc, Rust, PyInstaller, assembler, linker, SDK, gcc or clang at any point. Build and runtime dependency lists are literally empty, and the test suite fails if that stops being true.
Fastest and smallest. No interpreter in the artifact, and none on the machine it runs on.
2 ** 70 written down is right; a value the program computes past 263 is not. The other two tiers use the interpreter’s own arithmetic and are exact.The middle, and where the work is. Python → C driving the CPython C API → machine code, through py2bin's own C compiler.
The most complete. Ships your program beside an interpreter that runs it; nothing is translated, so nothing is faster.
| Platform | x86-64 | ARM64 |
|---|---|---|
| macOS | Rosetta 2 | native · app |
| Windows | real hardware · app | built, never started |
| Linux | container | container · app |
All six build, and each is held to the same bar — the 889-program corpus compiled for it, every program's output and exit code compared against CPython's. macOS agrees on 886 and differs on 3, inherently: CPython's “Did you mean” needs a live Python frame to suggest from, the repr of a compiled function really is a builtin function's, and "v" is "v" turns on an interning the compiler doesn't reproduce. The cells say how far each target is actually proven, because they differ. “app” marks one a complete third-party GUI application has been built and run on — ManimStudio, 10,100 lines with pywebview, Pillow and manim. Windows x86-64 was run on a physical machine, and that run found four bugs fatal to every Windows program the compiler produced — all in packaging rather than compiled code, none reachable by comparing output, because the program never got as far as a print. Windows ARM64 has never been started: the images are parsed and checked against the format and nothing more, and that is the honest limit of what has been verified.
py2bin makeAsks which file is the program, which machine it is for, and what shape it should take. Everything else is found or downloaded rather than typed — the other .py files beside it, the libraries it imports, an interpreter for the target, web/ and assets/ if they are there, and an icon if one is.
| Target | What comes out |
|---|---|
| macOS | A compressed .dmg holding the app |
| Windows | One .exe that unpacks itself |
| Linux | One executable |
The application is ManimStudio — also on this page — 10,100 lines with pywebview, Pillow and pyobjc. Built both ways on the same machine, interleaved so drift falls on both equally. Every row is scaled to its own maximum and labelled with the real figure.
Compile time: 16.7 s against Nuitka's minutes — left out of the figure above because “minutes” is not a number to scale a bar against. Nuitka wins the fourth row, and the binary is a third the size because Nuitka compiles every module it reaches while this compiles the program and ships its dependencies as bytecode — 7.8 MB of it, which is where most of the 20 MB comes back.
Speed is one question; agreeing with CPython is the other, and here Nuitka is ahead. Seventy-eight whole programs compiled by both, each output compared with what CPython answers for the same source — stdout and exit code, character for character, same machine for all three columns.
| Of 78 programs | py2bin | Nuitka |
|---|---|---|
| answers exactly what CPython answers | 69 | 76 |
| answers something else | 6 | 2 |
refuses, with a file:line:col | 3 | 0 |
It should be ahead: it is a mature project that reimplements CPython's semantics rather than restricting them. Most of the gap is one fact and its consequences — a compiled function here is a builtin_function_or_method, so it has no code object and builds no frame, which is exactly what makes a direct call 2.4× faster and what costs it sys._getframe, tracebacks naming a source line, and inspect.getsource. Two of the differing rows are not a py2bin problem at all: neither compiler reports function for type(f).__name__, and neither has bytecode to hand back. One goes the other way — except* agrees with CPython on 42,100 shapes here and Nuitka answers differently. A corpus covers what somebody thought of, so 1,500 programs drawn at random from the grammar were compiled and compared too: 1,494 match exactly and none is refused, the six that differ all printing a function object. Every number on this page was measured locally rather than read off a green tick: the repository's workflow runs the suite on three operating systems and three Pythons, the corpus on Linux and a cross-build for all six targets, but it has never actually executed — runs queue on that account and never start.
Run time is what you wait for; build memory decides whether the build runs at all. py2bin writes the machine code, the object file and the container in Python and never starts a C toolchain — Nuitka writes C and hands it to clang. Cold is a first build or a CI runner; Nuitka keeps a ccache, py2bin has no build cache of any kind, so its column is the same either way.
| Building | py2bin | Nuitka cold | Nuitka warm |
|---|---|---|---|
| a small program | 42 MB · 0.1 s | 557–656 MB · 16.5 s | 296 MB · 3.7 s |
| 200 functions | 186 MB · 2.0 s | 681 MB · 18.1 s | 423 MB · 4.9 s |
| 1,000 functions | 602 MB · 7.3 s | 946 MB · 22.0 s | 713 MB · 8.1 s |
| 3,000 functions | 1,567 MB · 21.3 s | 1,744 MB · 35.5 s | 1,516 MB · 17.5 s |
The advantage narrows as the program grows, and by three thousand functions it is gone. Nothing here streams — the whole module is held as objects, then as C, then as machine code, all at once — so memory grows with the program, while Nuitka's is dominated by a fixed toolchain cost. That toolchain is counted, and it is most of Nuitka's column: on a small program its tree holds clang at 181 MB and ld at 150 MB beside Python's 300; at three thousand functions ld alone holds 1,210 MB. py2bin's tree holds one Python process and nothing else. The artifact starts in 10.1 ms from 49 KB, against CPython's 13.8 ms and a Nuitka --standalone's 15.4 ms from 17.2 MB.
Loops win; calls do not — and the reason is worth stating rather than hiding. Since 3.11 CPython rewrites hot instructions into specialised forms, so a + between two ints never reaches PyNumber_Add. Emitting a generic C-API call for every operation produces exactly the code the interpreter has learned to avoid. So py2bin does what CPython does: a local the analysis can claim is held in a machine register, with an overflow check that falls back to unbounded arithmetic when the value leaves the word — 3 ** 200 compiled this way is still exact. Calls still lose, and will until a calling convention passes a machine integer as one; today an argument is boxed at the call and unboxed inside.
compile-capi actually does#include, macros, conditionalsThere is no import ctypes anywhere on that path, which a test asserts by compiling in a fresh interpreter and listing what got loaded. ctypes is standard library and would pass an imports-only-stdlib check, but it pulls in subprocess — and there are Pythons, the one on a phone among them, where a subprocess is not something a program may have.
super(), dunders*args/**kwargs2 ** 200 exact!r/!s/!amatch — values, sequences, mappings, classes, guardsyield, send, yield fromasync def/await on a real event loopasync for and async withfinally and with around a suspensionfinally that itself yieldscompile tier still takes only a static subsetA refusal is a file:line:col error, never a silent approximation. A generator becomes a class whose __next__ dispatches on which block to run next — so it is never closed and never finalised by the collector, and cleanup that could silently not happen is refused rather than guessed at.
| Created by | Yu Yao-Hsing |
|---|---|
| Category | Developer tools — compilers / packaging |
| Language | Python, standard library only · 51 modules |
| Requires | Python 3.10+ on the build machine |
| Licence | MIT |
| Status | v0.9.11 — compile-capi under active work |
From PyPI:
pip install python-to-binary
py2bin make
Or from a clone, with nothing installed at all:
PYTHONPATH=src python3 -m py2bin make
On-device speech transcription for iPhone & iPad — Whisper models running entirely on Apple's Neural Engine. Record, import audio/video, or pick from Photos; transcripts never leave your device.
A Python-based creative writing and text processing tool with a modern interface.
View projectTCP-based sound transfer tool for streaming audio between devices over a network.
View projectA Python tool for downloading files from Google Drive with ease and automation.
View project