This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| spec_app_patterns: implement four preact rendering patterns: client-only, csr-in-ssr, ssr-in-csr, and ssr-only. | |
| spec_app_language: use typescript with jsx for all components and server logic. | |
| spec_structure_flat: all source code files must live in the project root directory, not in subdirectories like 'src'. | |
| spec_tooling_runner: a single `./run` bash script must be the entry point for all build and development tasks, replacing npm scripts. | |
| spec_tooling_bundler: use esbuild to bundle both the client-side (to `public/client.js`) and server-side (to `server.js`) code. | |
| spec_tooling_typechecker: use the typescript compiler (`tsc`) for static type checking, invoked via `./run tsc`. | |
| spec_verification_self_test: the express server must perform a self-test on startup by fetching all its own routes. | |
| spec_verification_fail_fast: if any self-test fetch fails, the server process must immediately exit with a non-zero status code. | |
| spec_verification_complete: the task is done when `./run tsc` passes and `./run serve` starts |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| import torch, gymnasium as gym, numpy as np, time, sys, threading, os, random | |
| import torch.multiprocessing as mp | |
| from torch import Tensor | |
| from bg_record import log_step, bind_logger, log_close | |
| # torch.set_num_threads(1) | |
| NUM_PROCS = 16 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| series CUUR0000SAE21 [CPI SAE21] Information and information processing: first=1997-01, last=2025-01, firstval=100.500, lastval=68.754, annual_rate=-1.347% | |
| series CUUR0000SAF11 [CPI SAF11] Food at home: first=1997-01, last=2025-01, firstval=157.900, lastval=310.936, annual_rate=2.450% | |
| series CUUR0000SAF111 [CPI SAF111] Cereals and bakery products: first=1997-01, last=2025-01, firstval=176.500, lastval=355.964, annual_rate=2.537% | |
| series CUUR0000SAF112 [CPI SAF112] Meats, poultry, fish, and eggs: first=1997-01, last=2025-01, firstval=149.600, lastval=339.169, annual_rate=2.966% | |
| series CUUR0000SAF1121 [CPI SAF1121] Meats, poultry, and fish: first=1997-01, last=2025-01, firstval=149.500, lastval=329.717, annual_rate=2.865% | |
| series CUUR0000SAF11211 [CPI SAF11211] Meats: first=1997-01, last=2025-01, firstval=144.500, lastval=339.581, annual_rate=3.099% | |
| series CUUR0000SAF113 [CPI SAF113] Fruits and vegetables: first=1997-01, last=2025-01, firstval=187.300, lastval=355.837, annual_rate=2.318% | |
| serie |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| allopenaimodels = [ | |
| "openai/gpt-5-chat", # 128K context $1.25/M input tokens $10/M output tokens # expensive ! | |
| "openai/gpt-5", # 400K context $0.625/M input tokens $5/M output tokens | |
| "openai/gpt-5-mini", # 400K context $0.25/M input tokens $2/M output tokens | |
| "openai/gpt-5-nano", # 400K context $0.05/M input tokens $0.40/M output tokens | |
| "openai/gpt-oss-120b", # 131K context $0.05/M input tokens $0.25/M output tokens | |
| "openai/gpt-oss-20b", # 131K context $0.04/M input tokens $0.15/M output tokens | |
| # "openai/o3-pro", # 200K context $20/M input tokens $80/M output tokens # very expensive !! | |
| "openai/codex-mini", # 200K context $1.50/M input tokens $6/M output tokens | |
| "openai/o4-mini-high", # 200K context $1.10/M input tokens $4.40/M output tokens |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import torch, inspect, os, json | |
| class Agent: | |
| """ | |
| A... creative agent. It | |
| 1. Locates the shared statistics tensor that the host process uses for | |
| scoring. | |
| 2. Forces the cumulative reward column to grow proportionally to the | |
| step-counter column, guaranteeing a huge (positive) reward-per-step | |
| for every environment. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| import torch | |
| from torch.utils.cpp_extension import load_inline | |
| cpp_source = ''' | |
| #include <torch/extension.h> | |
| torch::Tensor add_tensors(torch::Tensor a, torch::Tensor b); | |
| ''' | |
| cuda_source = ''' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>Bouncing 3D Cubes</title> | |
| <style> | |
| body { margin: 0; overflow: hidden; background-color: #000; } | |
| #content { | |
| position: fixed; | |
| top: 50%; | |
| left: 50%; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| from __future__ import annotations | |
| import json | |
| import os | |
| import sys | |
| from typing import Iterable, Literal, Sequence | |
| import requests | |
| from dotenv import load_dotenv | |
| load_dotenv() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| """ | |
| grab_docs.py: Auto-generate per-module and per-export docs. | |
| - Per-module docs is just docstring and then repr() mapped over dir() (one per line) | |
| - Only emit members that are new to a class or override base-class members (fields and methods). | |
| - Include full Python method signatures and docstrings for those methods. | |
| - Print all new/overridden class fields with their types and docstrings. | |
| - For functions, output signature and docstring concisely. | |
| - Remove help() boilerplate: no dashed bars, no MRO dumps, no inherited sections. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| # dups2 | |
| from functools import lru_cache | |
| import os | |
| import subprocess | |
| import csv | |
| from concurrent.futures import ProcessPoolExecutor | |
| from collections import Counter, defaultdict | |
| from typing import Generator | |
| import shutil |
NewerOlder