Skip to content

Instantly share code, notes, and snippets.

View JGalego's full-sized avatar
๐Ÿ•น๏ธ
ai-to-zx.com

Joรฃo Galego JGalego

๐Ÿ•น๏ธ
ai-to-zx.com
View GitHub Profile
@JGalego
JGalego / jellyfish.py
Created February 11, 2026 12:37
Python port of the jellyfish ๐Ÿชผ animation from the Wolfram Language snippet ๐Ÿบ>>>๐Ÿ
# /// script
# requires-python = ">=3.10"
# dependencies = [
# "matplotlib",
# "numpy",
# "pillow", # for GIF saving
# "ffmpeg" # for MP4 saving; ensure ffmpeg is installed and
# ]
# ///
@JGalego
JGalego / agents.ipynb
Last active January 7, 2026 19:43
Agents... agents everywhere!
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@JGalego
JGalego / vengeance.lean
Last active January 19, 2026 04:48
Proves that vengeance is not the optimal for Dantรจs in The Count of Monte Cristo โš”๏ธ๐Ÿ•Š๏ธโœจ
/-
This file was generated by Aristotle.
Lean version: leanprover/lean4:v4.24.0
Mathlib version: f897ebcf72cd16f89ab4577d0c826cd14afaafc7
This project request had uuid: a1c7c561-6dc8-41fd-b0b2-72ead2fe9b02
-/
/-
We model the decision problem facing Edmond Dantรจs in The Count of Monte Cristo. We define two actions: `Vengeance` and `Forgiveness`. We assign utility values to the outcomes based on justice, inner peace, and love. We then prove that `Vengeance` is not the optimal action, as `Forgiveness` yields a higher utility.
@JGalego
JGalego / aristotle_tester.py
Last active December 29, 2025 11:28
Fill sorries and prove theorems using Aristotle by Harmonic ๐Ÿ›๏ธ๐Ÿฆ‰๐Ÿบ
# /// script
# requires-python = ">=3.10"
# dependencies = [
# "aristotlelib >= 0.6.0",
# ]
# ///
r"""
Fill sorries and prove theorems using Aristotle by Harmonic ๐Ÿ›๏ธ๐Ÿฆ‰๐Ÿบ
@JGalego
JGalego / escape_the_herd.py
Created December 21, 2025 21:52
Control a ๐Ÿญ with your cursor to collect ๐Ÿง€ while avoiding a rising herd of ๐Ÿ”ด enemies that hunt with flocking behavior! ๐ŸŽฎ
# /// script
# requires-python = ">=3.10"
# dependencies = [
# "pygame >= 2.6.1",
# ]
# ///
"""
An escape game where the player avoids enemies with flocking behavior and collects items.
Enemies exhibit herd behavior (separation, alignment, cohesion).
@JGalego
JGalego / json2toon.py
Created November 13, 2025 09:57
A simple JSON / JSONLines to TOON Converter ๐Ÿฐ
r"""
A simple JSON / JSONLines to TOON Converter
.------..
- -
/ \
/ \
/ .--._ .---. |
| / -__- \ |
| | | |
@JGalego
JGalego / Makefile
Created November 8, 2025 23:13
Michael Creutz's Z2 lattice gauge simulation
CFLAGS= -O2 -Wall
CC= gcc
LDFLAGS= -lm
@JGalego
JGalego / coffee.md
Last active November 6, 2025 12:47
You have achieved the ultimate cup of coffee! โ˜•๐ŸŒˆ๐Ÿง˜๐Ÿปโ€โ™‚๏ธ
flowchart TD
    Start([Wake up at 4:47 AM<br/>Exactly]) --> CheckMoon{Is the moon<br/>waning gibbous?}
    CheckMoon -->|Yes| GoodStart[Excellent.<br/>Proceed.]
    CheckMoon -->|No| Wait[Wait 24 hours<br/>Coffee requires<br/>proper lunar alignment]
    Wait --> Start
    
    GoodStart --> CheckBarometer{Barometric pressure<br/>between 30.2-30.4 inHg?}
    CheckBarometer -->|No| Relocate[Drive to higher/lower<br/>elevation until pressure<br/>is optimal]
    Relocate --> CheckBarometer
@JGalego
JGalego / llava_ov_sm.ipynb
Last active October 14, 2025 23:39
Deploy LLaVA-OneVision on Amazon SageMaker using the Hugging Face Inference Toolkit ๐Ÿค—๐ŸŒฟ
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@JGalego
JGalego / every_author_as_first_author.py
Created August 4, 2025 01:16
Fetches author names from an arXiv paper and visually superimposes them in a centered stack ๐Ÿ“œ Inspired by the SIGTBD 2023 paper "Every Author as First Author" by Erik and Martin Demaine
# /// script
# requires-python = ">=3.12"
# dependencies = [
# "pillow >= 9.2.0",
# ]
# ///
"""
Fetches author names from an arXiv paper and visually superimposes them in a centered stack.