Skip to content

Instantly share code, notes, and snippets.

View bitplane's full-sized avatar

Gareth Davidson bitplane

View GitHub Profile
@bitplane
bitplane / idea.md
Last active September 17, 2022 23:22
Stable diffusion keyword inspection

If we could take a low res sample of the network's hidden layers, with the right sampling algorithm it might be possible to compare them and see how they relate to each other.

If so, it might tell us all kinds of useful info about the labels used in the training data, let us visualise them, group, graph, find interesting intersections, areas of the network that

@bitplane
bitplane / tamperMonkeyGoogleDocsUncrop.js
Last active February 20, 2023 16:53
UserScript for Google Docs uncrop
//
// Uncrops Google Docs images by removing the clip path.
// Doesn't work in Webkit due to canvas elements not being
// in the dom. So Firefox only for now.
//
// Click the "raw" button and import the URL into your userscript
// manager - tested in tampermonkey but should work in whatever.
//
// ==UserScript==
@bitplane
bitplane / lego_scraper.py
Last active March 22, 2023 22:08
lego.com lego scraper
#!/usr/bin/python
import json
import logging
import os
import re
import urllib
import urllib2
from subprocess import call
@bitplane
bitplane / gecko-source.sh
Last active November 11, 2024 04:24
Gecko commits 2007-2024
git clone [email protected]:mozilla/gecko-dev.git
cd gecko-dev
for year in $(seq 2007 2024); do
echo $year
git log --since="$year-01-01" --until="$year-12-31" --pretty=format:"%ae" | tr '[:upper:]' '[:lower:]' > $year.txt
done
blacklist="grep -Ev [email protected]|[email protected]|automation\-bot"