Skip to content

Instantly share code, notes, and snippets.

View duckythescientist's full-sized avatar

Sean Murphy duckythescientist

View GitHub Profile
@duckythescientist
duckythescientist / stable_diffusion_collected_notes.md
Last active February 22, 2024 03:38
Stable Diffusion Image Generation Notes
@duckythescientist
duckythescientist / pcb_art_helper.py
Created June 26, 2024 02:51
Posterize a PNG and create layers for PCB art
#!/usr/bin/env python3
import sys
import os.path
import numpy as np
import skimage.io, skimage.color, skimage.transform
import sklearn.cluster
import matplotlib.pyplot as plt
@duckythescientist
duckythescientist / thread_profile.scad
Last active August 25, 2024 00:39
Backup of thread_profile.scad
// https://github.com/MisterHW/IoP-satellite/blob/master/OpenSCAD%20bottle%20threads/thread_profile.scad
use <scad-utils/transformations.scad> // https://github.com/openscad/scad-utils
use <list-comprehension-demos/skin.scad> // https://github.com/openscad/list-comprehension-demos
// radial scaling function for tapered lead-in and lead-out
function lilo_taper(x,N,tapered_fraction) =
min( min( 1, (1.0/tapered_fraction)*(x/N) ), (1/tapered_fraction)*(1-x/N) )
;
@duckythescientist
duckythescientist / scrotshot.sh
Created March 20, 2025 21:11
Better screenshots - because xfce4-screenshooter only gives me black screens
#!/usr/bin/env bash
# Better screenshots - because xfce4-screenshooter only gives me black screens
# /home/duck/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml
# <property name="&lt;Primary&gt;&lt;Shift&gt;Print" type="string" value="/home/duck/.local/bin/scrotshot.sh regionclip"/>
# <property name="&lt;Shift&gt;Print" type="string" value="/home/duck/.local/bin/scrotshot.sh region"/>
# <property name="Print" type="string" value="/home/duck/.local/bin/scrotshot.sh full"/>
# <property name="&lt;Primary&gt;Print" type="string" value="/home/duck/.local/bin/scrotshot.sh fullclip"/>
# <property name="&lt;Primary&gt;&lt;Super&gt;Print" type="string" value="/home/duck/.local/bin/scrotshot.sh activeclip"/>