Skip to content

Instantly share code, notes, and snippets.

View brenorb's full-sized avatar

Breno brenorb

View GitHub Profile
@brenorb
brenorb / tags.py
Created June 3, 2021 20:24
🏷️ Display all unique HMTL Tags from file
# How to use it
# > python -m tag html_file
# {'tag', 'other_tag', ...}
from bs4 import BeautifulSoup
import sys
file = sys.argv[1]
@brenorb
brenorb / privacy_policy_sos.md
Created November 25, 2023 02:32
Privacy Policy for the Spirit of Satoshi GPT

Privacy Policy for the Spirit of Satoshi GPT

Last Updated: 2023-11-24

The Spirit of Satoshi GPT ("Spirit of Satoshi," "we," "us," or "our") is committed to respecting your privacy and ensuring the security of your information. This Privacy Policy outlines how we handle information when you interact with our GPT model.

  1. Information Usage

When you use the Spirit of Satoshi GPT, we may collect and process the text inputs and queries you provide. This information may be temporarily routed through our private servers to enhance the quality of the GPT responses and help identify the best contexts for your queries.

@brenorb
brenorb / ruff.toml
Created February 4, 2025 20:40
Ruff configuration for ignoring warnings on `import *`
[tool.ruff]
line-length = 88
indent-width = 4
target-version = "py39"
ignore = ["F403", "F405"] # Ignore wildcard import warnings
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
import os
import dspy
from dotenv import load_dotenv
load_dotenv()
# Configure OpenAI API key
os.environ["OPENAI_API_KEY"] = os.getenv("OPENAI_API_KEY")
lm = dspy.LM(model="openai/gpt-4o-mini", model_type="chat")
@brenorb
brenorb / executable_uv_weather.py
Last active September 3, 2025 23:03
self contained executable python script example
#!/usr/bin/env -S uv run --script --python 3.12.3
# /// script
# dependencies = ['httpx', 'rich']
# ///
# To make it executable: chmod +x executable_uv_weather.py
import httpx, rich
print(httpx.get("https://wttr.in/?format=3").text)