### Install Dependencies and Start Slidev Source: https://github.com/fractal-nyc/bootcamp-monorepo/blob/main/curriculum/slideshows/README.md Run these commands sequentially to install project dependencies and start the local development server for Slidev. Access the presentation at the specified URL. ```bash pnpm install ``` ```bash pnpm dev ``` -------------------------------- ### Install Dependencies and Run Development Servers Source: https://github.com/fractal-nyc/bootcamp-monorepo/blob/main/attendabot/README.md Install project dependencies and start the backend API/bot and frontend development servers. Ensure you are in the correct directories before running commands. ```bash cd backend && bun install cd ../frontend && bun install cp .env.example .env # Edit .env with your Discord token, JWT secret, etc. cd backend && bun run dev # API + bot on port 3001 cd frontend && bun run dev # Vite on port 5173 # Visit http://localhost:5173 ``` -------------------------------- ### Environment Variable Setup Source: https://github.com/fractal-nyc/bootcamp-monorepo/blob/main/curriculum/weeks/02-chatbot/auth-example-elysia/README.md Copy the example environment file and configure necessary variables like API keys and secrets. ```bash cp env.example .env ``` ```env # Required for AI features OPENAI_API_KEY=your-openai-api-key-here # Recommended for production JWT_SECRET=your-super-secret-jwt-key-change-in-production # Optional PORT=3000 NODE_ENV=development ``` -------------------------------- ### Install Modal and Authenticate Source: https://github.com/fractal-nyc/bootcamp-monorepo/blob/main/curriculum/weeks/06-models-and-evals/sp2026/day1.md Install the Modal Python client and authenticate your account. Follow the browser authentication flow when prompted by `modal setup`. ```bash pip install modal modal setup # follow the browser auth flow ``` -------------------------------- ### Vitest Test Setup Example Source: https://github.com/fractal-nyc/bootcamp-monorepo/blob/main/attendabot/backend/CLAUDE.md Example of setting up an in-memory SQLite database for testing with Vitest. Use `createTestDatabase()` for isolation and `fixtures` for test data. ```typescript import { createTestDatabase, fixtures } from "../utils/testUtils"; describe("MyService", () => { let db: Database.Database; beforeEach(() => { db = createTestDatabase(); // Insert test data using fixtures }); }); ``` -------------------------------- ### Setup Modal for Scaled GPT Training Source: https://github.com/fractal-nyc/bootcamp-monorepo/blob/main/curriculum/weeks/06-models-and-evals/sp2026/day3.md Install and set up the Modal client. This is the first step to using Modal for distributed training. ```bash pip install modal modal setup ``` -------------------------------- ### Start Development Server with Bun or NPM Source: https://github.com/fractal-nyc/bootcamp-monorepo/blob/main/curriculum/weeks/02-chatbot/auth-example/README.md Run this command to start the development server. Bun is recommended. ```bash # Using bun bun run dev # Or using npm npm run dev ``` -------------------------------- ### Install and Use 'hey' for Load Testing Source: https://github.com/fractal-nyc/bootcamp-monorepo/blob/main/curriculum/weeks/04-ambition/2-Tuesday-cloud-deployment.md Use this tool to generate HTTP load. Ensure you install the correct binary for your operating system. This example sends 1000 requests concurrently with 10 threads. ```bash # Install hey (HTTP load generator) # Mac: brew install hey # Linux: curl -sLo hey https://hey-release.s3.us-east-2.amazonaws.com/hey_linux_amd64 && chmod +x hey # Windows: curl -sLo hey.exe https://hey-release.s3.us-east-2.amazonaws.com/hey_windows_amd64 # Send 1000 requests, 10 concurrent hey -n 1000 -c 10 http://:3000 ``` -------------------------------- ### Setup Evaluation Environment Source: https://github.com/fractal-nyc/bootcamp-monorepo/blob/main/curriculum/weeks/06-models-and-evals/sp2026/day4.md These bash commands initialize a Python virtual environment, install necessary libraries (anthropic, openai), and pull two Ollama models for comparison. ```bash uv init evals && cd evals uv add anthropic openai # Pull two models to compare ollama pull llama3.2:3b ollama pull qwen3:1.7b ``` -------------------------------- ### Initialize a TypeScript Project with Bun Source: https://github.com/fractal-nyc/bootcamp-monorepo/blob/main/curriculum/scales/express1-simpleapp.md Use this command to start a new TypeScript project with Bun. Ensure Bun is installed on your system. ```sh bun init ``` -------------------------------- ### Start Development Server with Bun or npm Source: https://github.com/fractal-nyc/bootcamp-monorepo/blob/main/curriculum/weeks/02-chatbot/auth-example-elysia/README.md Start the development server using Bun for optimal performance or npm. ```bash # Using bun (optimal performance) bun run dev # Or using npm npm run dev ``` -------------------------------- ### Install Dependencies with Bun or NPM Source: https://github.com/fractal-nyc/bootcamp-monorepo/blob/main/curriculum/weeks/02-chatbot/auth-example/README.md Use this command to install project dependencies. Bun is recommended for faster installation. ```bash # Using bun (recommended) bun install # Or using npm npm install ``` -------------------------------- ### Install Google Cloud CLI Source: https://github.com/fractal-nyc/bootcamp-monorepo/blob/main/curriculum/weeks/04-ambition/2-Tuesday-cloud-deployment.md Instructions for installing the Google Cloud CLI on Mac and Linux. For Linux, refer to the official installation guide. ```bash # Google Cloud CLI # Mac: brew install --cask google-cloud-sdk # Linux: https://cloud.google.com/sdk/docs/install ``` -------------------------------- ### Test Different Prompts for Text Generation Source: https://github.com/fractal-nyc/bootcamp-monorepo/blob/main/curriculum/weeks/06-models-and-evals/sp2026/day3.md Demonstrates generating text using various starting prompts to observe how the model adapts its output based on the context provided. Includes a list of example prompts. ```python # Try some prompts prompts = [ "ROMEO:", "To be or not to be", "The king", "JULIET:\nO Romeo, Romeo,", "First Citizen:\nWe are", ] for prompt in prompts: print(f"\n{'='*60}") print(f"PROMPT: {prompt}") print(f"{'='*60}") print(generate_from_prompt(prompt, max_new_tokens=200)) ``` -------------------------------- ### Start Docker Database Source: https://github.com/fractal-nyc/bootcamp-monorepo/blob/main/curriculum/scales/prisma1-models_and_postgres.md Use Docker Compose to start the PostgreSQL database service defined in your `docker-compose.yml` file. This command assumes Docker Desktop is installed and running. ```sh docker compose up ``` -------------------------------- ### Cron Schedule Examples Source: https://github.com/fractal-nyc/bootcamp-monorepo/blob/main/discord-bot/README.md Provides practical examples of cron syntax for common scheduling needs. ```plaintext - 0 9 * * * - Every day at 9:00 AM - 0 14 * * 1 - Every Monday at 2:00 PM - */30 * * * * - Every 30 minutes ``` -------------------------------- ### Theme Configuration Example Source: https://github.com/fractal-nyc/bootcamp-monorepo/blob/main/curriculum/slideshows/slides.md Switch between different themes by modifying the `theme` property in the frontmatter. This example shows the frontmatter for 'default' and 'seriph' themes. ```yaml --- theme: default --- ``` ```yaml --- theme: seriph --- ``` -------------------------------- ### Install Dependencies with Bun or npm Source: https://github.com/fractal-nyc/bootcamp-monorepo/blob/main/curriculum/weeks/02-chatbot/auth-example-elysia/README.md Install project dependencies using either Bun (recommended for ElysiaJS) or npm. ```bash # Using bun (recommended for ElysiaJS) bun install # Or using npm npm install ``` -------------------------------- ### Serve Model with vLLM (Bash) Source: https://github.com/fractal-nyc/bootcamp-monorepo/blob/main/curriculum/weeks/06-models-and-evals/sp2026/day1.md Deploy a large language model for production serving using vLLM. Requires 'vllm' installation. Use '--tensor-parallel-size' for multi-GPU setups and '--max-model-len' to specify context window. ```bash uv install vllm vllm serve meta-llama/Llama-3.3-70B-Instruct \ --tensor-parallel-size 2 \ --max-model-len 8192 ``` -------------------------------- ### Start Bot in Production Mode Source: https://github.com/fractal-nyc/bootcamp-monorepo/blob/main/discord-bot/CLAUDE.md Use this command to start the bot in its production environment. ```bash bun start ``` -------------------------------- ### Complete Evaluation Pipeline Example Source: https://github.com/fractal-nyc/bootcamp-monorepo/blob/main/curriculum/weeks/06-models-and-evals/sp2026/day4.md This Python script sets up an end-to-end evaluation pipeline. It defines configurations for Ollama and Anthropic clients, models to compare, test prompts, and a judging prompt. It then iterates through prompts, gets responses from both models, and scores them using an LLM-as-judge approach. ```python """ Minimal eval pipeline: generate responses from two models, score them with heuristics and LLM-as-judge, print results. """ import json import os import re import time import anthropic import openai # --- Config --- OLLAMA = openai.OpenAI(base_url="http://localhost:11434/v1", api_key="ollama") CLAUDE = anthropic.Anthropic() MODEL_A = "llama3.2:3b" MODEL_B = "qwen3:1.7b" TEST_PROMPTS = [ {"id": "hash_table", "prompt": "What is a hash table? Explain simply.", "category": "cs"}, {"id": "photosynthesis", "prompt": "How does photosynthesis work?", "category": "science"}, {"id": "pasta", "prompt": "How do I make good pasta?", "category": "everyday"}, {"id": "recursion", "prompt": "Explain recursion with an example.", "category": "cs"}, {"id": "sleep", "prompt": "Why do humans need sleep?", "category": "science"}, {"id": "git", "prompt": "Explain git branching to a beginner.", "category": "cs"}, {"id": "rain", "prompt": "Why does it rain?", "category": "science"}, {"id": "interview", "prompt": "How should I prepare for a job interview?", "category": "advice"}, {"id": "regex", "prompt": "What are regular expressions and when should I use them?", "category": "cs"}, {"id": "bread", "prompt": "How does yeast make bread rise?", "category": "science"}, ] JUDGE_PROMPT = """Score this AI response on three dimensions (1-5 each): 1. **Accuracy**: Is the information factually correct? 2. **Clarity**: Is the explanation clear and easy to follow? 3. **Completeness**: Does it adequately address the question? Prompt: {prompt} Response: {response} Reply in JSON: {{"accuracy": <1-5>, "clarity": <1-5>, "completeness": <1-5>, "overall": <1-5>}}""" def get_response(model: str, prompt: str) -> str: """Get a response from an Ollama model.""" r = OLLAMA.chat.completions.create( model=model, messages=[{"role": "user", "content": prompt}], max_tokens=512, ) return r.choices[0].message.content def judge(prompt: str, response: str) -> dict: """Use Claude to score a response.""" msg = CLAUDE.messages.create( model="claude-sonnet-4-20250514", max_tokens=256, messages=[{"role": "user", "content": JUDGE_PROMPT.format(prompt=prompt, response=response)}], ) text = msg.content[0].text match = re.search(r'\{[^}]+\}', text) if match: return json.loads(match.group()) return {"accuracy": 0, "clarity": 0, "completeness": 0, "overall": 0} # --- Run the eval --- print(f"Evaluating {MODEL_A} vs {MODEL_B} on {len(TEST_PROMPTS)} prompts...\n") scores_a = [] scores_b = [] for tc in TEST_PROMPTS: print(f" {tc['id']}...", end=" ", flush=True) resp_a = get_response(MODEL_A, tc["prompt"]) resp_b = get_response(MODEL_B, tc["prompt"]) judge_a = judge(tc["prompt"], resp_a) judge_b = judge(tc["prompt"], resp_b) scores_a.append(judge_a) scores_b.append(judge_b) print(f"{MODEL_A}: {judge_a.get('overall', '?')}/5 | {MODEL_B}: {judge_b.get('overall', '?')}/5") ``` -------------------------------- ### Colab Notebook Setup: PyTorch and Data Loading Source: https://github.com/fractal-nyc/bootcamp-monorepo/blob/main/curriculum/weeks/06-models-and-evals/sp2026/day3.md Initializes PyTorch, sets the device (GPU if available), downloads the Shakespeare dataset, and sets up a character-level tokenizer. This is the foundational setup for training a character-level language model. ```python import torch import torch.nn as nn from torch.nn import functional as F import urllib.request import os device = 'cuda' if torch.cuda.is_available() else 'cpu' print(f'Using device: {device}') # Download Shakespeare (skips if already present) if not os.path.exists('shakespeare.txt'): url = 'https://raw.githubusercontent.com/karpathy/char-rnn/master/data/tinyshakespeare/input.txt' urllib.request.urlretrieve(url, 'shakespeare.txt') print("Downloaded shakespeare.txt") else: print("Using existing shakespeare.txt") with open('shakespeare.txt', 'r', encoding='utf-8') as f: text = f.read() print(f"Dataset size: {len(text):,} characters") # Character-level tokenizer chars = sorted(list(set(text))) vocab_size = len(chars) stoi = {ch: i for i, ch in enumerate(chars)} itos = {i: ch for i, ch in enumerate(chars)} encode = lambda s: [stoi[c] for c in s] decode = lambda l: ''.join([itos[i] for i in l]) ``` -------------------------------- ### Install Dependencies with Bun Source: https://github.com/fractal-nyc/bootcamp-monorepo/blob/main/curriculum/weeks/02-chatbot/auth-example/README.md Install all project dependencies, including development packages like @types/*, using the Bun package manager. ```bash bun install # This installs all @types/* packages ``` -------------------------------- ### Install and Use Ollama Source: https://github.com/fractal-nyc/bootcamp-monorepo/blob/main/curriculum/weeks/06-models-and-evals/sp2026/day1.md Install Ollama using the provided script, explore its commands, and pull/run a model. Ollama offers an OpenAI-compatible API for easy integration. ```bash # Install curl -fsSL https://ollama.com/install.sh | sh # Explore ollama ollama help # Pull and run a model ollama pull llama3.2:3b ollama run llama3.2:3b ``` ```bash curl http://localhost:11434/v1/chat/completions \ -H "Content-Type: application/json" \ -d '{ "model": "llama3.2:3b", "messages": [{"role": "user", "content": "Hello"}] }' ``` -------------------------------- ### Install and Download Whisper.cpp Model Source: https://github.com/fractal-nyc/bootcamp-monorepo/blob/main/curriculum/weeks/06-models-and-evals/sp2026/day1.md Installs the 'whisper-cpp' tool via Homebrew and downloads a small English model for transcription. Ensure the model is placed in the correct directory. ```bash brew install whisper-cpp # Download the model (~140MB, English-only, good speed/quality balance) curl -L -o /opt/homebrew/share/whisper-cpp/ggml-small.en.bin \ "https://huggingface.co/ggerganov/whisper.cpp/resolve/main/ggml-small.en.bin" ``` -------------------------------- ### Install Terraform Source: https://github.com/fractal-nyc/bootcamp-monorepo/blob/main/curriculum/weeks/04-ambition/2-Tuesday-cloud-deployment.md Commands for installing Terraform on Mac and Linux systems. For Linux, the official HashiCorp installation guide should be followed. ```bash # Terraform # Mac: brew install terraform # Linux: https://developer.hashicorp.com/terraform/install ``` -------------------------------- ### Project Setup with uv Source: https://github.com/fractal-nyc/bootcamp-monorepo/blob/main/curriculum/weeks/06-models-and-evals/sp2026/day4.md Use uv to initialize a new project directory and add necessary dependencies like anthropic and openai. ```bash uv init evals cd evals uv add anthropic openai ``` -------------------------------- ### Initialize Project and Add Dependencies Source: https://github.com/fractal-nyc/bootcamp-monorepo/blob/main/curriculum/weeks/06-models-and-evals/sp2026/day2.md Use 'uv' to initialize a new project directory and add the 'anthropic' library as a dependency. ```bash uv init fine-tuning cd fine-tuning uv add anthropic ``` -------------------------------- ### Copy Environment File Source: https://github.com/fractal-nyc/bootcamp-monorepo/blob/main/curriculum/weeks/02-chatbot/auth-example/README.md Copy the example environment file to create your own configuration file. ```bash cp env.example .env ``` -------------------------------- ### Example of AI Tool Use (Get Weather) Source: https://github.com/fractal-nyc/bootcamp-monorepo/blob/main/curriculum/weeks/02-chatbot/assignments/2-chat.md Integrate a tool into your AI model, such as a function to retrieve weather information. This demonstrates how to enable tool-calling capabilities with the Vercel AI SDK. ```typescript import { streamText, tool } from "ai-sdk-core"; import { openai } from "@ai-sdk/openai"; const getWeather = tool({ parameters: { location: "string", unit: { type: "string", enum: ["celsius", "fahrenheit"], }, }, execute: async (params) => { // Replace with actual weather API call return `The weather in ${params.location} is 25 degrees celsius.`; }, }); export async function action({ request }: Route.ActionArgs) { return streamText({ model: openai("gpt-4o", { tools: { getWeather } }), messages: await request.json().then(data => data.messages), }); } ``` -------------------------------- ### Initialize Project with uv Source: https://github.com/fractal-nyc/bootcamp-monorepo/blob/main/curriculum/weeks/06-models-and-evals/sp2026/day3.md Sets up a new Python project environment and adds the PyTorch package as a dependency using the uv package manager. ```bash uv init train-gpt cd train-gpt uv add torch ``` -------------------------------- ### Install Express and Types for Express Source: https://github.com/fractal-nyc/bootcamp-monorepo/blob/main/curriculum/scales/express1-simpleapp.md Install the necessary packages for building an Express application. This command installs Express and its TypeScript types. ```sh bun i express @types/express ``` -------------------------------- ### Install Docker and AWS CLI Source: https://github.com/fractal-nyc/bootcamp-monorepo/blob/main/curriculum/weeks/04-ambition/2-Tuesday-cloud-deployment.md Commands to install Docker and AWS CLI on Mac and Linux systems. Ensure Docker Desktop is installed for Mac. ```bash # Docker # Mac: Install Docker Desktop from https://www.docker.com/products/docker-desktop/ # Linux: sudo apt-get install -y docker.io docker-compose-v2 # AWS CLI # Mac: brew install awscli # Linux: sudo apt-get install -y awscli ``` -------------------------------- ### Initialize and Configure SFTTrainer Source: https://github.com/fractal-nyc/bootcamp-monorepo/blob/main/curriculum/weeks/06-models-and-evals/sp2026/day2.md Sets up the Supervised Fine-tuning (SFT) Trainer from the TRL library. Key configurations include batch size, gradient accumulation, learning rate, and output directory. ```python from trl import SFTTrainer, SFTConfig trainer = SFTTrainer( model=model, tokenizer=tokenizer, train_dataset=dataset, args=SFTConfig( per_device_train_batch_size=2, gradient_accumulation_steps=4, warmup_steps=5, num_train_epochs=3, learning_rate=5e-4, output_dir="outputs", logging_steps=10, max_seq_length=2048, dataset_text_field="text", ), ) ``` -------------------------------- ### Install Discord.js and Node-Cron Dependencies Source: https://github.com/fractal-nyc/bootcamp-monorepo/blob/main/discord-bot/docs/SETUP.md Install the discord.js library for Discord bot interactions and node-cron for scheduling tasks. Also, install the TypeScript types for node-cron. ```bash npm install discord.js node-cron npm install -D @types/node-cron ``` -------------------------------- ### MLX Project Setup Source: https://github.com/fractal-nyc/bootcamp-monorepo/blob/main/curriculum/weeks/06-models-and-evals/sp2026/day2.md Initializes a new Python project for MLX fine-tuning and adds the 'mlx-lm' package. This sets up the necessary environment for local model fine-tuning on macOS. ```bash uv init fine-tuning-mlx cd fine-tuning-mlx uv add mlx-lm ``` -------------------------------- ### Setup and Data Download for Transformer Model Source: https://github.com/fractal-nyc/bootcamp-monorepo/blob/main/curriculum/weeks/06-models-and-evals/sp2026/day3.md Initializes the environment, checks for GPU availability, and downloads the Shakespeare dataset if it doesn't exist. This code is essential for preparing the data before model training. ```python import os import torch import torch.nn as nn from torch.nn import functional as F # Use GPU if available device = 'cuda' if torch.cuda.is_available() else 'cpu' print(f'Using device: {device}') # Download Shakespeare (~1MB of text) if not already present if not os.path.exists('shakespeare.txt'): import urllib.request url = 'https://raw.githubusercontent.com/karpathy/char-rnn/master/data/tinyshakespeare/input.txt' urllib.request.urlretrieve(url, 'shakespeare.txt') print("Downloaded shakespeare.txt") else: print("Using existing shakespeare.txt") with open('shakespeare.txt', 'r', encoding='utf-8') as f: text = f.read() print(f"Dataset size: {len(text):,} characters") print(f"First 200 characters:\n{text[:200]}") ``` -------------------------------- ### Install OpenTelemetry Packages Source: https://github.com/fractal-nyc/bootcamp-monorepo/blob/main/curriculum/weeks/04-ambition/2-Tuesday-cloud-deployment.md Install the necessary OpenTelemetry packages for Node.js applications using npm. ```bash npm install @opentelemetry/api \ @opentelemetry/sdk-node \ @opentelemetry/auto-instrumentations-node \ @opentelemetry/exporter-trace-otlp-http \ @opentelemetry/exporter-metrics-otlp-http ``` -------------------------------- ### API Client Usage Examples Source: https://github.com/fractal-nyc/bootcamp-monorepo/blob/main/attendabot/frontend/CLAUDE.md Demonstrates various backend communication patterns using the api/client.ts file. Includes fetching students, creating notes, and managing observers. ```typescript import { getStudentsByCohort, createStudent, deleteNote } from "../api/client"; // Students const students = await getStudentsByCohort(cohortId); await updateStudent(id, { status: "graduated", observerId: 3 }); // Feed & Notes const feed = await getStudentFeed(studentId); await createNote(studentId, "Note content"); await deleteNote(studentId, noteId); // Observers const observers = await getObservers(); await syncObservers(); // Feature Requests const requests = await getFeatureRequests(); await createFeatureRequest({ title, description, author, priority }); // LLM const summary = await getStudentSummary(studentId, "2026-01-25"); ``` -------------------------------- ### Run Backend and Frontend Development Servers Source: https://github.com/fractal-nyc/bootcamp-monorepo/blob/main/attendabot/_devlogs/2026-01-11-001-project-restructure.md Use these commands to start the backend API server and the frontend Vite development server in separate terminals. The frontend will proxy API requests to the backend. ```bash # Backend (in one terminal) cd backend && bun run dev # API server # Frontend (in another terminal) cd frontend && bun run dev # Vite dev server ``` -------------------------------- ### Node-Cron Basic Scheduling and Control Source: https://github.com/fractal-nyc/bootcamp-monorepo/blob/main/discord-bot/docs/CRON.md Demonstrates how to create and manage Node-Cron tasks. Tasks can be started immediately upon creation or created with `scheduled: false` and started later using the `start()` method. Task status can be checked, and tasks can be stopped or destroyed. ```javascript const cron = require('node-cron'); // Create and start immediately const task = cron.schedule('0 9 * * *', () => { console.log('Task executed!'); }); // Create but don't start const task = cron.schedule('0 9 * * *', () => { console.log('Task executed!'); }, { scheduled: false // Don't start automatically }); // Start it later task.start(); ``` ```javascript const task = cron.schedule('* * * * *', () => { console.log('Running every minute'); }); // Control the task task.start(); // Begin execution task.stop(); // Pause execution task.destroy(); // Remove completely (can't restart) // Check task status console.log(task.getStatus()); // 'scheduled' or 'stopped' ``` -------------------------------- ### Initialize TypeScript Project and Prisma Source: https://github.com/fractal-nyc/bootcamp-monorepo/blob/main/curriculum/scales/prisma1-models_and_postgres.md Use bun to initialize a new TypeScript project and then initialize Prisma within it. Ensure Docker Desktop is running for subsequent steps. ```sh bun init bunx prisma init ``` -------------------------------- ### Install Dependencies with Bun Source: https://github.com/fractal-nyc/bootcamp-monorepo/blob/main/curriculum/weeks/02-chatbot/auth-example-elysia/README.md Command to install all project dependencies, including ElysiaJS packages, using the Bun package manager. ```bash bun install ```