Skip to content

Instantly share code, notes, and snippets.

View Vr3n's full-sized avatar
🏠
Working from home

Viren Patel Vr3n

🏠
Working from home
View GitHub Profile
@cnndabbler
cnndabbler / pydantic_restaurant_context.py
Created December 21, 2024 00:55
This code implements an intelligent restaurant recommendation system that combines Pydantic type safety with sophisticated context management. The system uses Pydantic Agents to interface with an LLM (Large Language Model) while maintaining type safety and data validation throughout the application.
"""
Restaurant recommendation system demonstrating context features with multiple customers.
Shows how context helps personalize and improve recommendations over time.
"""
from typing import List, Optional, Dict, Literal
from pydantic import BaseModel, Field
import asyncio
from datetime import datetime
from pydantic_ai import Agent, RunContext
@bradtraversy
bradtraversy / mongodb_cheat_sheet.md
Last active October 29, 2025 12:38
MongoDB Cheat Sheet

MongoDB Cheat Sheet

Show All Databases

show dbs

Show Current Database