Skip to content

Instantly share code, notes, and snippets.

View JGalego's full-sized avatar
▶️
awesome.critical-ai.dev

João Galego JGalego

▶️
awesome.critical-ai.dev
View GitHub Profile
@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.
@JGalego
JGalego / recon_sgai_groq.py
Created June 25, 2025 22:58
A simple recon demo using ScrapeGraphAI with Groq 🕷️
# /// script
# requires-python = ">=3.7,<=3.11"
# dependencies = [
# "langchain-groq >= 0.3.4",
# "scrapegraphai >= 1.57.0",
# ]
# ///
"""
Simple recon script using scrapegraphai with Groq
"""
@JGalego
JGalego / california_vibe.ipynb
Last active June 6, 2025 00:54
A simple, yet mostly vibe-coded demo of Amazon SageMaker with Scikit-Learn using the California Housing dataset 🏘️💸
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@JGalego
JGalego / draw_data.ipynb
Last active May 7, 2025 14:40
Draw Data Demo 🎨
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@JGalego
JGalego / azoai_pirate.py
Last active March 26, 2025 17:42
Quick 'n' dirty 'Ahoy!' demo with Azure OpenAI 🏴‍☠️🦜
# /// script
# requires-python = ">=3.7,<=3.11"
# dependencies = [
# "azure-identity >= 1.2.1",
# "openai >= 1.65.2",
# ]
# ///
"""
Quick 'n' dirty 'Ahoy!' demo with Azure OpenAI
@JGalego
JGalego / glorified.pl
Created March 11, 2025 15:52
Just a glorified database in Prolog 🦉
% This Prolog program is just a glorified database.
%
% "You use glorified to indicate that something is less important
% or impressive than its name actually suggests." (Collins Dictionary)
%
% @author João Galego
%
% Facts (according to the Internet)
glorified('Docker Image', tarball).
@JGalego
JGalego / gemini2_flash_quick.sh
Created March 8, 2025 22:01
A quick 'n dirty way to test Gemini 2.0 Flash ♊︎
# Dependencies:
# + jq (https://jqlang.org/)
# + consolemd (https://github.com/kneufeld/consolemd)
curl -s "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContent?key=$GEMINI_API_KEY" \
-H 'Content-Type: application/json' \
-X POST \
-d '{
"contents": [{
"parts":[{"text": "Explain how AI works"}]
}]
@JGalego
JGalego / climate_change.py
Created March 3, 2025 23:47
A simple Giskard LLM scan demo 🔎
# /// script
# requires-python = ">=3.7,<=3.11"
# dependencies = [
# "giskard[llm] >= 2.16.1",
# "langchain >= 0.3.19",
# "langchain-community >= 0.3.18",
# "langchain-openai >= 0.3.1",
# "openai >= 1.65.2",
# "pandas >= 2.2.3",
# "pypdf <= 3.17.0"
@JGalego
JGalego / smol_groq.py
Last active February 17, 2025 22:53
smolagents meets Groq via LiteLLM 🚅
# /// script
# requires-python = ">=3.12"
# dependencies = [
# "smolagents[litellm] >= 1.9.2",
# ]
# ///
"""
smolagents meets Groq via LiteLLM 🚅
Adapted from https://github.com/huggingface/smolagents/issues/429
@JGalego
JGalego / groq_deepseek.py
Last active February 6, 2025 16:12
DeepSeek with Groq 🐋
"""
DeepSeek with Groq
https://console.groq.com/docs/model/deepseek-r1-distill-llama-70b
"""
from groq import Groq
client = Groq()
completion = client.chat.completions.create(