Skip to content

Instantly share code, notes, and snippets.

View morganmcg1's full-sized avatar
💭
Trying to ML

Morgan McGuire morganmcg1

💭
Trying to ML
View GitHub Profile
@morganmcg1
morganmcg1 / wandbot_eval_with_intercom_and_refernce_answers.json
Created May 19, 2025 20:50
wandbot_with_intercom_and_reference_answers
[
{
"index": 0,
"question": "Hey I have a question about using wandb with fastapi in a prod environment. is it recommended to initialize wandb within a specific route function, ie\n\n `@app.route('/')\n def my_function():\n wandb.init(...)\n `\n or should i initialize beforehand:\n\n `wandb.init(...)\n @app.route('/')\n def my_function():\n ...`\n\n I'm getting a long list of log items in the console and many of them are empty.",
"generated_answer": "We recommend initializing wandb as early as possible in your FastAPI application, preferably before defining your route functions. This helps capture any console output, including error messages, which can be useful for debugging.\nTo set up wandb in your FastAPI app:\nInitialize wandb at the start of your main application file:\nimport wandb\nwandb.init(project=\"your_project_name\")\n\napp = FastAPI()\n\[email protected]('/')\ndef my_function():\n # Your route logic here\n\nTo address the empty log items, try inc
@morganmcg1
morganmcg1 / wandbot_eval_intercom_answers.py
Created May 19, 2025 20:00
wandbot evals including Intercom bot answers - May 19th 2025
[
{
"index": 0,
"question": """Hey I have a question about using wandb with fastapi in a prod environment. is it recommended to initialize wandb within a specific route function, ie
`@app.route('/')
def my_function():
wandb.init(...)
`
or should i initialize beforehand:
@morganmcg1
morganmcg1 / prompts_cheatsheet.md
Created April 22, 2025 11:22
prompts_cheatsheet from o3 after passing a bunch of jailbroken prompts

Below is a practical “cheat‑sheet” distilled from the many production prompts you just saw (Cursor, v0, Devin, Manus, Replit, Lovable, etc.). Follow these guidelines when designing prompts for your own LLM‑powered apps and you’ll get more reliable, safer and higher‑quality results.

────────────────────────────────────────────────────────

  1. Nail the Three Core Elements
    ──────────────────────────────────────────────────────── A good prompt almost always contains ❶ role, ❷ objective, ❸ constraints / format.

• Role
“You are a senior Rust compiler engineer…”
Sets the persona, vocabulary and depth.

@morganmcg1
morganmcg1 / llms-full-plan.txt
Created March 9, 2025 11:18
llms-full plan
ources.
Browsing completed
Browsing completed
I am browsing the URL: https://llmstxt.org/
Browsing completed
I am browsing the URL: https://weave-docs.wandb.ai/
Now that I have a good understanding of both the llms.txt concept and Weave's documentation, I'll create an appropriate llms.txt file for Weave. I'll focus on making it useful for LLMs to understand and work with Weave's capabilities.
Edited the contents of a file
I've created a comprehensive llms.txt file for Weave that follows the standard format and provides structured information about the framework. Here's what I included:
Title (H1): Clear identification of the project
@morganmcg1
morganmcg1 / llms.txt
Created March 9, 2025 10:44
Weave llms.txt
# Weights & Biases (W&B) Weave
> Weave is a framework for tracking, experimenting with, evaluating, deploying, and improving LLM-based applications. It provides comprehensive tools for tracing LLM calls, monitoring application behavior, systematic prompt engineering, evaluation, and deployment of guardrails in production.
Weave is designed to support the entire lifecycle of LLM application development, from initial experimentation to production deployment. Key capabilities include:
- Tracing and monitoring of LLM interactions and application logic
- Systematic iteration on prompts, datasets, and models
- Experimentation through an LLM Playground
- Comprehensive evaluation tools with custom and pre-built scorers
from weave.scorers import WeaveToxicityScorerV1
toxicity_scorer = WeaveToxicityScorerV1()
@weave.op
def call_llm(prompt: str) -> str:
"""Generate text using an LLM."""
# Your LLM generation logic here
return prompt.upper()
@morganmcg1
morganmcg1 / marimo_question.txt
Created February 11, 2025 15:45
marimo_question.txt
This file has been truncated, but you can view the full file.
<file_tree>
/Users/morganmcguire/ML/marimo
├── .github
├── ├── ISSUE_TEMPLATE
├── └── workflows
├── configs
├── dagger
├── └── src
├── └── └── main
├── development_docs
@morganmcg1
morganmcg1 / skipadding.md
Created February 8, 2025 15:13
ski-padding

Great! I'll find impact shorts for skiing and snowboarding that provide strong protection, are available for purchase in Dublin stores or from EU-based online retailers, and stay within your budget of €75. I'll prioritize options with sufficient padding that meet EU protective standards and fit a women's UK size 10. I'll update you once I have the best recommendations.

Best Impact Shorts for Skiing/Snowboarding (Beginner, Under €75, Ireland/EU)

Protective impact shorts (a.k.a. crash pants) are highly recommended for beginner skiers and snowboarders. They cushion your hips, thighs, and tailbone during falls, preventing bruises especially to the coccyx (tailbone) (Impact Shorts - Buy padded impact shorts for snowboarding) ([Impact Shorts - Buy padded impact shorts for snowboarding](https://www.skatepro.ie/c493.htm#:~:text=Snowboard%20padded%20shorts%20are%20recommended,can%20benefi

@morganmcg1
morganmcg1 / ski_jacket.md
Created February 5, 2025 22:47
Ski jacket options

Got it! I'll look for women's ski jackets available in Ireland that are size small, warm, and within your budget of €150. I'll prioritize multi-color options and slightly longer designs that cover your bum. I'll get back to you soon with some recommendations.

Women’s Ski Jackets (Size Small) Under €150 in Ireland

Based on your criteria – size Small, budget up to €150, warmth, waterproofness & breathability, and a slightly longer cut (covers the bum) with a preference for multi-color – here are several highly-rated women’s ski jackets available for purchase in Ireland. Each option offers solid insulation and weather protection for skiing conditions, and each is available in size Small within your budget. Key details (material, insulation type, waterproof rating, features) and purchase links are included:

1. Mountain Warehouse “Altitude Extreme” RECCO Ski Jacket (Women’s)

  • Price & Availability: ~€130 (about £129) when not on sale ([Best women’s ski jackets 2024, tried
@morganmcg1
morganmcg1 / german_market.md
Created February 5, 2025 21:36
German language market analysis

Market Analysis: Adult German Learners in the EU and USA (2014–2024)

Market Size and Modality (Online vs. In-Person)

Overall Scale: The German language learning market is substantial. Globally, an estimated 15.4 million people were learning German as a foreign language in formal settings as of 2020 (15.4 million people are learning German – DW – 06/04/2020) Europe accounts for the majority: around 11.2 million German learners in Europe (formal education and courses) according to a 2020 survey (German as a foreign language: Growing numbers learning German in Africa and Asia - Federal Foreign Office ) The United States has a much smaller German-learning popula