Skip to content

Instantly share code, notes, and snippets.

View phihung's full-sized avatar

phihung

View GitHub Profile
@phihung
phihung / app.py
Last active April 22, 2025 11:53
FastAPI async trap
import asyncio
import time
from fastapi import FastAPI
from fastapi.concurrency import run_in_threadpool
app = FastAPI()
@app.get("/sync")
#!/usr/bin/env -S uv --quiet run --script
# /// script
# requires-python = ">=3.11"
# dependencies = [
# "pyperclip>=1.9.0",
# ]
# ///
import argparse
import os
import re
@phihung
phihung / helloworld.py
Last active April 13, 2025 10:15
Testing uvx
# /// script
# requires-python = ">=3.12"
# dependencies = [
# "rich"
# ]
# ///
import sys
import os
import site