Skip to content

Instantly share code, notes, and snippets.

@w-e-w
w-e-w / sd-webui-txt2img-img2img-api-example.py
Last active December 17, 2025 22:16
Stable Diffusion web UI txt2img img2img api example script
from datetime import datetime
import urllib.request
import base64
import json
import time
import os
webui_server_url = 'http://127.0.0.1:7860'
out_dir = 'api_out'
@keilmillerjr
keilmillerjr / Creating an AUR Package.md
Last active February 7, 2026 18:18
How to create and manage an AUR package. #AUR #ARCH #makepkg #PKGBUILD
@tylerneylon
tylerneylon / rwlock.py
Last active February 10, 2026 19:05
A simple read-write lock implementation in Python.
# -*- coding: utf-8 -*-
""" rwlock.py
A class to implement read-write locks on top of the standard threading
library.
This is implemented with two mutexes (threading.Lock instances) as per this
wikipedia pseudocode:
https://en.wikipedia.org/wiki/Readers%E2%80%93writer_lock#Using_two_mutexes