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
"""Shared infrastructure helpers for the DiscVault Next backend. These helpers have no application-domain dependencies. They are extracted from ``next_app.py`` so that domain modules can reuse them without importing the oversized application module. ``next_app.py`` re-imports every name defined here to preserve its pu...
helmerzNL/DiscVault
app/backend/next_common.py
.py
654c9912c1078f6e
7.48
8
"""Search-engine and AI-crawler exclusion for the DiscVault PWA. A DiscVault instance is a private collection manager, not a public website. Nothing in it is meant to be findable: the library, the shelves, the borrow history and the people pages all describe one household. Two self-hosted instances nevertheless turned...
helmerzNL/DiscVault
app/backend/next_crawlers.py
.py
4f0512c792e79b3f
7.48
8
"""DiscVault Next PostgreSQL migration helpers. This module is intentionally separate from the current SQLite app runtime. It is the first PostgreSQL foundation for DiscVault Next and can be executed as a standalone migration/status tool while the existing app remains unchanged. """ from __future__ import annotations...
helmerzNL/DiscVault
app/backend/next_database.py
.py
dc571b51e1679253
7.48
8
"""Column catalogue for Library exports. This module is the single source of truth for the columns a Library export can contain. The frontend fetches the catalogue to build its column picker, and the renderers in ``next_export.py`` use the same definitions for headers, ordering and layout hints, so the two can never d...
helmerzNL/DiscVault
app/backend/next_export_columns.py
.py
e9e0d7173f3572fb
7.48
8
"""Security primitives shared by DiscVault Next Legacy authentication. This module deliberately has no Flask or database dependency. Route code owns transactions and authorization while this module owns secret handling and the password/TOTP policy. """ from __future__ import annotations import base64 import hashlib ...
helmerzNL/DiscVault
app/backend/next_legacy_auth.py
.py
43d68e3171f4f96b
7.48
8
"""Paged library data routes for the DiscVault Next backend. The Library used to receive a single, hard-capped snapshot of 200 movies. This module exposes a paged endpoint so the frontend can hydrate the full library in background chunks instead, which is a prerequisite for exporting "all movies". """ from __future__...
helmerzNL/DiscVault
app/backend/next_library_data.py
.py
767f01052f021e29
7.48
8
"""Notification preference, delivery, and inbox helpers for DiscVault Next backend.""" from __future__ import annotations from typing import Any from uuid import UUID from flask import Flask, request from psycopg.types.json import Jsonb try: # pragma: no cover - exercised indirectly by both layouts from .next_...
helmerzNL/DiscVault
app/backend/next_notifications.py
.py
b82e2c731a4867b6
7.48
8
"""Shared ownership helpers for resources created by users and system jobs.""" from __future__ import annotations from typing import Any def instance_owner_id(conn) -> Any | None: with conn.cursor() as cur: cur.execute( """ SELECT u.id FROM users u JOIN us...
helmerzNL/DiscVault
app/backend/next_ownership.py
.py
43447d498eb1fd32
7.48
8
"""TheTVDB as a series source. Television only, and deliberately so. TVDB indexes films too, but its reason to exist here is the depth TMDB does not have: episode titles and numbering for shows TMDB is thin on, and coverage of older and non-US series. A source that answers every question makes the plugin order unreada...
helmerzNL/DiscVault
app/backend/next_plugins/tvdb/plugin.py
.py
e1c1b05ccce5d3e0
7.48
8
"""Slim raw pytest-benchmark JSON into the committed run of record and guard it. The run of record (``benchmarks/results/run-of-record/``) is the committed, diffable source for the published overhead charts and ``comparative.md``. This script slims a raw pytest-benchmark JSON dump to the fields the generators read — `...
haalfi/remote-store
benchmarks/slim_run_of_record.py
.py
aef677d3b42f98aa
7.42
6
"""BenchTarget ABC — minimal interface for comparative benchmarks.""" from __future__ import annotations import abc class BenchTarget(abc.ABC): """Minimal interface covering operations where comparison is meaningful. Only basic byte-level operations are included — streaming, atomic writes, copy/move, a...
haalfi/remote-store
benchmarks/targets/_protocol.py
.py
8c49ac06c31394aa
7.42
6
"""TTFB (Time to First Byte) benchmarks — remote-store only.""" from __future__ import annotations import uuid from typing import TYPE_CHECKING, Any if TYPE_CHECKING: from remote_store._backend import Backend def _unique(prefix: str = "bench") -> str: return f"{prefix}/{uuid.uuid4().hex[:12]}.bin" class ...
haalfi/remote-store
benchmarks/test_ttfb.py
.py
d6af31772ad0b1f5
7.92
6
"""S3 Listing Strategies -- Shallow vs. recursive listing: cost tradeoffs, iterator patterns, and MinIO endpoint usage. Demonstrates: - Shallow listing (direct children only) -- O(n_children) cost - Recursive listing (flat stream) -- O(n_total_files) cost - When to use each approach - Why parallelization is wrong for ...
haalfi/remote-store
examples/backends/s3_listing_strategies.py
.py
9f9734d191ded61d
7.42
6
"""Config loaders — Load registry configuration from TOML, YAML, and Pydantic models, with env-var interpolation. Demonstrates loading RegistryConfig from TOML files, YAML files, and Pydantic models, plus env-var interpolation. All loaders delegate to from_dict() for Secret wrapping and validation. --- see_also: - ...
haalfi/remote-store
examples/configuration/config_loaders.py
.py
07b7f63b50109a5f
7.42
6
"""Where an access log belongs in `probe`, and whether the interval survives it. The roadmap: *the sampler supports weights; nothing passes them. Weighting the sample by what people actually read would make ARR describe the queries that matter, but it also makes the sample non-uniform in a way the confidence interval ...
batuhanzorbeyzengin/rebasis
spikes/access_weighted.py
.py
1a9289142d095d94
7.6
15
"""Is an adapter chain worth what a direct fit costs? The roadmap has carried this since the first release: *v1 -> v2 -> v3 without a full refit at each step. Error accumulation across a chain has not been measured, and refitting against the original is probably more accurate — which is worth knowing rather than assum...
batuhanzorbeyzengin/rebasis
spikes/chained_adapters.py
.py
d1a8fda93ab4a940
7.6
15
"""Does rewriting every vector break the index that was built around them? The question `migrate` has never asked. A graph index picks a record's edges from the geometry of its neighbours at insert time; an in-place vector update changes the geometry and leaves the edges. Qdrant says so in as many words — a changed ve...
batuhanzorbeyzengin/rebasis
spikes/index_health.py
.py
d4b2458713bde1c0
7.6
15
"""What a completed migration is actually worth, on real corpora. `rebasis migrate` rewrites the indexed document vectors and, until now, applied the wrong map to do it — a `query_to_old` adapter, which leaves an index no query can answer. `fit --direction old_to_new` produces the right one. This measures what the rig...
batuhanzorbeyzengin/rebasis
spikes/migration_band.py
.py
f2ce19d40501db4a
7.6
15
"""What a float16 shadow copy gives up, measured. ``ShadowStore`` has taken a ``precision`` argument since it was written and nothing has ever passed ``float16``. The roadmap says why: it halves the shadow's disk cost and gives up the bit-identical rollback guarantee, and **a half guarantee may be more dangerous than ...
batuhanzorbeyzengin/rebasis
spikes/shadow_precision.py
.py
921e048cf687bf6c
7.6
15
"""Does truncating the new model's vector ever beat fitting an adapter? ``ROADMAP.md`` lists this as an open question under *Beyond 0.3*: "for models trained with nested representations, the right answer may be 'truncate and renormalise', with no adapter at all." It is open. Nothing in this repository has ever measure...
batuhanzorbeyzengin/rebasis
spikes/truncate_candidate.py
.py
028e49f1753a6982
7.6
15
"""The audit hash chain. Each record carries the hash of the one before it, so deleting or altering a record is detectable. **What this is, precisely.** It is **tamper-evident, not tamper-proof.** It is a local file, and its owner can regenerate the whole chain if they choose. The purpose is to catch **accidental cor...
batuhanzorbeyzengin/rebasis
src/rebasis/audit/chain.py
.py
c90a5bbfc9faf603
7.6
15
"""Reading the audit trail.""" from __future__ import annotations import json from typing import TYPE_CHECKING, Any from rebasis.audit.chain import ChainVerification, verify_chain from rebasis.audit.record import AuditRecord if TYPE_CHECKING: import sqlite3 from rebasis.manifest import ManifestDB __all__ ...
batuhanzorbeyzengin/rebasis
src/rebasis/audit/reader.py
.py
98789666e6afc8db
7.6
15
"""Audit record schema. **A log and an audit trail are different things, and conflating them is a common mistake.** * A **log** is for debugging. It may be lost, it may be sampled, its format may change between releases. * An **audit record** is for *reconstructing a decision*. It is lossless, never sampled, sche...
batuhanzorbeyzengin/rebasis
src/rebasis/audit/record.py
.py
9698703aca88d656
7.6
15
"""Reproducing a recorded decision. ``rebasis audit replay <seq>`` re-runs a decision with the inputs the record kept, and compares. If it differs, either there is a regression or the corpus has changed — and both are things you want to know. **The comparison depends on the hardware, and saying so matters:** * **Sam...
batuhanzorbeyzengin/rebasis
src/rebasis/audit/replay.py
.py
12cc990d5d3268f2
7.6
15
"""Writing audit records. Which events produce a record is a **small subset** of those that log. The event catalogue is the source of truth: a record is written when the event's ``audited`` flag is set. Appending is serialised through the manifest's write transaction. Two processes appending concurrently would produc...
batuhanzorbeyzengin/rebasis
src/rebasis/audit/writer.py
.py
9d21ae754642f71b
7.6
15
"""Command-line interface. Logging is configured **here and nowhere else**: importing rebasis as a library must never touch the host application's logging configuration. """ from __future__ import annotations from typing import Annotated, Any import typer from rebasis.cli._common import console, handle_errors, ver...
batuhanzorbeyzengin/rebasis
src/rebasis/cli/__init__.py
.py
eec94858e4f16ac9
7.6
15
"""Shared CLI plumbing. One ``@handle_errors`` decorator turns every :class:`RebasisError` into a rendered panel and the right exit code. Exit codes are a **contract** for script users:: 0 success 1 unexpected 2 usage or configuration 3 domain error 130 interrupted An unexpected erro...
batuhanzorbeyzengin/rebasis
src/rebasis/cli/_common.py
.py
dd1abe867bc8736f
7.6
15
"""Turning CLI flags into a running pipeline. ``probe``, ``fit`` and ``eval`` all need the same four things: a store, two embedders, an optional query log, and somewhere to put the report. Doing that once here keeps the three commands consistent — a flag means the same thing in all of them — and keeps each command fil...
batuhanzorbeyzengin/rebasis
src/rebasis/cli/_pipeline.py
.py
0307c2646a4ac318
7.6
15
"""Building an encoding profile from CLI flags. A model rebasis has never seen still has to be usable. The table covers the common ones; everything else arrives here, as flags. The one thing this will not do is **guess a prefix**. Many retrieval models encode a query differently from a document, usually with a short ...
batuhanzorbeyzengin/rebasis
src/rebasis/cli/_profiles.py
.py
8ca7e54ff0f2ac57
7.6
15
"""``rebasis adapter`` — inspect, verify, upgrade and list. The commands that are about the ``.rbs`` file itself rather than about an index. `upgrade` is the one that matters: it is referenced from the error a user sees when a file is too old to read, so it has to exist and it has to never destroy the file it was poin...
batuhanzorbeyzengin/rebasis
src/rebasis/cli/adapter.py
.py
f51ad50b4e62c2f3
7.6
15
"""``rebasis audit`` — inspect and verify the decision record.""" from __future__ import annotations import json from pathlib import Path # noqa: TC003 - typer resolves annotations at runtime from typing import TYPE_CHECKING, Annotated, Any import typer from rich.table import Table from rebasis.cli._common import ...
batuhanzorbeyzengin/rebasis
src/rebasis/cli/audit.py
.py
9696d748a7345d15
7.6
15
"""``rebasis eval`` — score an existing adapter against a query set.""" from __future__ import annotations from pathlib import Path # noqa: TC003 - typer resolves annotations at runtime from typing import TYPE_CHECKING, Annotated import typer from rebasis.cli._common import console, handle_errors, step_progress fr...
batuhanzorbeyzengin/rebasis
src/rebasis/cli/eval.py
.py
d22b67f48e6911ee
7.6
15
"""Array primitives shared by every layer. These live in ``compute`` rather than in ``core`` because of the layer contract: it puts ``core`` above ``compute``, so a helper both of them need has to sit at or below ``compute``. ``probe`` and ``serve`` use them too. The float32 contract is enforced at this boundary and ...
batuhanzorbeyzengin/rebasis
src/rebasis/compute/arrays.py
.py
51a5f3f1220c8bd9
7.6
15
"""Compute backend protocol. Two backends, one protocol: * :class:`~rebasis.compute.numpy_backend.NumpyBackend` — always available, and the **reference implementation**. When two backends disagree, this one is right. * ``TorchBackend`` — cuda / mps / cpu, only when the ``[torch]`` extra is installed. Arrives in...
batuhanzorbeyzengin/rebasis
src/rebasis/compute/base.py
.py
cfdef23905f314ff
7.6
15
"""Determinism and numerical consistency. PyTorch states plainly that results may not be reproducible between CPU and GPU even with identical seeds. Rather than hide that, rebasis records what it ran on and compares accordingly. **TF32 is the silent one.** On Ampere and later, matmul may quietly use TF32 — fewer mant...
batuhanzorbeyzengin/rebasis
src/rebasis/compute/determinism.py
.py
a3c461e833f33a0e
7.6
15
"""Device abstraction. The single responsibility of this module is to hide "where does this tensor live" from the rest of the codebase. **The governing principle: the CPU path is never optional, the GPU path is never mandatory.** A plain ``pip install rebasis`` has no torch at all; ``probe``, Procrustes fitting and t...
batuhanzorbeyzengin/rebasis
src/rebasis/compute/device.py
.py
1eb6c7ee42f10ecb
7.6
15
"""The numpy compute backend. Always available, and the **reference implementation**: in a device-parity disagreement this is the one that is right. It exists so that ``pip install rebasis`` with no extras is a complete, working tool — not a degraded one. """ from __future__ import annotations from typing import TYP...
batuhanzorbeyzengin/rebasis
src/rebasis/compute/numpy_backend.py
.py
557d9af6c1b66941
7.6
15
"""Where the accelerator pays, and where it does not. The open question was where the size threshold sits above which kNN should move to the GPU. **M0 measured it and there is no threshold** — see section 8 of `docs/m0-findings.md`. On an A10G against a 4-vCPU host, chunked top-k was faster on the accelerator at every...
batuhanzorbeyzengin/rebasis
src/rebasis/compute/thresholds.py
.py
79741861df2b4db9
7.6
15
"""The torch compute backend. Runs on ``cuda``, ``mps`` or ``cpu``. Optional: without the ``[torch]`` extra the :class:`~rebasis.compute.numpy_backend.NumpyBackend` handles everything and no functionality is lost. **Conversion happens at the boundary.** Arrays come in as numpy and go out as numpy; no torch tensor esc...
batuhanzorbeyzengin/rebasis
src/rebasis/compute/torch_backend.py
.py
7e0410d1facddb97
7.6
15
"""Configuration, read from the environment in one place. Every ``REBASIS_*`` variable is declared here, with its default and what it is for. Scattering ``os.environ.get`` across the codebase produces two failures that are hard to see: a variable that is read in one place and ignored in another, and a set of knobs no ...
batuhanzorbeyzengin/rebasis
src/rebasis/config.py
.py
381039fe4d44f35e
7.6
15
"""Adapter base class and the shared fitting contract. The contract is the same everywhere, and the synthetic validation tests hold every adapter to it:: adapter = SomeAdapter.fit(src, dst) adapter.apply(src) ≈ dst Under the default ``query_to_old`` direction, ``src = f_new(d)`` and ``dst = f_old(d)``: the a...
batuhanzorbeyzengin/rebasis
src/rebasis/core/base.py
.py
f8a9b42205821f6d
7.6
15
"""Score calibration. An adapter preserves *ranking*; it does not preserve the *scale* of similarity scores. That distinction is invisible until it breaks something, and what it breaks is every pipeline with a fixed threshold such as ``similarity > 0.7``. **Measured (M0, 72 configurations):** without calibration the ...
batuhanzorbeyzengin/rebasis
src/rebasis/core/calibration.py
.py
bd9dc0b0da748201
7.6
15
"""CSLS hubness correction. MUSE's observation: vectors mapped from one space into another develop **hubness** — a few target vectors become the nearest neighbour of disproportionately many queries and wreck retrieval. CSLS penalises documents that are "close to everyone":: CSLS(q, d) = 2·cos(q, d) − r_T(d) − r_S...
batuhanzorbeyzengin/rebasis
src/rebasis/core/csls.py
.py
20429ee992bc1eb5
7.6
15
"""How much of one space's geometry survives in the other — before any fit. ADR 10 measured that retention is bounded by the source and rejected predicting it from the model pair, because the evidence for that was a correlation over fifteen runs. This is a different object. It is not a prediction and it does not compe...
batuhanzorbeyzengin/rebasis
src/rebasis/core/geometry.py
.py
760c997cf4146f17
7.6
15
"""The no-op adapter. Feeds the new model's vector straight into the old index. Retained because it is the honest baseline: the reference work reports ARR ≈ 0.65 for it, and M0 measured **0.274** across four corpora — worse than the reference, and far below every fitted adapter. Keeping it in the ``auto`` comparison ...
batuhanzorbeyzengin/rebasis
src/rebasis/core/identity.py
.py
a593d0f11c7b0b78
7.6
15
""" title: rag-of-all-trades function author: WikiTeq date: 2027-01-27 version: 2.3 license: MIT description: A function that calls the RAG service to retrieve context for chat queries with OWUI sources integration requirements: requests """ import logging import os import re from collections.abc import Awaitable, Cal...
WikiTeq/mAItion
functions/function.py
.py
b8d199e52493293e
7.66
20
""" title: Image Resizer author: EaV Solution, WikiTeq version: 0.2 description: Downscales oversized images in chat messages before they reach the model. """ import base64 import io import logging from PIL import Image from pydantic import BaseModel, Field log = logging.getLogger(__name__) # Reject implausibly lar...
WikiTeq/mAItion
functions/image_resizer.py
.py
a129cf422ac50bf5
7.66
20
""" title: Video Inject Filter author: WikiTeq date: 2025-05-20 version: 1.1 license: MIT description: Reads VIDEO markers from tool messages and appends an inline player after the assistant response. Direct video file URLs use an HTML5 <video> tag; YouTube URLs use a clickable thumbnail linking out to YouTube (OWUI st...
WikiTeq/mAItion
functions/video_inject.py
.py
36d5c51a3060fff5
7.66
20
""" title: Get Current Sources author: WikiTeq date: 2025-07-10 version: 2.0 license: MIT description: Retrieves sources/citations emitted by tools in the current chat turn. Useful when the model needs to reference sources for inline citations. requirements: pydantic>=2.0.0 """ import hashlib import logging from pyda...
WikiTeq/mAItion
tools/get_sources.py
.py
6397d2b96d88f197
7.66
20
"""Spawn the Antigravity CLI (`agy`) and capture its plain-text output. agy print mode uses Go-style flags: agy -p "<prompt>" [--model <id>] [--continue | --new-project] [--dangerously-skip-permissions] [--sandbox] [--print-timeout <duration>] Output is plain text/markdown on stdout; there is no stream-...
hah23255/agy-to-im
src/agy_runner.py
.py
8a299359beeffa02
7.48
8
"""HTTP health/metrics endpoint — zero-dependency asyncio server.""" from __future__ import annotations import asyncio import gc import json import os import time HEALTH_HOST = "127.0.0.1" HEALTH_PORT = int(os.environ.get("AGY_BRIDGE_HEALTH_PORT") or "9099") # Self-restart if resident memory exceeds this threshold (b...
hah23255/agy-to-im
src/health.py
.py
22344d660f96f0e4
7.48
8
#!/usr/bin/env python3 """Graphify & Google OKF (Open Knowledge Format) v0.1 Integration Proof-of-Concept. This script implements both: 1. An Exporter: Turns Graphify's graph.json (NetworkX node-link data) into a strictly compliant OKF v0.1 bundle. 2. An Extractor: Reads an OKF v0.1 bundle and reconstructs a Graphi...
hah23255/agy-to-im
src/okf_exporter.py
.py
6bba61a4e872b8bb
7.48
8
"""Turn queue — FIFO async queue for multi-user concurrency.""" from __future__ import annotations import asyncio import logging from dataclasses import dataclass, field from typing import TYPE_CHECKING if TYPE_CHECKING: from src.telegram import InboundMessage LOG = logging.getLogger("antigravity_telegram_bridge...
hah23255/agy-to-im
src/queue.py
.py
45ced4946131840c
7.48
8
"""Atomic JSON-backed bridge state at ~/.antigravity/bridge/state.json. Per-chat state tracks the chat working directory, whether a session exists, model/mode overrides, and turn count. agy resumes sessions by cwd/project, so we do not store opaque session UUIDs. """ from __future__ import annotations import json imp...
hah23255/agy-to-im
src/state.py
.py
0fb559a4fcd3a286
7.48
8
"""Shared pytest fixtures.""" from __future__ import annotations import json from pathlib import Path from typing import Any import pytest @pytest.fixture def sample_config_dict() -> dict[str, Any]: """A valid config.json structure used across tests.""" return { "telegram": { "bot_token"...
hah23255/agy-to-im
tests/conftest.py
.py
00a2d03784f9d7e6
7.98
8
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved """ Backbone modules. """ from collections import OrderedDict import torch import torch.nn.functional as F import torchvision from torch import nn from torchvision.models._utils import IntermediateLayerGetter from typing import Dict, List from exa...
imitator-game/The-Imitator-Game
examples/baselines/act/act/detr/backbone.py
.py
ec282d53572a37de
7.42
6
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved """ Various positional encodings for the transformer. """ import math import torch from torch import nn from examples.baselines.act.act.utils import NestedTensor import IPython e = IPython.embed class PositionEmbeddingSine(nn.Module): """ ...
imitator-game/The-Imitator-Game
examples/baselines/act/act/detr/position_encoding.py
.py
f50ae801476485ca
7.42
6
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved """ Backbone modules. """ from collections import OrderedDict import torch import torch.nn.functional as F import torchvision from torch import nn from torchvision.models._utils import IntermediateLayerGetter from typing import Dict, List from exa...
imitator-game/The-Imitator-Game
examples/baselines/act/act/detr_video/backbone.py
.py
11c043477d7c0c5a
7.42
6
import os from typing import Optional import gymnasium as gym import mani_skill.envs from mani_skill.utils import gym_utils from mani_skill.utils.wrappers import CPUGymWrapper, FrameStack, RecordEpisode from mani_skill.vector.wrappers.gymnasium import ManiSkillVectorEnv _L_ENV_VAR_MAP = { "L1": "MANI_SKILL_L1", ...
imitator-game/The-Imitator-Game
examples/baselines/act/act/make_env.py
.py
4ede91b2f19a9962
7.42
6
from torch.utils.data.sampler import Sampler import numpy as np import torch import torch.distributed as dist from torch import Tensor from h5py import File, Group, Dataset from typing import Optional class NestedTensor(object): def __init__(self, tensors, mask: Optional[Tensor]): self.tensors = tensors ...
imitator-game/The-Imitator-Game
examples/baselines/act/act/utils.py
.py
8eeb4ba27acbcbd0
7.42
6
#@markdown ### **Network** #@markdown #@markdown Defines a 1D UNet architecture `ConditionalUnet1D` #@markdown as the noies prediction network #@markdown #@markdown Components #@markdown - `SinusoidalPosEmb` Positional encoding for the diffusion iteration k #@markdown - `Downsample1d` Strided convolution to reduce temp...
imitator-game/The-Imitator-Game
examples/baselines/diffusion_policy/diffusion_policy/conditional_unet1d.py
.py
96b81b1a0df65f1b
7.42
6
import os from typing import Optional import gymnasium as gym import mani_skill.envs from mani_skill.utils import gym_utils from mani_skill.utils.wrappers import CPUGymWrapper, FrameStack, RecordEpisode from mani_skill.vector.wrappers.gymnasium import ManiSkillVectorEnv _L_ENV_VAR_MAP = { "L1": "MANI_SKILL_L1", ...
imitator-game/The-Imitator-Game
examples/baselines/diffusion_policy/diffusion_policy/make_env.py
.py
fed1562d477963c9
7.42
6
import numpy as np import torch import torch.nn as nn import torch.nn.functional as F from gymnasium import spaces from h5py import Dataset, File, Group from torch.utils.data.sampler import Sampler class IterationBasedBatchSampler(Sampler): """Wraps a BatchSampler. Resampling from it until a specified number ...
imitator-game/The-Imitator-Game
examples/baselines/diffusion_policy/diffusion_policy/utils.py
.py
6a9f82e06b596060
7.42
6
from dataclasses import dataclass, field import json from pathlib import Path from typing import List, Optional import yaml from gr00t.data.types import ActionConfig, ActionFormat, ActionRepresentation, ActionType from .data.data_config import DataConfig, SingleDatasetConfig from .model import create_model_union_typ...
imitator-game/The-Imitator-Game
examples/baselines/gr00t/gr00t/configs/base_config.py
.py
20c66ddb2c7ee71a
7.42
6
from dataclasses import dataclass, field from typing import Any, List, Optional from gr00t.data.types import ModalityConfig from .embodiment_configs import MODALITY_CONFIGS @dataclass class SingleDatasetConfig: """Configuration for a single dataset in a mixed-training setup. A list of these objects can be ...
imitator-game/The-Imitator-Game
examples/baselines/gr00t/gr00t/configs/data/data_config.py
.py
0d6570a886a109ae
7.42
6
from dataclasses import MISSING, asdict, dataclass, field, is_dataclass from enum import Enum import json from pathlib import Path import torch from transformers import PretrainedConfig from . import register_model_config @dataclass class Gr00tN1d6Config(PretrainedConfig): """Unified configuration for Gr00tN1d6...
imitator-game/The-Imitator-Game
examples/baselines/gr00t/gr00t/configs/model/gr00t_n1d6.py
.py
7a061911e2d9f677
7.42
6
from pathlib import Path from typing import Any import numpy as np import pandas as pd from gr00t.data.interfaces import ShardedDataset from gr00t.data.types import EmbodimentTag, MessageType, ModalityConfig, VLAStepData from .lerobot_episode_loader import LeRobotEpisodeLoader def extract_step_data( episode_da...
imitator-game/The-Imitator-Game
examples/baselines/gr00t/gr00t/data/dataset/sharded_single_step_dataset.py
.py
63f726d0dd49133e
7.42
6
from functools import lru_cache import logging from google.cloud import logging as cloud_logging _fallback = logging.getLogger("frankly-match") # This logger carries the diagnostics that are no longer in the API response, so # it needs its own handler at INFO. Without one it inherits the root logger's # WARNING leve...
berkmancenter/frankly-match
api/logger.py
.py
eb23c98f28c69387
7.42
6
"""add_workflow_progress_table Revision ID: 01a7c2a05b7d Revises: 9dc9ecffd511 Create Date: 2026-01-08 17:00:25.854699 """ from typing import Sequence, Union from alembic import op import sqlalchemy as sa import sqlmodel # revision identifiers, used by Alembic. revision: str = "01a7c2a05b7d" down_revision: Union[...
agencyenterprise/draft-detective
alembic/versions/01a7c2a05b7d_add_workflow_progress_table.py
.py
7ef5b43bffb7019b
7.65
19
"""add_project_to_workflow Revision ID: 063d05606fe7 Revises: 1dc4e8fc4ced Create Date: 2025-11-27 15:47:31.954730 """ from typing import Sequence, Union from alembic import op import sqlalchemy as sa import sqlmodel # revision identifiers, used by Alembic. revision: str = '063d05606fe7' down_revision: Union[str, ...
agencyenterprise/draft-detective
alembic/versions/063d05606fe7_add_project_to_workflow.py
.py
4acfbc56fef2be08
7.65
19
"""add_feedback_visibility_to_projects Revision ID: 1cc768ae2623 Revises: 638a72046e37 Create Date: 2026-03-17 17:22:26.233764 """ from typing import Sequence, Union from alembic import op import sqlalchemy as sa import sqlmodel # revision identifiers, used by Alembic. revision: str = '1cc768ae2623' down_revision:...
agencyenterprise/draft-detective
alembic/versions/1cc768ae2623_add_feedback_visibility_to_projects.py
.py
74a75f4b4600f722
7.65
19
"""add start_line/end_line to issues Revision ID: 1d6c512c344f Revises: 3b1c8a9d2f04 Create Date: 2026-04-21 17:23:17.354495 """ from typing import Sequence, Union from alembic import op import sqlalchemy as sa import sqlmodel # revision identifiers, used by Alembic. revision: str = '1d6c512c344f' down_revision: U...
agencyenterprise/draft-detective
alembic/versions/1d6c512c344f_add_start_line_end_line_to_issues.py
.py
49a3c29dc773aba2
7.65
19
"""add_projects_table Revision ID: 1dc4e8fc4ced Revises: c6b3cc257d3c Create Date: 2025-11-27 15:43:04.931642 """ from typing import Sequence, Union from alembic import op import sqlalchemy as sa import sqlmodel # revision identifiers, used by Alembic. revision: str = '1dc4e8fc4ced' down_revision: Union[str, None]...
agencyenterprise/draft-detective
alembic/versions/1dc4e8fc4ced_add_projects_table.py
.py
a751bec73bf918af
7.65
19
"""add workflow_runs.state_json Revision ID: 1dea81b984c6 Revises: 6f5eebe4f144 Create Date: 2026-05-07 18:08:09.706906 """ from typing import Sequence, Union from alembic import op import sqlalchemy as sa import sqlmodel from sqlalchemy.dialects import postgresql # revision identifiers, used by Alembic. revision: ...
agencyenterprise/draft-detective
alembic/versions/1dea81b984c6_add_workflow_runs_state_json.py
.py
dcd2c063e036f607
7.65
19
"""create_user_model Revision ID: 1e1b703e2340 Revises: 8c26fdd2eb3a Create Date: 2025-11-10 13:37:39.391812 """ from typing import Sequence, Union from alembic import op import sqlalchemy as sa import sqlmodel from sqlalchemy.dialects import postgresql # revision identifiers, used by Alembic. revision: str = "1e1...
agencyenterprise/draft-detective
alembic/versions/1e1b703e2340_create_user_model.py
.py
1a0bd1934dfe0660
7.65
19
"""add chat threads and messages Revision ID: 2b4a61f4ed04 Revises: 1dea81b984c6 Create Date: 2026-07-30 17:58:25.582751 """ from typing import Sequence, Union from alembic import op import sqlalchemy as sa import sqlmodel from sqlalchemy.dialects import postgresql # revision identifiers, used by Alembic. revision:...
agencyenterprise/draft-detective
alembic/versions/2b4a61f4ed04_add_chat_threads_and_messages.py
.py
8c9d3b940f19d2e9
7.65
19
"""remove chunk_index from issues Revision ID: 37ed5633d338 Revises: 472f945f19b5 Create Date: 2026-02-16 14:16:49.891318 """ from typing import Sequence, Union from alembic import op import sqlalchemy as sa import sqlmodel # revision identifiers, used by Alembic. revision: str = '37ed5633d338' down_revision: Unio...
agencyenterprise/draft-detective
alembic/versions/37ed5633d338_remove_chunk_index_from_issues.py
.py
469877ebb683fb4d
7.65
19
"""add mcp_oauth_kv table for multi-pod OAuth state Revision ID: 3b1c8a9d2f04 Revises: 8ece42fd6856 Create Date: 2026-04-20 00:00:00.000000 """ from typing import Sequence, Union from alembic import op import sqlalchemy as sa from sqlalchemy.dialects.postgresql import JSONB # revision identifiers, used by Alembic....
agencyenterprise/draft-detective
alembic/versions/3b1c8a9d2f04_add_mcp_oauth_kv_table.py
.py
7ad8a31374393834
7.65
19
"""add show_experimental_features to users Revision ID: 3f207b45e735 Revises: f6c0d2582e72 Create Date: 2026-01-30 15:38:31.102957 """ from typing import Sequence, Union from alembic import op import sqlalchemy as sa import sqlmodel # revision identifiers, used by Alembic. revision: str = "3f207b45e735" down_revi...
agencyenterprise/draft-detective
alembic/versions/3f207b45e735_add_show_experimental_features_to_users.py
.py
9ae11706f7a72b0e
7.65
19
"""add_resolved_by_to_issues Revision ID: 472f945f19b5 Revises: bc0838c50bec Create Date: 2026-02-11 11:50:09.558770 """ from typing import Sequence, Union from alembic import op import sqlalchemy as sa import sqlmodel from alembic_postgresql_enum import TableReference # revision identifiers, used by Alembic. revis...
agencyenterprise/draft-detective
alembic/versions/472f945f19b5_add_resolved_by_to_issues.py
.py
147417525cfbff59
7.65
19
"""merge_share_links_and_files Revision ID: 4da476c9a29e Revises: a1b2c3d4e5f6, cdfa040a0771 Create Date: 2025-12-10 20:27:31.862486 """ from typing import Sequence, Union from alembic import op import sqlalchemy as sa import sqlmodel # revision identifiers, used by Alembic. revision: str = '4da476c9a29e' down_rev...
agencyenterprise/draft-detective
alembic/versions/4da476c9a29e_merge_share_links_and_files.py
.py
a0a410886bdff42f
7.65
19
"""app configs Revision ID: 638a72046e37 Revises: 37ed5633d338 Create Date: 2026-03-12 18:07:56.620353 """ from typing import Sequence, Union from alembic import op import sqlalchemy as sa import sqlmodel # revision identifiers, used by Alembic. revision: str = '638a72046e37' down_revision: Union[str, None] = '37e...
agencyenterprise/draft-detective
alembic/versions/638a72046e37_app_configs.py
.py
47d63d531773f8b9
7.65
19
"""migrate_workflows_to_project Revision ID: 67ccc59315f1 Revises: 063d05606fe7 Create Date: 2025-11-27 15:49:12.894428 """ import uuid from typing import Sequence, Union from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision: str = "67ccc59315f1" down_revision: Union[str...
agencyenterprise/draft-detective
alembic/versions/67ccc59315f1_migrate_workflows_to_project.py
.py
ce041e277f935e6d
7.65
19
"""Add role column to users table Revision ID: 6c803193cd23 Revises: 01a7c2a05b7d Create Date: 2026-01-14 13:56:48.330768 """ from typing import Sequence, Union from alembic import op import sqlalchemy as sa import sqlmodel from sqlalchemy.dialects import postgresql # revision identifiers, used by Alembic. revision...
agencyenterprise/draft-detective
alembic/versions/6c803193cd23_add_role_column_to_users_table.py
.py
7b264a0ab103d4cc
7.65
19
"""add workflow run failure + heartbeat fields Revision ID: 6f5eebe4f144 Revises: f4ef6e0d9708 Create Date: 2026-05-04 10:54:20.375734 """ from typing import Sequence, Union from alembic import op import sqlalchemy as sa import sqlmodel from alembic_postgresql_enum import TableReference # revision identifiers, used...
agencyenterprise/draft-detective
alembic/versions/6f5eebe4f144_add_workflow_run_failure_heartbeat_.py
.py
9572ea9940f3187d
7.65
19
"""add_gin_indexes Revision ID: 73cd1358c54c Revises: b3d7e9f12a45 Create Date: 2026-03-23 12:54:47.214006 """ from typing import Sequence, Union from alembic import op import sqlalchemy as sa import sqlmodel # revision identifiers, used by Alembic. revision: str = '73cd1358c54c' down_revision: Union[str, None] = ...
agencyenterprise/draft-detective
alembic/versions/73cd1358c54c_add_gin_indexes.py
.py
c51afa0073d40c0a
7.65
19
"""switches to explicitely listing tools Revision ID: 79eb938381a8 Revises: e8cd4f1f7766 Create Date: 2025-09-18 01:06:10.833732 """ from typing import Sequence, Union from alembic import op import sqlalchemy as sa import sqlmodel from sqlalchemy.dialects import postgresql # revision identifiers, used by Alembic. r...
agencyenterprise/draft-detective
alembic/versions/79eb938381a8_switches_to_explicitely_listing_tools.py
.py
108da53472592089
7.65
19
"""Add RAND role to UserRole enum Revision ID: 88eae8d7e7a6 Revises: 3f207b45e735 Create Date: 2026-02-03 11:17:36.809746 """ from typing import Sequence, Union from alembic import op import sqlalchemy as sa import sqlmodel from alembic_postgresql_enum import TableReference # revision identifiers, used by Alembic....
agencyenterprise/draft-detective
alembic/versions/88eae8d7e7a6_add_rand_role_to_userrole_enum.py
.py
eae4e3aa87f256fe
7.65
19
"""add_started_and_completed_dates_to_workflow_ru Revision ID: 8b28e2a42549 Revises: 8fed267f38a8 Create Date: 2026-03-30 15:12:11.553352 """ from typing import Sequence, Union from alembic import op import sqlalchemy as sa import sqlmodel # revision identifiers, used by Alembic. revision: str = '8b28e2a42549' dow...
agencyenterprise/draft-detective
alembic/versions/8b28e2a42549_add_started_and_completed_dates_to_.py
.py
1309dea3ef1b6391
7.65
19
"""add_feedback_table Revision ID: 8c26fdd2eb3a Revises: aa82a3711f86 Create Date: 2025-10-23 19:19:21.063621 """ from typing import Sequence, Union from alembic import op import sqlalchemy as sa import sqlmodel from sqlalchemy.dialects import postgresql # revision identifiers, used by Alembic. revision: str = "8c...
agencyenterprise/draft-detective
alembic/versions/8c26fdd2eb3a_add_feedback_table.py
.py
6b66cd21b21714c0
7.65
19
"""add rate_limiter_buckets Revision ID: 8ece42fd6856 Revises: a03f3524ea71 Create Date: 2026-04-13 10:31:30.973227 """ from typing import Sequence, Union from alembic import op import sqlalchemy as sa import sqlmodel # revision identifiers, used by Alembic. revision: str = '8ece42fd6856' down_revision: Union[str,...
agencyenterprise/draft-detective
alembic/versions/8ece42fd6856_add_rate_limiter_buckets.py
.py
d0222cf301e09efc
7.65
19
"""add_cancelled_status_to_workflow Revision ID: 8fed267f38a8 Revises: 73cd1358c54c Create Date: 2026-03-27 10:08:34.393665 """ from typing import Sequence, Union from alembic import op import sqlalchemy as sa import sqlmodel from alembic_postgresql_enum import TableReference # revision identifiers, used by Alembic...
agencyenterprise/draft-detective
alembic/versions/8fed267f38a8_add_cancelled_status_to_workflow.py
.py
9aa696e6905cadba
7.65
19
"""add_type_to_workflow_run Revision ID: 90b84d00bfda Revises: c3fa401e821b Create Date: 2025-11-28 13:41:51.727721 """ from typing import Sequence, Union from alembic import op import sqlalchemy as sa import sqlmodel # revision identifiers, used by Alembic. revision: str = "90b84d00bfda" down_revision: Union[str...
agencyenterprise/draft-detective
alembic/versions/90b84d00bfda_add_type_to_workflow_run.py
.py
ea0bb7e2a0b07033
7.65
19
"""run_status Revision ID: 98b0e22e71a6 Revises: 14c9a3334e1d Create Date: 2025-09-26 15:05:49.876344 """ from typing import Sequence, Union from alembic import op import sqlalchemy as sa import sqlmodel from sqlalchemy.dialects import postgresql # revision identifiers, used by Alembic. revision: str = '98b0e22e71a...
agencyenterprise/draft-detective
alembic/versions/98b0e22e71a6_run_status.py
.py
975ce62eac2a3799
7.65
19
"""add_config_options_to_project_model Revision ID: 9dc9ecffd511 Revises: 4da476c9a29e Create Date: 2025-12-24 13:49:35.095903 """ from typing import Sequence, Union from alembic import op import sqlalchemy as sa import sqlmodel # revision identifiers, used by Alembic. revision: str = '9dc9ecffd511' down_revision:...
agencyenterprise/draft-detective
alembic/versions/9dc9ecffd511_add_config_options_to_project_model.py
.py
41eeb47762482811
7.65
19
"""add revision columns Revision ID: a03f3524ea71 Revises: ddaeb39ae83a Create Date: 2026-04-09 16:54:56.948481 """ from typing import Sequence, Union from alembic import op import sqlalchemy as sa import sqlmodel # revision identifiers, used by Alembic. revision: str = 'a03f3524ea71' down_revision: Union[str, Non...
agencyenterprise/draft-detective
alembic/versions/a03f3524ea71_add_revision_columns.py
.py
8bcf0033e214c1b7
7.65
19
"""add_share_links_table Revision ID: a1b2c3d4e5f6 Revises: dc6d4f17b026 Create Date: 2025-12-08 10:00:00.000000 """ from typing import Sequence, Union from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import postgresql # revision identifiers, used by Alembic. revision: str = "a1b2c3d4e5f6" d...
agencyenterprise/draft-detective
alembic/versions/a1b2c3d4e5f6_add_share_links_table.py
.py
b005d46efce3acf4
7.65
19
"""teams sign-in state Revision ID: ab0512d13ef0 Revises: 2b4a61f4ed04 Create Date: 2026-08-10 11:21:10.911008 """ from typing import Sequence, Union from alembic import op import sqlalchemy as sa import sqlmodel from sqlalchemy.dialects import postgresql # revision identifiers, used by Alembic. revision: str = 'ab...
agencyenterprise/draft-detective
alembic/versions/ab0512d13ef0_teams_sign_in_state.py
.py
48f85f7e4f734fd0
7.65
19
"""Add unique contraint to user email Revision ID: aef5202a5521 Revises: 6c803193cd23 Create Date: 2026-01-14 15:16:14.744230 """ from typing import Sequence, Union from alembic import op import sqlalchemy as sa import sqlmodel # revision identifiers, used by Alembic. revision: str = "aef5202a5521" down_revision:...
agencyenterprise/draft-detective
alembic/versions/aef5202a5521_add_unique_contraint_to_user_email.py
.py
00ed1f622336ca51
7.65
19
"""add_pg_trgm_extension Revision ID: b3d7e9f12a45 Revises: 1cc768ae2623 Create Date: 2026-03-23 00:00:00.000000 """ from typing import Sequence, Union from alembic import op # revision identifiers, used by Alembic. revision: str = "b3d7e9f12a45" down_revision: Union[str, None] = "1cc768ae2623" branch_labels: Uni...
agencyenterprise/draft-detective
alembic/versions/b3d7e9f12a45_add_pg_trgm_extension.py
.py
0e1d40b7e89b5635
7.65
19