Skip to content

Instantly share code, notes, and snippets.

View cgalo5758's full-sized avatar
💭
Never forget your friends

Christian Galo cgalo5758

💭
Never forget your friends
View GitHub Profile
@cgalo5758
cgalo5758 / create_single_line_text_fields.py
Created September 16, 2024 06:32
Create Airtable singleLineText fields in bulk
from pyairtable import Api
import os
# Replace these with your Airtable API key and Base ID
AIRTABLE_API_KEY = 'YOUR_API_KEY_HERE'
AIRTABLE_BASE_ID = 'YOUR_AIRTABLE_BASE_ID_HERE'
TABLE_ID = 'YOUR_TABLE_ID_HERE'
# Initialize the Airtable table
api = Api(AIRTABLE_API_KEY)
@cgalo5758
cgalo5758 / venv.md
Created March 15, 2024 17:53 — forked from ryanbehdad/venv.md
Python venv cheat sheet

Python venv virtual environment cheat sheet

Create a venv

To create a virtual environment, go to the root of your project and run

python -m venv venv

It will create a virtual environment called venv

Activate venv

.\venv\Scripts\activate

@cgalo5758
cgalo5758 / html-to-markdown.md
Created January 14, 2024 08:36
HTML to Markdown ✨using AI✨ (example of premature pessimization)

This is a prompt I built before finding out about LangChain. I didn't know how to pass documentation I found on a website as context to the LLM, so I first attempted to pass it as pure html. Because a web page's HTML in the modern web can often be a bit bloated, I couldn't pass it directly as context because some pages easily exceeded the size of even the largest context window I could find in any available chat model.

Second step? Attempt to convert these to markdown through conventional means. I tried using html2markdown, markdownify, and pandoc, but I wasn't satisfied with any of the results. So I came up with a solution:

The world's most expensive HTML to markdown utility: leverage LLMs and pass it a task to GPT-4 turbo.

                messages=[
                    {"role": "system", "content": "The user provides HTML content in chunks. Convert only the new chunk to Markdown. The previous messages are provided as context to maintain consistency."},
                    {"role": "user", "cont
@cgalo5758
cgalo5758 / DokuWiki Logo
Last active May 25, 2021 20:48
CGalo DokuWiki Logo Concept