text
stringlengths
185
73.3k
repo
stringlengths
7
100
path
stringlengths
4
146
language
stringclasses
7 values
hash
stringlengths
16
16
score
float64
7
8.5
stars
int64
0
237k
"""Windows implementation of the daemon-installer interface, via a Task Scheduler task (`schtasks`, built into every Windows install — no extra dependency) triggered on logon — the Windows analogue of macos_launchd.py's LaunchAgent. See docs/adr/0002-pluggable-secret-store-and-daemon-installer.md — this is the ONLY fil...
DevDock-AI/claude-unlimited
claude_unlimited/daemon_installer/windows_taskscheduler.py
.py
6b0726fababcf19a
7.45
7
"""Export/Import bundles. `cryptography` is the single exception to the dependency-free-backend rule, and its use is confined to this file. A bundle containing Profiles (and therefore credentials) is ALWAYS passphrase-encrypted; Settings- or Activity-only bundles are plain JSON, since they hold no secrets. Two-step b...
DevDock-AI/claude-unlimited
claude_unlimited/export_import.py
.py
e15c19cd0877702c
7.45
7
"""Locale loading. Adding a language means dropping a `<code>.json` file into locales/ with the same keys as en.json — no code change, no registration step. en.json is the canonical key set. A locale missing a key falls back to the English string, so a partial translation still renders instead of showing a blank or a...
DevDock-AI/claude-unlimited
claude_unlimited/i18n.py
.py
9cfd7c13653bab8d
7.45
7
"""Desktop notifications via one OS-native mechanism per platform, none of them an extra dependency: `osascript` on macOS, `notify-send` on Linux, a PowerShell toast on Windows. The Linux and Windows paths are UNVERIFIED — treat them as a first cut, not confirmed backends. Every call site funnels through notify_if_ena...
DevDock-AI/claude-unlimited
claude_unlimited/notifications.py
.py
8cbf2252307c9191
7.45
7
"""Encodes/decodes what's actually stored in secret_store for an OAuth Profile. Two on-disk shapes exist: * a plain access token string, used for a manually-pasted token or an `api` kind Profile; * a small JSON blob holding access_token, refresh_token and expires_at, used once a refresh token is available...
DevDock-AI/claude-unlimited
claude_unlimited/oauth_credential.py
.py
71b2ce7cf9227ca7
7.45
7
"""OAuth token-refresh support for Claude Unlimited. The account-adding flow itself lives in cli.py's add_account(): a browser login through an isolated Claude Code session (`CLAUDE_CONFIG_DIR`), read back via anthropic_oauth.read_claude_code_credentials(). This module covers what happens afterwards: refresh_access_to...
DevDock-AI/claude-unlimited
claude_unlimited/oauth_login.py
.py
2ee3bad7b573235a
7.45
7
"""Classifies upstream response metadata into explicit Observation types. Pure, deterministic, no I/O. Takes only response metadata — the status code and an allowlist of header values the Proxy module extracts — never response bodies. That is what lets the Daemon forward request and response bodies as opaque streams w...
DevDock-AI/claude-unlimited
claude_unlimited/observation.py
.py
15a16ae34f074dcd
7.45
7
"""Orchestrates one Claude Code request through a codex-kind Profile: credential refresh, request translation, the HTTPS call to OpenAI's backend, and response translation back to Anthropic's shape. The single entry point gateway.py's codex branch calls into. Talks to the same backend endpoints the `codex` CLI does — ...
DevDock-AI/claude-unlimited
claude_unlimited/openai_bridge.py
.py
40c5f9085d6ecb7c
7.45
7
"""Encodes/decodes what's stored for a ChatGPT/Codex-subscription credential, and the JWT-decoding helpers needed to read its claims (expiry, account id, plan) without a network call. Mirrors oauth_credential.py's role for Anthropic OAuth Profiles, but for the shape Codex's own auth.json uses: id_token, access_token, r...
DevDock-AI/claude-unlimited
claude_unlimited/openai_credential.py
.py
1c3486f0336592f1
7.45
7
"""Claude model -> OpenAI/Codex model + reasoning-effort mapping. Pure, no I/O. The tiering is best-effort, matched by price/role parity between the Codex model catalog and Anthropic's published pricing; neither vendor documents an equivalence. Revisit when either lineup changes. The tiers are deliberately conservati...
DevDock-AI/claude-unlimited
claude_unlimited/openai_models.py
.py
646d29d7899f7814
7.45
7
"""Classifies an OpenAI/Codex-backend response's status and headers into the same Observation union observation.py defines for the Anthropic side. router.py's rotation logic already works over that union, so a codex-kind Profile needs a producer of it rather than a new consumer. Like observation.py, this stays metadat...
DevDock-AI/claude-unlimited
claude_unlimited/openai_observation.py
.py
bf429ed959ce3a7d
7.45
7
"""The local-only credential `claude` authenticates to THIS daemon with. Generated once and persisted: it is exported into the user's shell profile, so it must stay stable across daemon restarts. It is never sent to Anthropic. The Gateway compares it in constant time against what the client presents; a mismatch is a s...
DevDock-AI/claude-unlimited
claude_unlimited/placeholder_token.py
.py
c9ae0f3db501d896
7.45
7
"""Approximate cost calculation from published Anthropic API pricing (standard, non-batch rates). PRICING_SOURCE and PRICING_FETCHED below record where the table came from and when. Prices change and this table can go stale, so any cost figure shown must be labeled an estimate; Anthropic's own billing is the only autho...
DevDock-AI/claude-unlimited
claude_unlimited/pricing.py
.py
0974e8a2f0808b9a
7.45
7
"""Per-project request counters — the data backing the Dashboard's "Usage by project (Experimental)" section (see project_attribution.py for how a request is attributed to a project). Deliberately counts REQUESTS, not tokens or cost: the daemon has no per-request token/cost tracking, and a request count is data it alr...
DevDock-AI/claude-unlimited
claude_unlimited/project_usage.py
.py
355fbea0072bab5b
7.45
7
"""Builds the upstream request for a chosen Profile. Pure, no network I/O. Kept separate from the socket work in upstream.py so it is fully testable without a real Anthropic connection. Protocol details this module depends on: - Claude Code embeds `metadata.user_id` in the /v1/messages JSON body as a STRING tha...
DevDock-AI/claude-unlimited
claude_unlimited/proxy.py
.py
db1fd2bd41e353e1
7.45
7
"""Pure Rotation decision logic. No I/O, no credentials, no network. choose() picks which Profile should serve the next request. observe() folds an Observation (see observation.py) into updated per-profile state. Neither touches an upstream, a keychain, or a clock beyond what is passed in, which is what keeps them det...
DevDock-AI/claude-unlimited
claude_unlimited/router.py
.py
2391dc9cdcb977ec
7.45
7
"""Persists the Dashboard-visible slice of Gateway's live runtime state (usage %, reset times, which Profile is current) across daemon restarts. A display cache only, never a source of truth for Rotation decisions. Deliberately NOT persisted: AUTH_INVALID/EXHAUSTED/COOLDOWN/DRAINING states or cooldown_until — a restar...
DevDock-AI/claude-unlimited
claude_unlimited/runtime_state.py
.py
1e9aec4c14f0d1cb
7.45
7
"""macOS implementation of the secret-store interface, via the `security` CLI. See docs/adr/0002-pluggable-secret-store-and-daemon-installer.md — this is the ONLY file that should ever shell out to `security` or know Keychain's shape. Callers use claude_unlimited.secret_store, never this module directly. """ from __f...
DevDock-AI/claude-unlimited
claude_unlimited/secret_store/macos_keychain.py
.py
709a440021acf3cf
7.45
7
"""Windows implementation of the secret-store interface, via DPAPI (CryptProtectData/CryptUnprotectData in crypt32.dll) through `ctypes` — built into every Windows install, so this needs no extra dependency, the same "nothing to pip install" property macos_keychain.py and linux_secretservice.py have. See docs/adr/0002-...
DevDock-AI/claude-unlimited
claude_unlimited/secret_store/windows_dpapi.py
.py
e892446f6ee02373
7.45
7
"""Per-terminal-session credentials for `claude-unlimited code --profile`. The shared placeholder_token only proves the request came from a process on this machine, and every invocation uses the same one, so it cannot carry any extra meaning. Pinning one terminal to one specific Profile, without affecting other concur...
DevDock-AI/claude-unlimited
claude_unlimited/session_tokens.py
.py
590f533826e77031
7.45
7
"""Checks for, downloads, verifies and installs a new release. TRUST ROOT — the decision this feature was blocked on, made explicit: 1. The source is hardcoded. GITHUB_OWNER/GITHUB_REPO below are constants, never read from config, never from a response body, never from an environment variable in a normal ...
DevDock-AI/claude-unlimited
claude_unlimited/updater.py
.py
d5395c791e30dd5b
7.45
7
"""Per-request usage history: a bounded local JSONL log, same shape as activity.py (append-only, trimmed on write, thread-safe). One record per completed request that yielded a captured model and usage (see usage_tracking.py). Backs the Dashboard's token/day, model-split, busiest-hours and cost figures, all aggregated ...
DevDock-AI/claude-unlimited
claude_unlimited/usage_history.py
.py
5289a2fc25ca46ad
7.45
7
"""What shape an endpoint speaks, and how to translate to and from it. Claude Code always speaks Anthropic Messages. What sits on the other side does not: OpenAI's Codex backend speaks the Responses API, while LM Studio, Ollama and most self-hosted servers speak OpenAI Chat Completions. Those differ in both request an...
DevDock-AI/claude-unlimited
claude_unlimited/wire_formats.py
.py
0b70d9ebd268db69
7.45
7
"""Command-line interface for openadapt-capture. Usage: capture install-ffmpeg capture record ./my_capture capture visualize ./my_capture capture info ./my_capture """ from __future__ import annotations from pathlib import Path def record( output_dir: str, description: str | None = None, ...
OpenAdaptAI/openadapt-capture
openadapt_capture/cli.py
.py
4e89f9a705676bbd
7.54
11
"""Video vs image frame comparison utilities. Compare extracted video frames against original captured images to verify frame extraction accuracy. """ from __future__ import annotations from dataclasses import dataclass, field from pathlib import Path from typing import TYPE_CHECKING import numpy as np if TYPE_CHE...
OpenAdaptAI/openadapt-capture
openadapt_capture/comparison.py
.py
916feb37c3b43e08
7.54
11
"""Package for interacting with the openadapt-capture database. Copied from legacy OpenAdapt db/db.py, adapted for per-capture databases. """ import sqlite3 from pathlib import Path import sqlalchemy as sa from loguru import logger from sqlalchemy import create_engine, inspect, text from sqlalchemy.ext.declarative i...
OpenAdaptAI/openadapt-capture
openadapt_capture/db/__init__.py
.py
93cb288ec89db32b
7.54
11
"""CRUD operations for openadapt-capture database. Copied from legacy OpenAdapt db/crud.py, adapted for per-capture databases. Only import paths are changed; function signatures and logic are identical. """ import json import sqlite3 from time import monotonic, sleep from typing import Any, Callable, TypeVar import ...
OpenAdaptAI/openadapt-capture
openadapt_capture/db/crud.py
.py
7cc70ba5ec454c91
7.54
11
"""SQLAlchemy models for openadapt-capture. Copied verbatim from legacy OpenAdapt models.py. Only import paths are changed; column definitions and relationships are identical. """ import io import sqlalchemy as sa from PIL import Image from openadapt_capture.db import Base # https://groups.google.com/g/sqlalchemy...
OpenAdaptAI/openadapt-capture
openadapt_capture/db/models.py
.py
bf0f3b863fe9a80b
7.54
11
"""Virtual-desktop coordinate contract for full-screen recordings.""" from __future__ import annotations import hashlib import json import threading import time from dataclasses import dataclass from dataclasses import field as dataclass_field from numbers import Integral from typing import Any, Callable, Iterable, M...
OpenAdaptAI/openadapt-capture
openadapt_capture/desktop_capture.py
.py
5952157f3c462531
7.54
11
"""Module for customizing multiprocessing.Queue to avoid NotImplementedError. Copied verbatim from legacy OpenAdapt extensions/synchronized_queue.py. """ import multiprocessing from multiprocessing.queues import Queue from typing import Any # Credit: https://gist.github.com/FanchenBao/d8577599c46eab1238a81857bb7277c...
OpenAdaptAI/openadapt-capture
openadapt_capture/extensions/synchronized_queue.py
.py
bfba0bee4582d8ed
7.54
11
"""Platform-specific implementations for GUI event capture. This module provides platform-specific implementations for: - Screen capture - Input event capture - Display information (resolution, DPI, pixel ratio) The module automatically selects the appropriate implementation based on the current platform (darwin, win...
OpenAdaptAI/openadapt-capture
openadapt_capture/platform/__init__.py
.py
0693b9a013a18446
7.54
11
"""macOS (Darwin) platform-specific implementations. This module provides macOS-specific functionality for: - Screen capture using Quartz - Display information (resolution, Retina pixel ratio) - Accessibility permission checking """ from __future__ import annotations import sys from openadapt_capture.platform impor...
OpenAdaptAI/openadapt-capture
openadapt_capture/platform/darwin.py
.py
d93f20ba1d0286fa
7.54
11
"""Windows platform-specific implementations. This module provides Windows-specific functionality for: - Screen capture using Win32 API - Display information (resolution, DPI scaling) - Accessibility/permission checking """ from __future__ import annotations import sys from openadapt_capture.platform import Display...
OpenAdaptAI/openadapt-capture
openadapt_capture/platform/windows.py
.py
760726bf4003a623
7.54
11
"""Example recordings and sample data loading. This module provides access to bundled example recordings that can be used for testing, demos, and as reference implementations. Example usage: >>> from openadapt_capture.samples import list_examples, load_example >>> print(list_examples()) ['turn-off-nightsh...
OpenAdaptAI/openadapt-capture
openadapt_capture/samples.py
.py
56236409a8156cf2
7.54
11
"""Share recordings between computers using Magic Wormhole. Usage: capture share send ./my_recording capture share receive 7-guitarist-revenge """ from __future__ import annotations import shutil import subprocess import sys import tempfile from pathlib import Path from zipfile import ZIP_DEFLATED, ZipFile ...
OpenAdaptAI/openadapt-capture
openadapt_capture/share.py
.py
9a22bc35ce17600a
7.54
11
"""Shared keyboard shortcuts for all OpenAdapt viewers. This module provides a unified keyboard shortcut system that ensures consistent UX across benchmark, training, and capture viewers. """ from __future__ import annotations def get_keyboard_shortcuts_js() -> str: """Get JavaScript code for unified keyboard s...
OpenAdaptAI/openadapt-capture
openadapt_capture/shared_ui/keyboard_shortcuts.py
.py
8d41160bebffb45a
7.54
11
"""Performance statistics collection and plotting. Track and visualize capture performance metrics like event processing latency and memory usage. """ from __future__ import annotations import time from collections import defaultdict from dataclasses import dataclass, field from pathlib import Path from typing impor...
OpenAdaptAI/openadapt-capture
openadapt_capture/stats.py
.py
9277ac8a01140619
7.54
11
"""Versioned structural observations captured beside native input events. Structural observations are optional evidence. They describe what the native accessibility API exposed at action time; absent values stay absent rather than being guessed from pixels, coordinates, or neighboring controls. """ from __future__ i...
OpenAdaptAI/openadapt-capture
openadapt_capture/structural.py
.py
5c82327562bdec86
7.54
11
"""Windows UI Automation observation without input injection. ``pywinauto`` is imported only when the Windows observer is instantiated. Importing this module on macOS, Linux, or a headless host is side-effect free. """ from __future__ import annotations import ctypes import gc import logging import math import sys i...
OpenAdaptAI/openadapt-capture
openadapt_capture/structural_observer/windows.py
.py
ec0c422b39f4c3bb
7.54
11
"""Utility functions for openadapt-capture. Copied from legacy OpenAdapt utils.py — timestamp management, screenshot capture, and multiprocessing helpers. Only import paths are changed. """ import sys import threading import time import traceback from functools import wraps from typing import Any, Callable import ms...
OpenAdaptAI/openadapt-capture
openadapt_capture/utils.py
.py
c061f3e8e1f5a026
7.54
11
# # Muna # Copyright © 2026 NatML Inc. All Rights Reserved. # # /// script # requires-python = ">=3.11" # dependencies = [ # "huggingface_hub", # "muna", # "onnxruntime", # "opencv-python-headless", # "torchvision" # ] # /// from cv2 import applyColorMap, cvtColor, COLOR_BGR2RGB, COLORMAP_INFE...
muna-ai/models
depth-estimation/apple_depth_pro.py
.py
0ad528cd545e11ef
7.59
14
# # Muna # Copyright © 2026 NatML Inc. All Rights Reserved. # # NOTE: In order to run and/or compile this model, you must clone Depth Anything into the current working directory. # Run `git clone https://github.com/LiheYoung/Depth-Anything.git` then run/compile this script. # /// script # requires-python = ">=3.1...
muna-ai/models
depth-estimation/depth_anything_.py
.py
fcc1c32145e6fa4e
7.59
14
# # Muna # Copyright © 2026 NatML Inc. All Rights Reserved. # # NOTE: In order to run and/or compile this model, you must clone Depth Anything V2 into the current working directory. # Run `git clone https://github.com/DepthAnything/Depth-Anything-V2.git` then run/compile this script. # /// script # requires-pytho...
muna-ai/models
depth-estimation/depth_anything_v2_.py
.py
fca682b7cbfe2466
7.59
14
# # Muna # Copyright © 2026 NatML Inc. All Rights Reserved. # # NOTE: In order to run and/or compile this model, you must clone Depth Anything V3 into the current working directory. # Run `git clone https://github.com/ByteDance-Seed/Depth-Anything-3.git` then run/compile this script. # /// script # requires-pytho...
muna-ai/models
depth-estimation/depth_anything_v3_.py
.py
2ab074c2e1fbe7c1
7.59
14
# # Muna # Copyright © 2026 NatML Inc. All Rights Reserved. # # /// script # requires-python = ">=3.12" # dependencies = ["diffusers[torch]>=0.37.0", "muna", "sentencepiece", "transformers>=5.7"] # /// from accelerate import init_empty_weights from contextlib import contextmanager from diffusers import ( Auto...
muna-ai/models
image-generation/flux_2_klein_9b.py
.py
548d8c142f4d3aa2
7.59
14
# # Muna # Copyright © 2025 NatML Inc. All Rights Reserved. # # /// script # requires-python = ">=3.12" # dependencies = ["muna", "torchvision"] # /// from muna import compile, Parameter, Sandbox from muna.beta import OnnxRuntimeInferenceMetadata from numpy import int64 from numpy.typing import NDArray from PIL i...
muna-ai/models
image-segmentation/deeplab_v3.py
.py
4c005e2464188354
7.59
14
# # Muna # Copyright © 2026 NatML Inc. All Rights Reserved. # # /// script # requires-python = ">=3.12" # dependencies = ["huggingface_hub", "muna", "onnxruntime", "torchvision"] # /// from huggingface_hub import hf_hub_download from muna import compile, Parameter, Sandbox from muna.beta import OnnxRuntimeInferen...
muna-ai/models
image-segmentation/segment_anything_2_1_roi.py
.py
392cac39446b23a6
7.59
14
# # Muna # Copyright © 2025 NatML Inc. All Rights Reserved. # # /// script # requires-python = ">=3.12" # dependencies = ["huggingface_hub", "muna", "onnxruntime", "torchvision"] # /// from huggingface_hub import hf_hub_download from muna import compile, Parameter, Sandbox from muna.beta import OnnxRuntimeInferen...
muna-ai/models
image-segmentation/segment_anything_2_roi.py
.py
a69412440aa1c676
7.59
14
# # Muna # Copyright © 2025 NatML Inc. All Rights Reserved. # # /// script # requires-python = ">=3.12" # dependencies = ["muna", "rich", "torchvision", "ultralytics"] # /// from muna import compile, Parameter, Sandbox from muna.beta import OnnxRuntimeInferenceMetadata from numpy import bool_ from numpy.typing im...
muna-ai/models
image-segmentation/yolo_v8_segment_large.py
.py
d5ce5256264b6d7a
7.59
14
# # Muna # Copyright © 2026 NatML Inc. All Rights Reserved. # # /// script # requires-python = ">=3.12" # dependencies = ["accelerate", "muna", "torch", "transformers>=5.12"] # /// from accelerate import init_empty_weights from muna import compile, BatchConfig, Parameter, Sandbox from muna.beta import ( Annot...
muna-ai/models
large-language-models/gemma_4_26b_a4b_it.py
.py
3868d137ff090254
7.59
14
# # Muna # Copyright © 2026 NatML Inc. All Rights Reserved. # # /// script # requires-python = ">=3.12" # dependencies = ["accelerate", "muna", "torch", "transformers>=5.11"] # /// from accelerate import init_empty_weights from muna import compile, BatchConfig, Parameter, Sandbox from muna.beta import ( Annot...
muna-ai/models
large-language-models/glm_5_2.py
.py
23e3721d22c0a2a6
7.59
14
# # Muna # Copyright © 2026 NatML Inc. All Rights Reserved. # # /// script # requires-python = ">=3.12" # dependencies = ["accelerate", "muna", "tiktoken", "torch", "transformers>=5.12"] # /// from accelerate import init_empty_weights from contextlib import contextmanager from muna import compile, BatchConfig, Pa...
muna-ai/models
large-language-models/kimi_k2_5.py
.py
c7fae4ea2db9e778
7.59
14
# # Muna # Copyright © 2026 NatML Inc. All Rights Reserved. # # /// script # requires-python = ">=3.12" # dependencies = ["accelerate", "muna", "tiktoken", "torch", "transformers>=5.12"] # /// from accelerate import init_empty_weights from contextlib import contextmanager from muna import compile, BatchConfig, Pa...
muna-ai/models
large-language-models/kimi_k2_6.py
.py
895a2ffac3080a35
7.59
14
# # Muna # Copyright © 2026 NatML Inc. All Rights Reserved. # # /// script # requires-python = ">=3.11" # dependencies = ["huggingface_hub", "llama-cpp-python", "muna"] # /// from huggingface_hub import hf_hub_download from json import dumps from llama_cpp import Llama, LlamaGrammar from muna import compile, Para...
muna-ai/models
large-language-models/lfm_2_5_230m.py
.py
45bc2ace26ed9347
7.59
14
# # Muna # Copyright © 2026 NatML Inc. All Rights Reserved. # # /// script # requires-python = ">=3.12" # dependencies = ["accelerate", "muna", "torch", "transformers>=5.12"] # /// from accelerate import init_empty_weights from muna import compile, BatchConfig, Parameter, Sandbox from muna.beta import ( Annot...
muna-ai/models
large-language-models/qwen_3_8_27b.py
.py
09b7d45d11b31021
7.59
14
# # Muna # Copyright © 2026 NatML Inc. All Rights Reserved. # # /// script # requires-python = ">=3.12" # dependencies = ["lap", "muna", "torchvision", "ultralytics==8.3.161"] # /// from argparse import Namespace from muna import compile, Parameter, Sandbox from numpy import array, float32 from pydantic import B...
muna-ai/models
object-detection/bytetrack.py
.py
71c09abb2a815284
7.59
14
# # Muna # Copyright © 2026 NatML Inc. All Rights Reserved. # # /// script # requires-python = ">=3.11" # dependencies = ["muna", "rfdetr", "rich", "torchvision"] # /// from muna import compile, Parameter, Sandbox from muna.beta import OnnxRuntimeInferenceMetadata from PIL import Image from pydantic import BaseMo...
muna-ai/models
object-detection/rf_detr.py
.py
9e3f04d5b02ea299
7.59
14
# # Muna # Copyright © 2026 NatML Inc. All Rights Reserved. # # /// script # requires-python = ">=3.11" # dependencies = ["faster_coco_eval", "muna", "rich", "scipy", "tensorboard", "torchvision"] # /// from muna import compile, Parameter, Sandbox from muna.beta import OnnxRuntimeInferenceMetadata from PIL import...
muna-ai/models
object-detection/rt_detr.py
.py
c4b008f70ad8ccee
7.59
14
# # Muna # Copyright © 2026 NatML Inc. All Rights Reserved. # # /// script # requires-python = ">=3.11" # dependencies = ["muna", "rich", "torchvision", "ultralytics"] # /// from muna import compile, Parameter, Sandbox from muna.beta import OnnxRuntimeInferenceMetadata from PIL import Image from pydantic import B...
muna-ai/models
object-detection/yolo26_nano.py
.py
a8d7ac4220f1b3cc
7.59
14
# # Muna # Copyright © 2026 NatML Inc. All Rights Reserved. # # /// script # requires-python = ">=3.11" # dependencies = ["muna", "rich", "torchvision", "ultralytics"] # /// from muna import compile, Parameter, Sandbox from muna.beta import OnnxRuntimeInferenceMetadata from PIL import Image from pydantic import B...
muna-ai/models
object-detection/yolo_v8_nano.py
.py
dde658956d693f03
7.59
14
# # Muna # Copyright © 2026 NatML Inc. All Rights Reserved. # # /// script # requires-python = ">=3.11" # dependencies = [ # "loguru", # "muna", # "opencv-python-headless", # "packaging", # "psutil", # "rich", # "tabulate", # "torchvision" # ] # /// from muna import compile, Parame...
muna-ai/models
object-detection/yolox_nano.py
.py
3e3cbcae51731493
7.59
14
# # Muna # Copyright © 2026 NatML Inc. All Rights Reserved. # # /// script # requires-python = ">=3.11" # dependencies = ["ai-edge-litert", "muna", "opencv-python-headless", "torchvision"] # /// from ai_edge_litert.interpreter import Interpreter from muna import compile, Parameter, Sandbox from muna.beta import T...
muna-ai/models
pose-detection/blazepalm_detector.py
.py
d0e0f038575b9f7e
7.59
14
# # Muna # Copyright © 2026 NatML Inc. All Rights Reserved. # # /// script # requires-python = ">=3.11" # dependencies = ["ai-edge-litert", "muna", "opencv-python-headless", "torchvision"] # /// from ai_edge_litert.interpreter import Interpreter from cv2 import getRectSubPix, getRotationMatrix2D, warpAffine, BORD...
muna-ai/models
pose-detection/blazepalm_landmarker.py
.py
2ad0a1189777c4bd
7.59
14
# # Muna # Copyright © 2026 NatML Inc. All Rights Reserved. # # /// script # requires-python = ">=3.11" # dependencies = ["muna", "opencv-python-headless", "tensorflow", "torchvision"] # /// from muna import compile, Parameter, Sandbox from muna.beta import TFLiteInterpreterMetadata from numpy import array, ceil,...
muna-ai/models
pose-detection/blazepose_detector.py
.py
10e2a9039d3c7294
7.59
14
#!/usr/bin/env python3 """Convert Lex's bounded compressed JSONL datasets to Parquet.""" from __future__ import annotations import argparse import gzip from pathlib import Path import pyarrow import pyarrow.json as pyarrow_json import pyarrow.parquet as parquet # EUR-Lex can publish very large annex tables. The cu...
SFHAJJI/lex-ops
dataset_to_parquet.py
.py
2dcc7c5b42dcc6ed
7.42
6
"""CLI entry point for the Atlanta Tech Internships pipeline. Supports running the full pipeline or individual stages: python main.py --full # Run complete pipeline (default) python main.py --discover-only # Discovery only python main.py --readme-only # Regenerate README only python...
ctsc/southeast-tech-internships-2026-2027
main.py
.py
118a22a5678c4e57
7.48
8
"""Moves closed and stale listings from jobs.json to archived.json. Archival criteria: - CLOSED listings whose date_last_verified is older than 7 days. - Any listing whose date_added is older than 120 days, regardless of status. """ import logging from datetime import date, datetime, timezone from pathlib import Path...
ctsc/southeast-tech-internships-2026-2027
scripts/archive_stale.py
.py
1c03690a0f8b9fa8
7.48
8
"""Async link health checker that verifies all application URLs are still active. Uses httpx.AsyncClient for async HEAD requests with a concurrency limiter. Tracks consecutive failures in data/link_health.json; a listing must fail 2 consecutive checks across 2 runs before being marked CLOSED. """ import asyncio impor...
ctsc/southeast-tech-internships-2026-2027
scripts/check_links.py
.py
91ec1c41291d69d3
7.48
8
"""Discovery engine for entry-level/new-grad tech jobs in Georgia. Mirrors the internship discovery pipeline but uses entry_level_filters from config.yaml to find full-time entry-level positions instead of internships. """ import asyncio import json import logging from datetime import datetime, timezone from pathlib ...
ctsc/southeast-tech-internships-2026-2027
scripts/el_discover.py
.py
783cba16f47daf6f
7.48
8
"""Transforms jobs.json into a formatted README.md with categorized internship tables. Entry point script that loads the jobs database, renders it to markdown, validates the output, and writes the final README.md. """ import json import logging from pathlib import Path from scripts.utils.config import PROJECT_ROOT f...
ctsc/southeast-tech-internships-2026-2027
scripts/generate_readme.py
.py
aed07892724ff1b9
7.48
8
"""Processes community-submitted GitHub issues and adds valid listings to the database. Fetches open issues labeled 'new-internship', parses the structured issue form data, validates submissions, and adds valid listings to jobs.json. """ import hashlib import json import logging import re from datetime import date, d...
ctsc/southeast-tech-internships-2026-2027
scripts/process_issues.py
.py
b29a0bfe940aa1c4
7.48
8
"""Shared database I/O utilities for loading and saving JobsDatabase files. Provides load_database() and save_database() used across the pipeline: deduplicate, check_links, validate, el_validate, and archive_stale. """ import json import logging from datetime import datetime, timezone from pathlib import Path from s...
ctsc/southeast-tech-internships-2026-2027
scripts/utils/db_io.py
.py
ef146210cde014f3
7.48
8
"""Pydantic v2 data models for the Autonomous Internship Board. Defines all core models: enums for role categories, sponsorship status, listing status, and ATS types; plus Company, JobListing, JobsDatabase, and RawListing. """ import hashlib from datetime import date, datetime, timezone from enum import Enum from typ...
ctsc/southeast-tech-internships-2026-2027
scripts/utils/models.py
.py
419ee0846585abc8
7.48
8
"""Markdown table generation logic for rendering the README from job data. Transforms a JobsDatabase into a beautifully formatted README.md with categorized internship tables, stats, and legend. Only includes Southeast region listings (GA, FL, AL, TX, SC, NC, TN). """ import logging from datetime import date from sc...
ctsc/southeast-tech-internships-2026-2027
scripts/utils/readme_renderer.py
.py
98a56f44192042ba
7.48
8
"""Shared pytest fixtures for internship board tests.""" from datetime import date, datetime import pytest import yaml from scripts.utils.models import ( JobListing, JobsDatabase, ListingStatus, RoleCategory, SponsorshipStatus, ) @pytest.fixture def sample_job_listing_data(): """Raw dict fo...
ctsc/southeast-tech-internships-2026-2027
tests/conftest.py
.py
29ad7ec8e1ae9c8d
7.98
8
"""Tests for the CLI entry point (main.py).""" import json from unittest.mock import patch import pytest from main import main, parse_args, run_clean, run_full_pipeline class TestParseArgs: """Tests for CLI argument parsing.""" def test_no_args_defaults_to_full(self): args = parse_args([]) ...
ctsc/southeast-tech-internships-2026-2027
tests/test_main.py
.py
74123c846e884a19
7.98
8
#!/usr/bin/env python3 """ airdrop_indexer.py — Bot that listens to XELIS Vault contract events and records user activities to AirdropTracker. This bot runs off-chain and: 1. Listens to events emitted by VaultEngine, VaultSwap, PSM, Governor, etc. 2. Calls AirdropTracker.record_*() for each user action 3. Handle...
XelisVault/xelis-vault
scripts/airdrop_indexer.py
.py
bd917f5e29f6ddb4
7.45
7
#!/usr/bin/env python3 """ Check deployment priority of all Silex contracts. Returns exit code 0 if all contracts are properly tagged, 1 otherwise. Usage: python3 scripts/check_deployment_priority.py """ import os import re import sys from pathlib import Path CONTRACTS_DIR = Path(__file__).parent.parent / "contra...
XelisVault/xelis-vault
scripts/check_deployment_priority.py
.py
b1709050e0d93a13
7.45
7
#!/usr/bin/env python3 """ generate_airdrop_merkle.py — Generate Merkle tree from AirdropTracker data. This script: 1. Reads the AirdropTracker contract state (qualified users + distributions) 2. Builds the Merkle tree of (testnet_addr, mainnet_addr, amount) leaves 3. Outputs the Merkle root + full proof set for...
XelisVault/xelis-vault
scripts/generate_airdrop_merkle.py
.py
5a2f6341e6aa3664
7.45
7
#!/usr/bin/env python3 """Oracle keeper: 3 provider wallets keep the XEL/USD feed alive. Cadence économique (config on-chain: hard_stale=500, hb interval=900, timeout=4000): - submit_price + poke aggregate_now toutes les SUBMIT_EVERY blocks (~13 min) - heartbeats toutes les HEARTBEAT_EVERY blocks (~45 min) Fee 0.0...
XelisVault/xelis-vault
scripts/oracle_keeper3.py
.py
cc0429c78750b893
7.45
7
#!/usr/bin/env python3 """ validate_chunk_ids.py — Validates all cross-contract chunk IDs. This validator ACTUALLY verifies that each .call(Nu16, ...) cross-contract call targets a real entry ID in the target contract. It does this by: 1. Parsing each .slx file to extract its entry list (in declaration order) 2. F...
XelisVault/xelis-vault
scripts/validate_chunk_ids.py
.py
130efebba1826a7b
7.45
7
import asyncio # Test by running: # - python python/ccxt/pro/test/base/test_close.py # - python python/ccxt/pro/test/base/test_future.py class Future(asyncio.Future): def resolve(self, result=None): if not self.done(): self.set_result(result) def reject(self, error=None): if not s...
ccxt/okx-python
okx/ccxt/async_support/base/ws/future.py
.py
c66d714df683e343
7.42
6
#!/usr/bin/env python3 """Versioned identity primitives for reranker cloud evidence.""" from __future__ import annotations import hashlib import json from typing import Any __all__ = ( "CURRENT_BASELINE_SCHEMA", "LEGACY_BASELINE_SCHEMA", "SUPPORTED_BASELINE_SCHEMAS", "assert_credential_absent", "...
RyderFreeman4Logos/gb10-services
scripts/reranker_cloud_evidence.py
.py
a39d3e14898e1fca
7.42
6
#!/usr/bin/env python3 """Shared strict numeric score validation for reranker evidence paths.""" from __future__ import annotations import math class ScoreValidationError(ValueError): """A score array cannot be accepted as equivalence evidence.""" def validate_scores( scores: object, expected: int, ...
RyderFreeman4Logos/gb10-services
scripts/reranker_score_validation.py
.py
e335511f5338e9e9
7.42
6
# SPDX-FileCopyrightText: 2026 Miko Parkkinen # SPDX-License-Identifier: MIT from __future__ import annotations import re from datetime import UTC, datetime class ClockError(ValueError): """Raised when a source timestamp is outside the strict profile.""" _RFC3339 = re.compile( r"(?P<year>[0-9]{4})-(?P<mon...
Miko997/metriplane
adapters/massrobotics_amr/src/massrobotics_amr_adapter/clock.py
.py
a6cc6f21b35aa167
7.45
7
# SPDX-FileCopyrightText: 2026 Miko Parkkinen # SPDX-License-Identifier: MIT from __future__ import annotations import math import re import uuid from collections.abc import Mapping from .models import Quaternion class DatumError(ValueError): """Raised when datum or coordinate validation fails closed.""" _UU...
Miko997/metriplane
adapters/massrobotics_amr/src/massrobotics_amr_adapter/datum.py
.py
b5f651a6f334b6c1
7.45
7
# SPDX-FileCopyrightText: 2026 Miko Parkkinen # SPDX-License-Identifier: MIT """Public adapter operations.""" from __future__ import annotations import shutil import tempfile from pathlib import Path from typing import Any from .constants import ( DATASET_REPOSITORY, DATASET_REVISION, PREPARED_REPOSITOR...
Miko997/metriplane
adapters/robomimic_lowdim/src/robomimic_lowdim/core.py
.py
fa0d37a8143bfaab
7.45
7
# SPDX-FileCopyrightText: 2026 Miko Parkkinen # SPDX-License-Identifier: MIT """Canonical serialization and hashing primitives.""" from __future__ import annotations import hashlib import json from pathlib import Path def canonical_json_bytes(value: object) -> bytes: """Return newline-terminated canonical UTF-...
Miko997/metriplane
adapters/ros2_mcap/src/ros2_mcap_adapter/canonical.py
.py
f6010f802d4cf16f
7.45
7
""" Tools for building state and shock space grids. """ import numpy as np import torch import skagent.utils as utils device = torch.device("cuda" if torch.cuda.is_available() else "cpu") class Grid: """ A class representing a labeled grid of numerical values. Parameters ----------- config (di...
scikit-agent/scikit-agent
src/skagent/grid.py
.py
a46f1583c73112d2
7.45
7
""" ModelAnalyzer: Extracts structured metadata from scikit-agent DBlock/RBlock models. The analyzer builds an annotated dependency graph (``self.G``) as its source of truth and exposes it in two forms: - ``to_dict()`` -- node metadata and classified edges for visualization (e.g., plate-notation drawing via ModelVi...
scikit-agent/scikit-agent
src/skagent/model_analyzer.py
.py
42bdfd240d5efeeb
7.45
7
import os import yaml import pydot import colorsys import random import matplotlib.image as mpimg from io import BytesIO from IPython.display import SVG, display # 1) Load config _CONFIG_FILE = os.path.join( os.path.dirname(__file__), "model_visualization_config.yaml" ) with open(_CONFIG_FILE, "r") as f: _CFG...
scikit-agent/scikit-agent
src/skagent/model_visualizer.py
.py
63554974a2295339
7.45
7
from skagent.distributions import Bernoulli, Lognormal, MeanOneLogNormal from sympy.utilities.lambdify import lambdify from sympy.parsing.sympy_parser import parse_expr import yaml class ControlToken: """ Represents a parsed Control variable. """ def __init__(self, args): pass class Express...
scikit-agent/scikit-agent
src/skagent/parser.py
.py
19ab0bbb9ee0962c
7.45
7
""" Universal rule processing module for scikit-agent models. This module provides utilities for working with "rules" - the right-hand side expressions in structural statements that define model dynamics, controls, and rewards. A rule can be: - A callable (function, lambda) - A Control object - A Distribution or tupl...
scikit-agent/scikit-agent
src/skagent/rule.py
.py
cda6b30ccf641b84
7.45
7
""" Functions to support Monte Carlo simulation of models. """ from __future__ import annotations import warnings from copy import copy from typing import Mapping, Sequence, Union import numpy as np from skagent.distributions import ( Distribution, IndexDistribution, TimeVaryingDiscreteDistribution, ) f...
scikit-agent/scikit-agent
src/skagent/simulation/monte_carlo.py
.py
098f1eb6fb1199cd
7.45
7
from __future__ import annotations import inspect import logging from functools import lru_cache import numpy as np import torch # CO_VARARGS | CO_VARKEYWORDS: a function taking only ``*args`` or ``**kwargs`` # accepts arguments while its argument counts are zero. _CO_VAR_ARGUMENTS = inspect.CO_VARARGS | inspect.CO_V...
scikit-agent/scikit-agent
src/skagent/utils.py
.py
2ac9cc2131e34737
7.45
7
"""Regression test: a closed-form benchmark's block bounds must be consistent with its analytical policy, INCLUDING the borrowing region. The unconstrained perfect-foresight closed forms (D-2, D-3) borrow against human wealth, so at low wealth the optimal end-of-period assets are negative (``a' < 0``). The blocks prev...
scikit-agent/scikit-agent
tests/test_benchmark_bound_consistency.py
.py
185c91d366389eec
7.95
7
""" Tests for skagent.algos.best_response. The solved rules are asserted exactly. They are Monte Carlo estimates, so the sample counts here are the smallest at which the reported actions are stable across seeds; a solved action that moves is a signal, not noise to be papered over with a looser assertion. """ import n...
scikit-agent/scikit-agent
tests/test_best_response.py
.py
e04aa99c092b255c
7.95
7
class InvalidPatError(Exception): """A presented bearer credential that resolves to no live personal access token — unknown, mismatched, revoked, or expired.""" class AuthConfigurationError(Exception): """The configured auth mode cannot resolve a single operator identity — e.g. ``none`` mode with more...
czpython/druks
backend/druks/accounts/exceptions.py
.py
24c6cd359889548f
7.48
8
from alembic import context from sqlalchemy import engine_from_config, pool from druks.database import _MIGRATION_SUPPORT_ONLY from druks.models import Base from druks.secrets.fields import _EncryptedColumn from druks.settings import load_settings def _render_item(type_, obj, autogen_context): # Render app TypeD...
czpython/druks
backend/druks/alembic_support.py
.py
5742729f73cca712
7.48
8
class AppConfigError(Exception): """An app's ``.druks`` config could not be parsed or validated. Raised at intake (and by push-time validation) so bad config fails loudly where the work starts instead of half-applying.""" class SettingsDeclarationError(Exception): """A ``Settings`` inner class declar...
czpython/druks
backend/druks/apps/exceptions.py
.py
fd8d48ccabd9fc10
7.48
8