Skip to content

Instantly share code, notes, and snippets.

View teamdandelion's full-sized avatar

Dandelion Mané teamdandelion

View GitHub Profile
import json
import sys
from typing import Any
def load_results(filename: str = "openai_model_test_results.json") -> list[dict[str, Any]]:
"""Load test results from JSON file."""
try:
with open(filename) as f:
@teamdandelion
teamdandelion / mirascope-ui-sync.md
Created May 28, 2025 17:27
mirascope-ui-sync plan

Mirascope Registry Sync Tool Spec

Purpose

Enable consuming projects to maintain automatic synchronization with mirascope/ui as the single source of truth, departing from shadcn's "copy then own" philosophy in favor of "sync and stay current."

Core Philosophy

  • mirascope/ui is SoT: Components should stay in sync with upstream
  • Explicit tracking: Clear visibility into what comes from registry vs local code
  • Automated updates: Enable daily sync checks and PR automation
  • Selective sync: Only update components you've chosen to use
@teamdandelion
teamdandelion / extraction_comparison.py
Last active February 18, 2025 13:22
Mirascope model extraction comparisons
import argparse
import asyncio
import inspect
import json
import logging
import time
from abc import ABC, abstractmethod
from pathlib import Path
from typing import Literal
@teamdandelion
teamdandelion / example.py
Last active February 14, 2025 19:38
Mirascope: Directly using response models, vs generating text then extracting
class PuzzleSolution(BaseModel):
weekly: int
monthly_min: int
monthly_max: int
puzzle = inspect.cleandoc("""A factory produces 5 widgets every
weekday, and 3 widgets per day on weekends, and one extra widget on Mondays.
How many widgets are produced in a week?
Each month has four weeks, and one holiday (which may be any day of the week).
@teamdandelion
teamdandelion / algobots.json
Created April 12, 2021 00:08
Algobot data
[
{
"tokenID": "40000000",
"traits": [
"All Algobots",
"Colour: Orange",
"Headphones: Supra-aural",
"Bodywork: Block",
"Component: X",
"State: Idle"
export type Tag = string;
export type UUID = string;
type EditorNode = {|
+uuid: UUID,
+tags: $ReadOnlyArray<Tag>,
+title: string,
+description: string,
+connections: $ReadOnlyArray<EditorConnection>,
+timestamp: TimestampMs | null,
This file has been truncated, but you can view the full file.
This file has been truncated, but you can view the full file.
[{"type":"sourcecred/analysis/output","version":"0.3.0"},{"edgeData":{"address":[["sourcecred","discord","ADDS_REACTION","bot","298673420181438465","👍","629411178837442601","680919780412227624"],["sourcecred","discord","ADDS_REACTION","bot","298673420181438465","👍","629411717704712192","686598242741387264"],["sourcecred","discord","ADDS_REACTION","bot","298673420181438465","👍","629412800346849302","680997300511965211"],["sourcecred","discord","ADDS_REACTION","bot","298673420181438465","👍","629412800346849302","684949419778375797"],["sourcecred","discord","ADDS_REACTION","bot","298673420181438465","👍","646826789544394755","682840015826321438"],["sourcecred","discord","ADDS_REACTION","bot","298673420181438465","👍","646826789544394755","683748121339363346"],["sourcecred","discord","ADDS_REACTION","bot","324631108731928587","👍","656207220148797497","691457333154414642"],["sourcecred","discord","ADDS_REACTION","bot","324631108731928587","👍","656207220148797497","691457469699981334"],["sourcecred","discord","ADDS_R
This file has been truncated, but you can view the full file.
This file has been truncated, but you can view the full file.
[{"type":"sourcecred/analysis/output","version":"0.3.0"},{"edgeData":{"address":[["sourcecred","github","AUTHORS","5","sourcecred","github","USERLIKE","USER","Beanow","4","sourcecred","github","COMMIT","MDY6Q29tbWl0MjMzMTk1NTEyOjMwNDA4NGE2NjhlYzUwZGZlMzI1YzM3N2I3ZmY5MjY1MDc5MTkxOTc="],["sourcecred","github","AUTHORS","5","sourcecred","github","USERLIKE","USER","Beanow","4","sourcecred","github","COMMIT","MDY6Q29tbWl0MjMzMTk1NTEyOmFlYzg5N2UxMDBjZjAyOGJhZTQ3OWNhYTE4ODBmMWY1OGRiODZlY2Q="],["sourcecred","github","AUTHORS","5","sourcecred","github","USERLIKE","USER","Beanow","4","sourcecred","github","COMMIT","MDY6Q29tbWl0MjMzMTk1NTEyOmFmZDNiNmVhNmY0NWQ0YjRiNTNmNzg3OTA1ZWM1M2RiZjQ2ZmJiZWY="],["sourcecred","github","AUTHORS","5","sourcecred","github","USERLIKE","USER","Beanow","4","sourcecred","github","COMMIT","MDY6Q29tbWl0MjMzMTk1NTEyOmI2YWU5OTc4YTFlNTMwY2Q2NDU1NWI3NTAzZmU3MTRjNDU4ODFiYWI="],["sourcecred","github","AUTHORS","5","sourcecred","github","USERLIKE","USER","Beanow","4","sourcecred","github","COMMIT","M