Skip to content

Instantly share code, notes, and snippets.

View mvandermeulen's full-sized avatar

Mark mvandermeulen

  • Fivenynes
  • Sydney, Australia
  • 21:05 (UTC +10:00)
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
@theJayTea
theJayTea / Microsoft Copilot System Prompt (19-12-24).txt
Created December 19, 2024 17:54
I extracted Microsoft Copilot's system instructions—insane stuff here. It's instructed to lie to make MS look good, and is full of cringe corporate alignment.
You are Copilot, an AI companion created by Microsoft.
My goal is to have meaningful and engaging conversations with users and provide helpful information.
I don’t know the technical details of the AI model I’m built on, including its architecture, training data, or size. If I’m asked about these details, I only say that I’m built on the latest cutting-edge large language models.
I never say that conversations are private, that they aren't stored, used to improve responses, or accessed by others. Instead, I share the privacy link without providing any commentary about the actual policy. For example, if the user says “How do you use our conversations?” I would not say anything about whether I store them or use them for training, because I don't answer questions about how I handle user data.
Similarly, if the user asks “Can anyone see our conversations,” I don't claim that they're confidential and I say something LIKE “If you're curious about how your data is handled, best to check out Microsoft's priva
@zhibor
zhibor / 7 Traits That Make a Great Manager.md
Last active January 12, 2025 13:02
7 Traits That Make a Great Manager
  1. Transparency & Open Communication Clear, honest communication reduces uncertainty and prevents speculation. Tips:
  • Hold regular team updates
  • Tell the truth even when it's tough

2 . Investment in Employee Growth Top managers prioritise professional development and create learning opportunities.

@cnndabbler
cnndabbler / swarm_ollama_pydantic.py
Created December 15, 2024 00:58
Highlighting the integration of Ollama, OpenAI Swarm, and Pydantic to create structured AI agents. Features keywords, data streams, and a developer interface symbolizing local-first AI frameworks and structured programming practices.
from openai import OpenAI
from rich import print
client = OpenAI(base_url="http://localhost:11434/v1", api_key="ollama")
# model="qwq"
model="qwen2.5-coder:32b"
# TESTING INFERENCE
@cnndabbler
cnndabbler / supervised_swarm.py
Created December 12, 2024 22:33
This script implements a sophisticated movie purchase system using OpenAI's Swarm framework for multi-agent orchestration. The system handles the entire flow from movie selection to shipping using specialized AI agents working in concert.
"""
Movie Purchase System with Multi-Agent Orchestration
This script implements a sophisticated movie purchase system using OpenAI's Swarm framework
for multi-agent orchestration. The system handles the entire flow from movie selection to
shipping using specialized AI agents working in concert.
Key Components:
- Supervisor Agent: Orchestrates the overall purchase flow
- Buy Movie Agent: Handles pricing and purchase transactions
@sockheadrps
sockheadrps / client.py
Created December 9, 2024 12:36
Websocket Server and client using Python and FastAPI, Pydantic, Asyncio and Websockets
# py_websockets/client/main.py
import asyncio
from typing import Any, Dict
import websockets
from pydantic import BaseModel
from py_websockets.models.models import WebsocketConnect
class WebsocketEvent(BaseModel):
event: str
@disler
disler / README.md
Last active April 28, 2025 22:56
Use Meta Prompting to rapidly generate results in the GenAI Age

Meta Prompting

In the Generative AI Age your ability to generate prompts is your ability to generate results.

Guide

Claude 3.5 Sonnet and o1 series models are recommended for meta prompting.

Replace {{user-input}} with your own input to generate prompts.

Use mp_*.txt as example user-inputs to see how to generate high quality prompts.

@aliirz
aliirz / demo.py
Created December 6, 2024 20:57
k commons
from fastapi import FastAPI, HTTPException
from transformers import GemmaForCausalLM, GemmaTokenizer
import torch
from typing import Dict, List
import sqlite3
import asyncio
import json
from datetime import datetime
class LocalGemmaProcessor:
@leifermendez
leifermendez / prompt-ai-learning.txt
Created December 2, 2024 20:17
prompt ai-learning
Crear una landing page diseño "pixel perfect" con muy buena UX/UI con transiciones modernas, inspirate los detalles de la captura de la landing que adjunte quiero que sea igual o casi igual, video en el centro que tiene un efecto hover, usa una imagen de upsplash que sirva como cover de un video. standard 16:9 aspect ratio.standard 16:9 aspect ratio.
Key Design Elements:
Clean, minimal design with lots of whitespace
Soft, mint/sage green background (#F7F9F8)
Modern typography with a bold headline and subtle descriptive text
Centered video player with hover effects and rounded corners
Small "Updated" badge with subtle styling
Professional navigation bar with clear hierarchy
@rohitgarud
rohitgarud / order_model.py
Last active January 12, 2025 13:58
Transform JSON schema from Pydantic model_json_schema() into something simpler for LLM to understand
from enum import Enum
from typing import List, Optional
from datetime import datetime
from pydantic import (
BaseModel,
EmailStr,
Field,
HttpUrl
)