Skip to content

Instantly share code, notes, and snippets.

@patx
patx / xfinity.txt
Created July 27, 2026 18:59
A terrible convo with Xfinity customer service.
--- Conversation on 07/26/2026 ---
Xfinity Assistant (05:54 pm): I can help if you need to cancel, suspend, or resume your Xfinity Mobile service.
HARRISON (05:54 pm): Chat with an agent to resume service
Xfinity Assistant (05:54 pm): Got it. I'll put you in touch with a live agent now.
Agent (05:54 pm): Hi HARRISON, thank you for contacting Xfinity. My name is Mohdanas. How may I help you today?
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Shorten URL - Shorty</title>
<style>
* {
margin: 0;
padding: 0;
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>URL Shortened - Shorty</title>
<style>
* {
margin: 0;
padding: 0;
#!/usr/bin/env python3
import argparse
import asyncio
import time
from mkvdb import Mkv
# ------------------------------------------------------------------------------
# SYNC BENCHMARKS
@patx
patx / pickledb1-4_benchmark.py
Created December 10, 2025 19:30
Script used to benchmark pickleDB v1.4
#!/usr/bin/env python3
import argparse
import asyncio
import os
import time
from pathlib import Path
from pickledb import PickleDB
@patx
patx / kenobi.py
Last active January 5, 2026 05:11
KenobiDB
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
KenobiDB is a small document-based DB, supporting simple usage including
insertion, removal, and basic search.
Written by Harrison Erd (https://patx.github.io/)
https://pypi.org/project/kenobi/
"""
# Copyright Harrison Erd

🥝 The Officially Unofficial, Shamelessly Sarcastic Guide to MicroPie

Table of Contents:

  1. What Even Is This
  2. Installation: Your First Mistake
  3. Hello, World, You Minimalist Freak
  4. Routing: Guess the URL by Reading a Method Name
  5. Parameters: MicroPie Sees All
  6. Sessions: For When You Need to Remember Your Regret
#!/usr/bin/env python3
# fastPATX (PyQt6)
from __future__ import annotations
import os
import sys
import webbrowser
from dataclasses import dataclass
from pathlib import Path
@patx
patx / file_upload_benchmark.md
Created August 17, 2025 02:52
ai generated test result report

🚀 Benchmark: Large File Uploads

MicroPie is built around streaming-first multipart handling, with no heavyweight form parsers.
This design keeps memory usage low and avoids the double-copy overhead seen in other frameworks.

We benchmarked a 13.4 GiB file upload against FastAPI, Litestar, and Starlette on the same machine.

Results

| Framework | Upload Handler Summary | Multipart Parser | Elapsed (13.4 GiB) | Throughput |

@patx
patx / benchmark_review.md
Last active May 11, 2026 06:59
Latest benchmarks for new MicroPie release (v0.29)

Benchmarking Python Web Frameworks: BlackSheep, Starlette, MicroPie, Quart, FastAPI

I created minimal apps for each framework, all returning {"Hello": "World"} as JSON. All frameworks were benchmarked using Granian in ASGI mode with 8 workers.

Benchmark command:

granian --interface asgi --workers 8 app:app