Skip to content

Instantly share code, notes, and snippets.

View volker48's full-sized avatar
πŸ’­
πŸš€

Marcus McCurdy volker48

πŸ’­
πŸš€
View GitHub Profile
@volker48
volker48 / .cursorrules
Created May 31, 2025 23:24 — forked from boxabirds/.cursorrules
Rock solid: turn Cursor into a rock-solid software engineering companion
# Project Policy
This policy provides a single, authoritative, and machine-readable source of truth for AI coding agents and humans, ensuring that all work is governed by clear, unambiguous rules and workflows. It aims to eliminate ambiguity, reduce supervision needs, and facilitate automation while maintaining accountability and compliance with best practices.
# 1. Introduction
> Rationale: Sets the context, actors, and compliance requirements for the policy, ensuring all participants understand their roles and responsibilities.
## 1.1 Actors
@volker48
volker48 / find_noise.py
Created September 14, 2022 14:53 — forked from trygvebw/find_noise.py
A "reverse" version of the k_euler sampler for Stable Diffusion, which finds the noise that will reconstruct the supplied image
import torch
import numpy as np
import k_diffusion as K
from PIL import Image
from torch import autocast
from einops import rearrange, repeat
def pil_img_to_torch(pil_img, half=False):
image = np.array(pil_img).astype(np.float32) / 255.0
@volker48
volker48 / optimize.sh
Last active December 4, 2015 00:51 — forked from ryansully/optimize.sh
Optimized image optimization script (pngcrush & jpegtran)
#!/bin/sh
# script for optimizing images in a directory (recursive)
# pngcrush & jpegtran settings from:
# http://developer.yahoo.com/performance/rules.html#opt_images
# pngcrush
for file in `find -E . -regex '.*\.(jpg|png)'`; do
if [ ${file: -4} == ".png" ]
then