Skip to content

Instantly share code, notes, and snippets.

View chyld's full-sized avatar
:electron:
import numpy

Chyld Medford chyld

:electron:
import numpy
View GitHub Profile
@adtac
adtac / Dockerfile
Last active July 24, 2024 14:11
#!/usr/bin/env docker run
#!/usr/bin/env -S bash -c "docker run -p 8080:8080 -it --rm \$(docker build --progress plain -f \$0 . 2>&1 | tee /dev/stderr | grep -oP 'sha256:[0-9a-f]*')"
# syntax = docker/dockerfile:1.4.0
FROM node:20
WORKDIR /root
RUN npm install sqlite3
@harubaru
harubaru / wd1-3-release.md
Last active June 29, 2024 14:19
Official Release Notes for Waifu Diffusion 1.3
@trygvebw
trygvebw / find_noise.py
Last active June 21, 2024 15:31
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
@karpathy
karpathy / stablediffusionwalk.py
Last active July 25, 2024 22:17
hacky stablediffusion code for generating videos
"""
stable diffusion dreaming
creates hypnotic moving videos by smoothly walking randomly through the sample space
example way to run this script:
$ python stablediffusionwalk.py --prompt "blueberry spaghetti" --name blueberry
to stitch together the images, e.g.:
$ ffmpeg -r 10 -f image2 -s 512x512 -i blueberry/frame%06d.jpg -vcodec libx264 -crf 10 -pix_fmt yuv420p blueberry.mp4
@egg82
egg82 / proxmox_nvidia.md
Last active July 11, 2024 19:01
NVidia Proxmox + LXC

Proxmox

Find the proper driver at the NVidia website.

Note: Make sure to select "Linux 64-bit" as your OS

Hit the "Search" button.

@ljbelenky
ljbelenky / greek_letters.md
Last active March 11, 2021 18:10
How to Type Greek Letters in PopOS (and maybe other versions of Linux)

How to Type Greek Letters

  1. In the OS settings, go to "keyboard" and select a "Compose Key." I like to use "Print Screen"
  2. Edit (or create) ~/.XCompose to include the following:
# Capital Letters
<Multi_key> <G> : "Γ"    U0393    #  GAMMA
<Multi_key> <D> : "Δ"    U0394    #  DELTA
<Multi_key> <L> : "Λ"    U039B    #  LAMDA
<Multi_key> <P> : "Π"    U03A0    #  PI
@premek
premek / mv.sh
Last active March 5, 2024 17:43
Rename files in linux / bash using mv command without typing the full name two times
# Put this function to your .bashrc file.
# Usage: mv oldfilename
# If you call mv without the second parameter it will prompt you to edit the filename on command line.
# Original mv is called when it's called with more than one argument.
# It's useful when you want to change just a few letters in a long name.
#
# Also see:
# - imv from renameutils
# - Ctrl-W Ctrl-Y Ctrl-Y (cut last word, paste, paste)
@adiprasad
adiprasad / bias_variance_tradeoff_demo.ipynb
Created April 6, 2019 04:15
Bias-Variance trade-off comparison between Ridge regressor and KNN Regressor
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@protal
protal / settings.json
Last active June 29, 2024 08:49
VS Code indent-rainbow settings rainbow color
{
"indentRainbow.colors": [
"rgba(255, 0 , 0,0.3)",
"rgba(255, 127, 0,0.3)",
"rgba(255, 255, 0,0.3)",
"rgba(0, 255, 0,0.3)",
"rgba(0, 0, 255,0.3)",
"rgba(75, 0, 130,0.3)",
"rgba(148,0,211,0.3)"
]

Time Travel Debugging

Time Travel refers to the ability to record a tab and later replay it ([WebReplay][wrr]). The technology is useful for local development, where you might want to:

  • pause and step forwards or backwards
  • pause and rewind to a prior state
  • rewind to the time a console message was logged
  • rewind to the time an element had a certain style or layout
  • rewind to the time a network asset loaded