Skip to content

Instantly share code, notes, and snippets.

View brayevalerien's full-sized avatar

Valérien brayevalerien

View GitHub Profile
@brayevalerien
brayevalerien / resolutions.md
Last active April 25, 2025 09:45
Reference resolutions for most image and video generations AI models.

Resolution guide for image and video generation

Caution

This is very much a WIP. Not all models or resolutions are listed yet, and there are placeholder "TODO" scattered in the document. It will be updated as soon as possible.

Introduction

This documents serves as a reference cheatsheet for choosing the right resolution for the most common image and video generation AI models.

While most visual generation models support any resolution in theory, their training procedure constrains the resolution of generated images / videos to certain values only. They are the resolutions the models were trained on and that are natively supported, meaning the generation quality will be optimal.

@brayevalerien
brayevalerien / bluetooth_headset_manjaroi3.md
Created June 22, 2025 20:00
A guide to making a bluetooth headset work on a fresh Manjaro i3 community build.

Setting up a bluetooth headset on Manjaro i3

This document is a step by step guide for setting up a bluetooth heaset with working audio on a fresh Manjaro i3 community build. It's assumed that all the following is done in sudo mode.

Note

The following guide serves mostly as notes for the future me that has to set this up again, it might not work for your exact setup. Feel free to request corrections. It's also quite likely that this works on most Arch builds.

Start by updating (or installing) bluez, bluez-utils and pulseaudio-bluetooth.

pacman -S bluez bluez-utils pulsaudio-bluetooth
@brayevalerien
brayevalerien / TouchDesigner.gitignore
Created July 6, 2025 10:48
A .gitignore template for TouchDesigner projects.
# TouchDesigner project files
*.toe~ # Autosave backup files
*.tox~ # Backup files for components
*.cache # Cache files
*.toeautosave # Autosave files
*.toe.bak # Manual backups
# Common hidden system files
.DS_Store # macOS
Thumbs.db # Windows
@brayevalerien
brayevalerien / s3_helpers.py
Last active August 1, 2025 06:18
Helper function for downloading and uploading files to S3 using boto3. Assumes AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY are set in the environment.
"""
Helpers for downloading from and uploading to an S3 bucket.
Adapted from https://docs.runpod.io/serverless/storage/s3-api.
"""
import os
from typing import List, Optional
from urllib.parse import urlparse
from uuid import uuid4
@brayevalerien
brayevalerien / groq_tool_call.py
Created August 8, 2025 16:02
Example of single-turn tool call with a Groq client. In this example, the LLM can run python expressions. Requires the "GROQ_API_KEY" to be set in the environement or in a .env file.
import json
from dotenv import load_dotenv
from groq import Groq
load_dotenv()
client = Groq()
MODEL = "llama-3.3-70b-versatile"