Skip to content

Instantly share code, notes, and snippets.

View opyate's full-sized avatar
🐠
Fishing.

Juan M Uys opyate

🐠
Fishing.
View GitHub Profile
@opyate
opyate / steam-system-information-2024-01-11.txt
Created January 11, 2024 22:36
steam-system-information-2024-01-11.txt
Computer Information:
Manufacturer: ASUSTeK COMPUTER INC.
Model: Pro WS WRX80E-SAGE SE WIFI
Form Factor: Desktop
No Touch Input Detected
Processor Information:
CPU Vendor: AuthenticAMD
CPU Brand: AMD Ryzen Threadripper PRO 5955WX 16-Cores
CPU Family: 0x19

Checking how device_map="auto" lays out model TheBloke/guanaco-65B-HF in memory on 96GB VRAM workstation (2x 48GB) and ~500GB RAM.

Deps:

pip install -q -U bitsandbytes
pip install -q -U git+https://github.com/huggingface/transformers.git
pip install -q -U git+https://github.com/huggingface/peft.git
pip install -q -U git+https://github.com/huggingface/accelerate.git
pip install scipy

With regards to artists not wanting their art scraped by AI, I just looked at a random image off Behance.

What in this EXIF data can tell the bot to ignore this image? (e.g. CC license)

random image off Behance

@opyate
opyate / Debounce.gd
Last active February 24, 2023 15:11
Godot 3 debouncer, tested on 3.5.1
class Debounce:
var _tree: SceneTree
var _timer: SceneTreeTimer
var _wait: float
var _fn: FuncRef
func _init(tree: SceneTree, fn: FuncRef, wait: float = 0.15):
_tree = tree
_fn = fn
@opyate
opyate / README.md
Created April 29, 2022 14:51
Rename Barclays statements

Renames statements from statements/Statement 17-dec-21 ac 01234567.PDF to statements/2021-12-17.pdf, as the latter is more easily sortable in a folder.

@opyate
opyate / README.md
Last active April 16, 2024 09:50
Simple no-cache gamedev-friendly Python 3 webserver for testing web builds locally

Seeing this when running an HTML5 Godot game?

image

This is a simple no-cache Python 3 gamedev-friendly webserver which runs on port 4443.

Run with

python3 gamedevweb.py
@opyate
opyate / singleton.gd
Last active May 8, 2021 20:41
Global music for a Godot game, with fade-in if the song is made for looping (i.e. starts of loudly)
extends Node
func _ready():
var fade_in = Tween.new()
add_child(fade_in)
var music = AudioStreamPlayer.new()
add_child(music)
var stream = load("res://assets/audio/music/song.ogg")
music.set_stream(stream)
music.pitch_scale = 1

This is a combination of

  • stapler
  • scissors
  • knocking on a window (reversed)
  • wobbling an A4 sheet of thin cardboard
  • sticky tape coming unstuck (with reverb)

Made with Audacity.

@opyate
opyate / change_git_submodule.md
Last active March 10, 2020 10:35
Change a git submodule remote

To change a git submodule's remote (in this case, from HTTPS to SSH):

SUB=my-submodule-name
$REMOTE=git@gitlab.com:path/to/remote.git

git submodule deinit $SUB
git rm $SUB
git commit -m "removed $SUB submodule at https remote"

rm -rf .git/modules/$SUB