Skip to content

Instantly share code, notes, and snippets.

View stephenleo's full-sized avatar
🇸🇬

Marie Stephen Leo stephenleo

🇸🇬
View GitHub Profile
@stephenleo
stephenleo / 01_bigquery.md
Last active April 21, 2023 01:52
DataEngineering

Big Query and SQL Hacks

  1. Use QUALIFY to filter rows after a window function. It's way more computationally efficient than using a CTE.

    SELECT RANK() OVER (PARTITION BY product_id ORDER BY rating DESC) AS rank 
    FROM table
    QUALIFY rank = 1
    
@stephenleo
stephenleo / 00_Semantic_Caching_in_Generative_AI_Chatbots.md
Last active March 11, 2024 00:55
[Medium] Semantic Caching in Generative AI Chatbots

Semantic Caching in Generative AI Chatbots

Code for the Medium post

@stephenleo
stephenleo / 00_the_definitive_guide.md
Last active July 6, 2024 06:05
[Medium] The Definitive Guide to Structured Data Parsing with GPT3.5 in Complex Problems

The Definitive Guide to Structured Data Parsing with OpenAI GPT 3.5 in Complex Problems

Code for the Medium post

@stephenleo
stephenleo / starship.toml
Last active September 27, 2024 13:16
Starship setup
# colors from https://www.color-hex.com/
format = """
[](#3d414a)\
$os\
$username\
[](bg:#5f6366 fg:#3d414a)\
$directory\
[](fg:#5f6366 bg:#4e6e97)\
$git_branch\
$git_status\