Skip to content

Instantly share code, notes, and snippets.

View pszemraj's full-sized avatar

Peter pszemraj

View GitHub Profile
@pszemraj
pszemraj / quiet-media.user.js
Created October 12, 2026 02:07
Quiet media alongside Dark Reader: freeze animated previews and dim mostly-white media
// ==UserScript==
// @name Quiet media alongside Dark Reader
// @namespace local.quiet-media
// @version 1.0.0
// @description Show still images instead of animated images and looping previews; dim mostly-white images.
// @match https://*/*
// @match http://*/*
// @run-at document-start
// @sandbox DOM
// @grant none
@pszemraj
pszemraj / codex_speed.py
Last active October 11, 2026 23:57
Measure Codex generation speed (output tokens per second) from local session logs.
# /// script
# requires-python = ">=3.10"
# dependencies = ["joblib", "rich"]
# ///
"""Measure Codex generation speed (output tokens per second) from local session logs.
Reads the rollout JSONL files that Codex CLI and Codex Desktop write under
$CODEX_HOME/sessions and $CODEX_HOME/archived_sessions. Nothing is sent
anywhere and no message content is kept.
@pszemraj
pszemraj / wandb_archive.py
Created October 11, 2026 02:57
Back up your Weights & Biases projects to local disk, read-only.
"""Back up your Weights & Biases projects to local disk, read-only.
Nothing here creates, changes, or deletes anything on the W&B side. It only uses read calls from the public API, authenticated with your existing `wandb login` (or WANDB_API_KEY). The script is a single self-contained file: the parts of termfmt it uses for terminal output are inlined near the top.
Subcommands:
probe Show the account, its teams, and every project each entity can see, testing that runs are readable through the API (the web UI's plan lockout does not apply to the API).
size Count runs, artifact versions and artifact bytes per project before committing to an export. Add --files to also total run-file sizes (one extra request per run).
export Save everything: configs, summaries, full unsampled metric history and system metrics for every run, plus run files (logs, media, wandb-metadata.json) and artifact contents. --no-files and --no-artifacts leave those two out.
What export does, in order:
@pszemraj
pszemraj / vibetranscribe.py
Created September 7, 2026 03:32
Vibe voice ASR 7B audio transcription utility for MLX audio
#!/usr/bin/env python3
# /// script
# requires-python = ">=3.10"
# dependencies = ["mlx-audio==0.5.1", "numpy", "soundfile>=0.13.1", "soxr"]
# ///
"""Transcribe a long recording with MLX VibeVoice-ASR into grouped Markdown.
uv run --python 3.12 vibetranscribe.py meeting.flac --dry-run
uv run --python 3.12 vibetranscribe.py meeting.flac -o meeting.md
uv run --python 3.12 vibetranscribe.py meeting.flac \
@pszemraj
pszemraj / find_flash_attn_wheel.py
Created July 13, 2026 16:54
find the right prebuilt flash-attention wheel from mjun0812/flash-attention-prebuild-wheels
#!/usr/bin/env python3
"""
find_flash_attn_wheel.py — find the right prebuilt flash-attention wheel from
https://github.com/mjun0812/flash-attention-prebuild-wheels
Detects (or takes via flags) your Python / PyTorch / CUDA / platform, fetches the
repo's full wheel index (doc/packages.md), and prints every matching wheel with
a recommendation and a ready-to-run `pip install <url>` command.
Usage:
@pszemraj
pszemraj / semble.md
Created June 16, 2026 06:23
modified semble instructions to ensure agents search properly and not: semble search "dead code"

Semble — local code search (hybrid keyword + semantic)

semble is a search index over this repo. It splits the code into chunks and ranks them by a blend of keyword (BM25) and semantic-embedding similarity, then returns the top matches with their file_path and line. It is a retrieval tool, not an analysis tool: it finds existing code that resembles what you describe. It does not reason, judge, or summarize. Think "show me the code most like this description," never "answer this question about the codebase."

Invocation: semble is installed only in the misc conda env. Always run it as conda run -n misc --live-stream semble <args>. Never call semble bare; never use uvx. The short query examples below drop the prefix for readability — prepend it whenever you actually run one.

How to query

@pszemraj
pszemraj / Nuke-Edge-Defaults.ps1
Last active June 7, 2026 14:30
use https://setuserfta.com/ to reassign any extensions that would be opened in Edge to a browser of your choice
<#
.SYNOPSIS
Finds every file type and protocol currently assigned to Microsoft Edge
and reassigns them all to your preferred browser using SetUserFTA.
.DESCRIPTION
Windows protects file associations with a hash -- you can't just edit the
registry. SetUserFTA reverse-engineers that hash so it can set associations
from the command line.
@pszemraj
pszemraj / MAMBA3_TO_OLMO_HYBRID_GDN.md
Created May 12, 2026 05:46
MIMO-HGDN: initial pass at Olmo3-hybrid style gated delta net (hgdn) incl negative eigenvalues and MIMO from Mamba3

Applying Mamba-3 Ideas to an OLMo-Hybrid-Style Gated DeltaNet

Recommendation

The best target architecture is not a Mamba-3 hybrid. It is an OLMo-Hybrid-style interleaved Gated DeltaNet model with Mamba-3's hardware-aware recurrence upgrades ported into the GDN mixer.

The highest-value variant is:

Hybrid MIMO-HGDN: [GDN, GDN, GDN, Attention] × N, with negative-eigenvalue GDN preserved, rank-R MIMO updates added to the GDN state update, short convolutions retained for the first ablation, and optional data-dependent q/k rotations as a lower-priority expressivity experiment.

@pszemraj
pszemraj / DECORATIVE_MONOSPACE.md
Last active May 4, 2026 02:04
Cursory investigation into new phenomena from GPT 5.5

Decorative Monospace

A formatting failure mode in modern LLM outputs where code blocks are used as a rhetorical device for signaling rigor rather than as semantic markup for content where whitespace, syntax, or literal reproduction matters.

The model isn't trying to communicate "this is code." It's trying to communicate "this is structured thinking" by borrowing the visual texture of a technical document. The texture is decorative; the underlying content is prose.

What it looks like

@pszemraj
pszemraj / parcae_reference.py
Created April 18, 2026 18:50
reference/annotated version of Parcae arch (looped LM) from param golf experiments
"""
parcae_reference.py
═══════════════════
A single-file, heavily annotated reference implementation of the Parcae
architecture (Prairie, Novack, Berg-Kirkpatrick, Fu — arXiv 2604.12946).
PURPOSE
───────
This is a **pedagogical reference**, not a training rig. Every architectural