repo_full_name
stringlengths
6
93
repo_url
stringlengths
25
112
repo_api_url
stringclasses
28 values
owner
stringclasses
28 values
repo_name
stringclasses
28 values
description
stringclasses
28 values
stars
int64
617
98.8k
forks
int64
31
355
watchers
int64
990
999
license
stringclasses
2 values
default_branch
stringclasses
2 values
repo_created_at
timestamp[s]date
2012-07-24 23:12:50
2025-06-16 08:07:28
repo_updated_at
timestamp[s]date
2026-02-23 15:23:15
2026-05-03 18:52:12
repo_topics
listlengths
0
13
repo_languages
unknown
is_fork
bool
1 class
open_issues
int64
3
104
file_path
stringlengths
3
208
file_name
stringclasses
509 values
file_extension
stringclasses
1 value
file_size_bytes
int64
101
84k
file_url
stringclasses
627 values
file_raw_url
stringclasses
627 values
file_sha
stringclasses
624 values
language
stringclasses
8 values
parsed_at
stringdate
2026-05-04 01:12:36
2026-05-04 19:41:55
text
stringlengths
100
102k
bytedance/deer-flow
https://github.com/bytedance/deer-flow
null
null
null
null
64,601
null
null
mit
null
null
null
null
null
null
null
backend/app/gateway/auth/repositories/base.py
null
null
null
null
null
null
Python
2026-05-04T02:17:34.825734
"""User repository interface for abstracting database operations.""" from abc import ABC, abstractmethod from app.gateway.auth.models import User class UserNotFoundError(LookupError): """Raised when a user repository operation targets a non-existent row. Subclass of :class:`LookupError` so callers that alr...
bytedance/deer-flow
https://github.com/bytedance/deer-flow
null
null
null
null
64,601
null
null
mit
null
null
null
null
null
null
null
backend/app/gateway/auth/reset_admin.py
null
null
null
null
null
null
Python
2026-05-04T02:17:34.932991
"""CLI tool to reset an admin password. Usage: python -m app.gateway.auth.reset_admin python -m app.gateway.auth.reset_admin --email admin@example.com Writes the new password to ``.deer-flow/admin_initial_credentials.txt`` (mode 0600) instead of printing it, so CI / log aggregators never see the cleartext sec...
bytedance/deer-flow
https://github.com/bytedance/deer-flow
null
null
null
null
64,601
null
null
mit
null
null
null
null
null
null
null
backend/app/gateway/auth/repositories/sqlite.py
null
null
null
null
null
null
Python
2026-05-04T02:17:35.044852
"""SQLAlchemy-backed UserRepository implementation. Uses the shared async session factory from ``deerflow.persistence.engine`` — the ``users`` table lives in the same database as ``threads_meta``, ``runs``, ``run_events``, and ``feedback``. Constructor takes the session factory directly (same pattern as the other fou...
bytedance/deer-flow
https://github.com/bytedance/deer-flow
null
null
null
null
64,601
null
null
mit
null
null
null
null
null
null
null
backend/app/gateway/auth_middleware.py
null
null
null
null
null
null
Python
2026-05-04T02:17:35.542429
"""Global authentication middleware — fail-closed safety net. Rejects unauthenticated requests to non-public paths with 401. When a request passes the cookie check, resolves the JWT payload to a real ``User`` object and stamps it into both ``request.state.user`` and the ``deerflow.runtime.user_context`` contextvar so ...
bytedance/deer-flow
https://github.com/bytedance/deer-flow
null
null
null
null
64,601
null
null
mit
null
null
null
null
null
null
null
backend/app/gateway/csrf_middleware.py
null
null
null
null
null
null
Python
2026-05-04T02:17:35.757721
"""CSRF protection middleware for FastAPI. Per RFC-001: State-changing operations require CSRF protection. """ import secrets from collections.abc import Callable from fastapi import Request, Response from starlette.middleware.base import BaseHTTPMiddleware from starlette.responses import JSONResponse from starlette...
bytedance/deer-flow
https://github.com/bytedance/deer-flow
null
null
null
null
64,601
null
null
mit
null
null
null
null
null
null
null
backend/app/gateway/config.py
null
null
null
null
null
null
Python
2026-05-04T02:17:35.864405
import os from pydantic import BaseModel, Field class GatewayConfig(BaseModel): """Configuration for the API Gateway.""" host: str = Field(default="0.0.0.0", description="Host to bind the gateway server") port: int = Field(default=8001, description="Port to bind the gateway server") cors_origins: li...
bytedance/deer-flow
https://github.com/bytedance/deer-flow
null
null
null
null
64,601
null
null
mit
null
null
null
null
null
null
null
backend/app/gateway/path_utils.py
null
null
null
null
null
null
Python
2026-05-04T02:17:36.168038
"""Shared path resolution for thread virtual paths (e.g. mnt/user-data/outputs/...).""" from pathlib import Path from fastapi import HTTPException from deerflow.config.paths import get_paths from deerflow.runtime.user_context import get_effective_user_id def resolve_thread_virtual_path(thread_id: str, virtual_path...
bytedance/deer-flow
https://github.com/bytedance/deer-flow
null
null
null
null
64,601
null
null
mit
null
null
null
null
null
null
null
backend/app/gateway/deps.py
null
null
null
null
null
null
Python
2026-05-04T02:17:36.181808
"""Centralized accessors for singleton objects stored on ``app.state``. **Getters** (used by routers): raise 503 when a required dependency is missing, except ``get_store`` which returns ``None``. Initialization is handled directly in ``app.py`` via :class:`AsyncExitStack`. """ from __future__ import annotations fr...
bytedance/deer-flow
https://github.com/bytedance/deer-flow
null
null
null
null
64,601
null
null
mit
null
null
null
null
null
null
null
backend/app/gateway/internal_auth.py
null
null
null
null
null
null
Python
2026-05-04T02:17:36.278963
"""Process-local authentication for Gateway internal callers.""" from __future__ import annotations import secrets from types import SimpleNamespace from deerflow.runtime.user_context import DEFAULT_USER_ID INTERNAL_AUTH_HEADER_NAME = "X-DeerFlow-Internal-Token" _INTERNAL_AUTH_TOKEN = secrets.token_urlsafe(32) de...
bytedance/deer-flow
https://github.com/bytedance/deer-flow
null
null
null
null
64,601
null
null
mit
null
null
null
null
null
null
null
backend/app/gateway/routers/artifacts.py
null
null
null
null
null
null
Python
2026-05-04T02:17:36.312139
import logging import mimetypes import zipfile from pathlib import Path from urllib.parse import quote from fastapi import APIRouter, HTTPException, Request from fastapi.responses import FileResponse, PlainTextResponse, Response from app.gateway.authz import require_permission from app.gateway.path_utils import resol...
bytedance/deer-flow
https://github.com/bytedance/deer-flow
null
null
null
null
64,601
null
null
mit
null
null
null
null
null
null
null
backend/app/gateway/authz.py
null
null
null
null
null
null
Python
2026-05-04T02:17:36.318869
"""Authorization decorators and context for DeerFlow. Inspired by LangGraph Auth system: https://github.com/langchain-ai/langgraph/blob/main/libs/sdk-py/langgraph_sdk/auth/__init__.py **Usage:** 1. Use ``@require_auth`` on routes that need authentication 2. Use ``@require_permission("resource", "action", filter_key=...
bytedance/deer-flow
https://github.com/bytedance/deer-flow
null
null
null
null
64,601
null
null
mit
null
null
null
null
null
null
null
backend/app/gateway/langgraph_auth.py
null
null
null
null
null
null
Python
2026-05-04T02:17:36.849858
"""LangGraph Server auth handler — shares JWT logic with Gateway. Loaded by LangGraph Server via langgraph.json ``auth.path``. Reuses the same ``decode_token`` / ``get_auth_config`` as Gateway, so both modes validate tokens with the same secret and rules. Two layers: 1. @auth.authenticate — validates JWT cookie, ex...
bytedance/deer-flow
https://github.com/bytedance/deer-flow
null
null
null
null
64,601
null
null
mit
null
null
null
null
null
null
null
backend/app/gateway/routers/feedback.py
null
null
null
null
null
null
Python
2026-05-04T02:17:37.074709
"""Feedback endpoints — create, list, stats, delete. Allows users to submit thumbs-up/down feedback on runs, optionally scoped to a specific message. """ from __future__ import annotations import logging from typing import Any from fastapi import APIRouter, HTTPException, Request from pydantic import BaseModel, Fie...
bytedance/deer-flow
https://github.com/bytedance/deer-flow
null
null
null
null
64,601
null
null
mit
null
null
null
null
null
null
null
backend/app/gateway/routers/models.py
null
null
null
null
null
null
Python
2026-05-04T02:17:37.204954
from fastapi import APIRouter, Depends, HTTPException from pydantic import BaseModel, Field from app.gateway.deps import get_config from deerflow.config.app_config import AppConfig router = APIRouter(prefix="/api", tags=["models"]) class ModelResponse(BaseModel): """Response model for model information.""" ...
bytedance/deer-flow
https://github.com/bytedance/deer-flow
null
null
null
null
64,601
null
null
mit
null
null
null
null
null
null
null
backend/app/gateway/routers/memory.py
null
null
null
null
null
null
Python
2026-05-04T02:17:37.226488
"""Memory API router for retrieving and managing global memory data.""" from fastapi import APIRouter, HTTPException from pydantic import BaseModel, Field from deerflow.agents.memory.updater import ( clear_memory_data, create_memory_fact, delete_memory_fact, get_memory_data, import_memory_data, ...
bytedance/deer-flow
https://github.com/bytedance/deer-flow
null
null
null
null
64,601
null
null
mit
null
null
null
null
null
null
null
backend/app/gateway/routers/assistants_compat.py
null
null
null
null
null
null
Python
2026-05-04T02:17:37.316640
"""Assistants compatibility endpoints. Provides LangGraph Platform-compatible assistants API backed by the ``langgraph.json`` graph registry and ``config.yaml`` agent definitions. This is a minimal stub that satisfies the ``useStream`` React hook's initialization requirements (``assistants.search()`` and ``assistants...
bytedance/deer-flow
https://github.com/bytedance/deer-flow
null
null
null
null
64,601
null
null
mit
null
null
null
null
null
null
null
backend/app/gateway/routers/auth.py
null
null
null
null
null
null
Python
2026-05-04T02:17:37.317284
"""Authentication endpoints.""" import logging import os import time from ipaddress import ip_address, ip_network from fastapi import APIRouter, Depends, HTTPException, Request, Response, status from fastapi.security import OAuth2PasswordRequestForm from pydantic import BaseModel, EmailStr, Field, field_validator fr...
bytedance/deer-flow
https://github.com/bytedance/deer-flow
null
null
null
null
64,601
null
null
mit
null
null
null
null
null
null
null
backend/app/gateway/routers/runs.py
null
null
null
null
null
null
Python
2026-05-04T02:17:37.453507
"""Stateless runs endpoints -- stream and wait without a pre-existing thread. These endpoints auto-create a temporary thread when no ``thread_id`` is supplied in the request body. When a ``thread_id`` **is** provided, it is reused so that conversation history is preserved across calls. """ from __future__ import ann...
bytedance/deer-flow
https://github.com/bytedance/deer-flow
null
null
null
null
64,601
null
null
mit
null
null
null
null
null
null
null
backend/app/gateway/routers/__init__.py
null
null
null
null
null
null
Python
2026-05-04T02:17:37.496498
from . import artifacts, assistants_compat, mcp, models, skills, suggestions, thread_runs, threads, uploads __all__ = ["artifacts", "assistants_compat", "mcp", "models", "skills", "suggestions", "threads", "thread_runs", "uploads"]
bytedance/deer-flow
https://github.com/bytedance/deer-flow
null
null
null
null
64,601
null
null
mit
null
null
null
null
null
null
null
backend/app/gateway/routers/skills.py
null
null
null
null
null
null
Python
2026-05-04T02:17:37.696856
import json import logging from pathlib import Path from fastapi import APIRouter, Depends, HTTPException from pydantic import BaseModel, Field from app.gateway.deps import get_config from app.gateway.path_utils import resolve_thread_virtual_path from deerflow.agents.lead_agent.prompt import refresh_skills_system_pro...
bytedance/deer-flow
https://github.com/bytedance/deer-flow
null
null
null
null
64,601
null
null
mit
null
null
null
null
null
null
null
backend/app/gateway/routers/channels.py
null
null
null
null
null
null
Python
2026-05-04T02:17:38.013110
"""Gateway router for IM channel management.""" from __future__ import annotations import logging from fastapi import APIRouter, HTTPException from pydantic import BaseModel logger = logging.getLogger(__name__) router = APIRouter(prefix="/api/channels", tags=["channels"]) class ChannelStatusResponse(BaseModel): ...
bytedance/deer-flow
https://github.com/bytedance/deer-flow
null
null
null
null
64,601
null
null
mit
null
null
null
null
null
null
null
backend/app/gateway/routers/agents.py
null
null
null
null
null
null
Python
2026-05-04T02:17:41.072549
"""CRUD API for custom agents.""" import logging import re import shutil import yaml from fastapi import APIRouter, HTTPException from pydantic import BaseModel, Field from deerflow.config.agents_api_config import get_agents_api_config from deerflow.config.agents_config import AgentConfig, list_custom_agents, load_a...
bytedance/deer-flow
https://github.com/bytedance/deer-flow
null
null
null
null
64,601
null
null
mit
null
null
null
null
null
null
null
backend/app/gateway/routers/mcp.py
null
null
null
null
null
null
Python
2026-05-04T02:17:42.096683
import json import logging from pathlib import Path from typing import Literal from fastapi import APIRouter, HTTPException from pydantic import BaseModel, Field from deerflow.config.extensions_config import ExtensionsConfig, get_extensions_config, reload_extensions_config logger = logging.getLogger(__name__) router...
commaai/openpilot
https://github.com/commaai/openpilot
null
null
null
null
60,804
null
null
mit
null
null
null
null
null
null
null
cereal/messaging/tests/test_messaging.py
null
null
null
null
null
null
Python
2026-05-04T02:17:44.708169
import os import capnp import multiprocessing import numbers import random import threading import time from openpilot.common.parameterized import parameterized import pytest from cereal import log, car import cereal.messaging as messaging from cereal.services import SERVICE_LIST events = [evt for evt in log.Event.sc...
commaai/openpilot
https://github.com/commaai/openpilot
null
null
null
null
60,804
null
null
mit
null
null
null
null
null
null
null
common/api.py
null
null
null
null
null
null
Python
2026-05-04T02:17:44.709319
import jwt import os import requests from datetime import datetime, timedelta, UTC from openpilot.system.hardware.hw import Paths from openpilot.system.version import get_version API_HOST = os.getenv('API_HOST', 'https://api.commadotai.com') # name: jwt signature algorithm KEYS = {"id_rsa": "RS256", "id_ecdsa...
commaai/openpilot
https://github.com/commaai/openpilot
null
null
null
null
60,804
null
null
mit
null
null
null
null
null
null
null
cereal/messaging/tests/test_services.py
null
null
null
null
null
null
Python
2026-05-04T02:17:44.719855
import os import tempfile from typing import Dict from openpilot.common.parameterized import parameterized import cereal.services as services from cereal.services import SERVICE_LIST class TestServices: @parameterized.expand(SERVICE_LIST.keys()) def test_services(self, s): service = SERVICE_LIST[s] asse...
commaai/openpilot
https://github.com/commaai/openpilot
null
null
null
null
60,804
null
null
mit
null
null
null
null
null
null
null
common/basedir.py
null
null
null
null
null
null
Python
2026-05-04T02:17:44.720382
import os BASEDIR = os.path.abspath(os.path.join(os.path.dirname(os.path.realpath(__file__)), "../"))
commaai/openpilot
https://github.com/commaai/openpilot
null
null
null
null
60,804
null
null
mit
null
null
null
null
null
null
null
cereal/messaging/tests/test_pub_sub_master.py
null
null
null
null
null
null
Python
2026-05-04T02:17:44.724297
import random import time from typing import Sized, cast import cereal.messaging as messaging from cereal.messaging.tests.test_messaging import events, random_sock, random_socks, \ random_bytes, random_carstate, assert_carstate, \ ...
commaai/openpilot
https://github.com/commaai/openpilot
null
null
null
null
60,804
null
null
mit
null
null
null
null
null
null
null
cereal/messaging/__init__.py
null
null
null
null
null
null
Python
2026-05-04T02:17:44.741297
# must be built with scons from msgq import fake_event_handle, drain_sock_raw, MultiplePublishersError, IpcError, \ Context, Poller, SubSocket, PubSocket, SocketEventHandle, toggle_fake_events, \ set_fake_prefix, get_fake_prefix, delete_fake_prefix, wait_for_one_event import msgq impor...
commaai/openpilot
https://github.com/commaai/openpilot
null
null
null
null
60,804
null
null
mit
null
null
null
null
null
null
null
cereal/services.py
null
null
null
null
null
null
Python
2026-05-04T02:17:44.775098
#!/usr/bin/env python3 from enum import IntEnum from typing import Optional # TODO: this should be automatically determined using the capnp schema class QueueSize(IntEnum): BIG = 10 * 1024 * 1024 # 10MB - video frames, large AI outputs MEDIUM = 2 * 1024 * 1024 # 2MB - high freq (CAN), livestream SMALL =...
commaai/openpilot
https://github.com/commaai/openpilot
null
null
null
null
60,804
null
null
mit
null
null
null
null
null
null
null
cereal/__init__.py
null
null
null
null
null
null
Python
2026-05-04T02:17:44.838684
import os import capnp from importlib.resources import as_file, files capnp.remove_import_hook() with as_file(files("cereal")) as fspath: CEREAL_PATH = fspath.as_posix() log = capnp.load(os.path.join(CEREAL_PATH, "log.capnp")) car = capnp.load(os.path.join(CEREAL_PATH, "car.capnp")) custom = capnp.load(os.pat...
commaai/openpilot
https://github.com/commaai/openpilot
null
null
null
null
60,804
null
null
mit
null
null
null
null
null
null
null
common/constants.py
null
null
null
null
null
null
Python
2026-05-04T02:17:45.315141
import numpy as np # conversions class CV: # Speed MPH_TO_KPH = 1.609344 KPH_TO_MPH = 1. / MPH_TO_KPH MS_TO_KPH = 3.6 KPH_TO_MS = 1. / MS_TO_KPH MS_TO_MPH = MS_TO_KPH * KPH_TO_MPH MPH_TO_MS = MPH_TO_KPH * KPH_TO_MS MS_TO_KNOTS = 1.9438 KNOTS_TO_MS = 1. / MS_TO_KNOTS # Angle DEG_TO_RAD = np.pi / ...
commaai/openpilot
https://github.com/commaai/openpilot
null
null
null
null
60,804
null
null
mit
null
null
null
null
null
null
null
common/gps.py
null
null
null
null
null
null
Python
2026-05-04T02:17:45.316691
from openpilot.common.params import Params def get_gps_location_service(params: Params) -> str: if params.get_bool("UbloxAvailable"): return "gpsLocationExternal" else: return "gpsLocation"
commaai/openpilot
https://github.com/commaai/openpilot
null
null
null
null
60,804
null
null
mit
null
null
null
null
null
null
null
common/git.py
null
null
null
null
null
null
Python
2026-05-04T02:17:45.339863
from functools import cache import subprocess from openpilot.common.utils import run_cmd, run_cmd_default @cache def get_commit(cwd: str | None = None, branch: str = "HEAD") -> str: return run_cmd_default(["git", "rev-parse", branch], cwd=cwd) @cache def get_commit_date(cwd: str | None = None, commit: str = "HEAD...
commaai/openpilot
https://github.com/commaai/openpilot
null
null
null
null
60,804
null
null
mit
null
null
null
null
null
null
null
common/filter_simple.py
null
null
null
null
null
null
Python
2026-05-04T02:17:45.387067
class FirstOrderFilter: def __init__(self, x0, rc, dt, initialized=True): self.x = x0 self.dt = dt self.update_alpha(rc) self.initialized = initialized def update_alpha(self, rc): self.alpha = self.dt / (rc + self.dt) def update(self, x): if self.initialized: self.x = (1. - self.al...
commaai/openpilot
https://github.com/commaai/openpilot
null
null
null
null
60,804
null
null
mit
null
null
null
null
null
null
null
common/file_chunker.py
null
null
null
null
null
null
Python
2026-05-04T02:17:45.390655
import math import os from pathlib import Path CHUNK_SIZE = 45 * 1024 * 1024 # 45MB, under GitHub's 50MB limit def get_chunk_name(name, idx, num_chunks): return f"{name}.chunk{idx+1:02d}of{num_chunks:02d}" def get_manifest_path(name): return f"{name}.chunkmanifest" def get_chunk_paths(path, file_size): num_c...
commaai/openpilot
https://github.com/commaai/openpilot
null
null
null
null
60,804
null
null
mit
null
null
null
null
null
null
null
common/markdown.py
null
null
null
null
null
null
Python
2026-05-04T02:17:45.397544
HTML_REPLACEMENTS = [ (r'&', r'&'), (r'"', r'"'), ] def parse_markdown(text: str, tab_length: int = 2) -> str: lines = text.split("\n") output: list[str] = [] list_level = 0 def end_outstanding_lists(level: int, end_level: int) -> int: while level > end_level: level -= 1 output.ap...
commaai/openpilot
https://github.com/commaai/openpilot
null
null
null
null
60,804
null
null
mit
null
null
null
null
null
null
null
common/logging_extra.py
null
null
null
null
null
null
Python
2026-05-04T02:17:45.413903
import io import os import sys import copy import json import time import uuid import socket import logging import traceback import numpy as np from threading import local from collections import OrderedDict from contextlib import contextmanager LOG_TIMESTAMPS = "LOG_TIMESTAMPS" in os.environ def json_handler(obj): ...
commaai/openpilot
https://github.com/commaai/openpilot
null
null
null
null
60,804
null
null
mit
null
null
null
null
null
null
null
common/i2c.py
null
null
null
null
null
null
Python
2026-05-04T02:17:45.417897
import os import fcntl import ctypes # I2C constants from /usr/include/linux/i2c-dev.h I2C_SLAVE = 0x0703 I2C_SLAVE_FORCE = 0x0706 I2C_SMBUS = 0x0720 # SMBus transfer types I2C_SMBUS_READ = 1 I2C_SMBUS_WRITE = 0 I2C_SMBUS_BYTE_DATA = 2 I2C_SMBUS_I2C_BLOCK_DATA = 8 I2C_SMBUS_BLOCK_MAX = 32 class _I2cSmbusData(ctype...
commaai/openpilot
https://github.com/commaai/openpilot
null
null
null
null
60,804
null
null
mit
null
null
null
null
null
null
null
common/gpio.py
null
null
null
null
null
null
Python
2026-05-04T02:17:45.419036
import os import fcntl import ctypes from functools import cache def gpio_init(pin: int, output: bool) -> None: try: with open(f"/sys/class/gpio/gpio{pin}/direction", 'wb') as f: f.write(b"out" if output else b"in") except Exception as e: print(f"Failed to set gpio {pin} direction: {e}") def gpio_se...
commaai/openpilot
https://github.com/commaai/openpilot
null
null
null
null
60,804
null
null
mit
null
null
null
null
null
null
null
common/mock/__init__.py
null
null
null
null
null
null
Python
2026-05-04T02:17:45.521562
""" Utilities for generating mock messages for testing. example in common/tests/test_mock.py """ import functools import threading from cereal.messaging import PubMaster from cereal.services import SERVICE_LIST from openpilot.common.mock.generators import generate_livePose from openpilot.common.realtime import Rateke...
commaai/openpilot
https://github.com/commaai/openpilot
null
null
null
null
60,804
null
null
mit
null
null
null
null
null
null
null
common/parameterized.py
null
null
null
null
null
null
Python
2026-05-04T02:17:46.200310
import sys import pytest import inspect class parameterized: @staticmethod def expand(cases): cases = list(cases) if not cases: return lambda func: pytest.mark.skip("no parameterized cases")(func) def decorator(func): params = [p for p in inspect.signature(func).parameters if p != 'self'...
commaai/openpilot
https://github.com/commaai/openpilot
null
null
null
null
60,804
null
null
mit
null
null
null
null
null
null
null
common/pid.py
null
null
null
null
null
null
Python
2026-05-04T02:17:46.201547
import numpy as np from numbers import Number class PIDController: def __init__(self, k_p, k_i, k_d=0., pos_limit=1e308, neg_limit=-1e308, rate=100): self._k_p: list[list[float]] = [[0], [k_p]] if isinstance(k_p, Number) else k_p self._k_i: list[list[float]] = [[0], [k_i]] if isinstance(k_i, Number) else k_i...
commaai/openpilot
https://github.com/commaai/openpilot
null
null
null
null
60,804
null
null
mit
null
null
null
null
null
null
null
common/params.py
null
null
null
null
null
null
Python
2026-05-04T02:17:46.203003
from openpilot.common.params_pyx import Params, ParamKeyFlag, ParamKeyType, UnknownKeyName assert Params assert ParamKeyFlag assert ParamKeyType assert UnknownKeyName if __name__ == "__main__": import sys params = Params() key = sys.argv[1] assert params.check_key(key), f"unknown param: {key}" if len(sys.a...
commaai/openpilot
https://github.com/commaai/openpilot
null
null
null
null
60,804
null
null
mit
null
null
null
null
null
null
null
common/prefix.py
null
null
null
null
null
null
Python
2026-05-04T02:17:46.224820
import os import platform import shutil import uuid from openpilot.common.params import Params from openpilot.system.hardware import PC from openpilot.system.hardware.hw import Paths from openpilot.system.hardware.hw import DEFAULT_DOWNLOAD_CACHE_ROOT class OpenpilotPrefix: def __init__(self, prefix: str | None = ...
commaai/openpilot
https://github.com/commaai/openpilot
null
null
null
null
60,804
null
null
mit
null
null
null
null
null
null
null
common/realtime.py
null
null
null
null
null
null
Python
2026-05-04T02:17:46.254423
"""Utilities for reading real time clocks and keeping soft real time constraints.""" import gc import os import sys import time from setproctitle import getproctitle from openpilot.common.utils import MovingAverage from openpilot.system.hardware import PC # time step for each process DT_CTRL = 0.01 # controlsd DT_...
commaai/openpilot
https://github.com/commaai/openpilot
null
null
null
null
60,804
null
null
mit
null
null
null
null
null
null
null
common/mock/generators.py
null
null
null
null
null
null
Python
2026-05-04T02:17:46.734935
from cereal import messaging def generate_livePose(): msg = messaging.new_message('livePose') meas = {'x': 0.0, 'y': 0.0, 'z': 0.0, 'xStd': 0.0, 'yStd': 0.0, 'zStd': 0.0, 'valid': True} msg.livePose.orientationNED = meas msg.livePose.velocityDevice = meas msg.livePose.angularVelocityDevice = meas msg.live...
commaai/openpilot
https://github.com/commaai/openpilot
null
null
null
null
60,804
null
null
mit
null
null
null
null
null
null
null
common/tests/test_markdown.py
null
null
null
null
null
null
Python
2026-05-04T02:17:46.754003
import os from openpilot.common.basedir import BASEDIR from openpilot.common.markdown import parse_markdown class TestMarkdown: def test_all_release_notes(self): with open(os.path.join(BASEDIR, "RELEASES.md")) as f: release_notes = f.read().split("\n\n") assert len(release_notes) > 10 for rn...
commaai/openpilot
https://github.com/commaai/openpilot
null
null
null
null
60,804
null
null
mit
null
null
null
null
null
null
null
common/tests/test_file_helpers.py
null
null
null
null
null
null
Python
2026-05-04T02:17:46.779396
import os from uuid import uuid4 from openpilot.common.utils import atomic_write class TestFileHelpers: def run_atomic_write_func(self, atomic_write_func): path = f"/tmp/tmp{uuid4()}" with atomic_write_func(path) as f: f.write("test") assert not os.path.exists(path) with open(path) as f: ...
commaai/openpilot
https://github.com/commaai/openpilot
null
null
null
null
60,804
null
null
mit
null
null
null
null
null
null
null
common/tests/test_params.py
null
null
null
null
null
null
Python
2026-05-04T02:17:46.795800
import pytest import datetime import os import threading import time import uuid from openpilot.common.params import Params, ParamKeyFlag, UnknownKeyName class TestParams: def setup_method(self): self.params = Params() def test_params_put_and_get(self): self.params.put("DongleId", "cb38263377b873ee") ...
commaai/openpilot
https://github.com/commaai/openpilot
null
null
null
null
60,804
null
null
mit
null
null
null
null
null
null
null
common/simple_kalman.py
null
null
null
null
null
null
Python
2026-05-04T02:17:47.288275
import numpy as np def get_kalman_gain(dt, A, C, Q, R, iterations=100): P = np.zeros_like(Q) for _ in range(iterations): P = A.dot(P).dot(A.T) + dt * Q S = C.dot(P).dot(C.T) + R K = P.dot(C.T).dot(np.linalg.inv(S)) P = (np.eye(len(P)) - K.dot(C)).dot(P) return K class KF1D: # this EKF assume...
commaai/openpilot
https://github.com/commaai/openpilot
null
null
null
null
60,804
null
null
mit
null
null
null
null
null
null
null
common/stat_live.py
null
null
null
null
null
null
Python
2026-05-04T02:17:47.288810
import numpy as np class RunningStat: # tracks realtime mean and standard deviation without storing any data def __init__(self, priors=None, max_trackable=-1): self.max_trackable = max_trackable if priors is not None: # initialize from history self.M = priors[0] self.S = priors[1] s...
commaai/openpilot
https://github.com/commaai/openpilot
null
null
null
null
60,804
null
null
mit
null
null
null
null
null
null
null
common/spinner.py
null
null
null
null
null
null
Python
2026-05-04T02:17:47.290300
import os import subprocess from openpilot.common.basedir import BASEDIR class Spinner: def __init__(self): try: self.spinner_proc = subprocess.Popen(["./spinner.py"], stdin=subprocess.PIPE, cwd=os.path.join(BASEDIR, "sy...
commaai/openpilot
https://github.com/commaai/openpilot
null
null
null
null
60,804
null
null
mit
null
null
null
null
null
null
null
common/tests/test_simple_kalman.py
null
null
null
null
null
null
Python
2026-05-04T02:17:47.617422
from openpilot.common.simple_kalman import KF1D class TestSimpleKalman: def setup_method(self): dt = 0.01 x0_0 = 0.0 x1_0 = 0.0 A0_0 = 1.0 A0_1 = dt A1_0 = 0.0 A1_1 = 1.0 C0_0 = 1.0 C0_1 = 0.0 K0_0 = 0.12287673 K1_0 = 0.29666309 self.kf = KF1D(x0=[[x0_0], [x1_0]], ...
commaai/openpilot
https://github.com/commaai/openpilot
null
null
null
null
60,804
null
null
mit
null
null
null
null
null
null
null
common/text_window.py
null
null
null
null
null
null
Python
2026-05-04T02:17:47.712465
#!/usr/bin/env python3 import os import time import subprocess from openpilot.common.basedir import BASEDIR class TextWindow: def __init__(self, text): try: self.text_proc = subprocess.Popen(["./text.py", text], stdin=subprocess.PIPE, ...
commaai/openpilot
https://github.com/commaai/openpilot
null
null
null
null
60,804
null
null
mit
null
null
null
null
null
null
null
common/transformations/model.py
null
null
null
null
null
null
Python
2026-05-04T02:17:47.874397
import numpy as np from openpilot.common.transformations.orientation import rot_from_euler from openpilot.common.transformations.camera import get_view_frame_from_calib_frame, view_frame_from_device_frame, _ar_ox_fisheye # segnet SEGNET_SIZE = (512, 384) # MED model MEDMODEL_INPUT_SIZE = (512, 256) MEDMODEL_YUV_SIZE...
commaai/openpilot
https://github.com/commaai/openpilot
null
null
null
null
60,804
null
null
mit
null
null
null
null
null
null
null
common/transformations/orientation.py
null
null
null
null
null
null
Python
2026-05-04T02:17:47.891228
import numpy as np from collections.abc import Callable from openpilot.common.transformations.transformations import (ecef_euler_from_ned_single, euler2quat_single, euler2rot_single, ...
commaai/openpilot
https://github.com/commaai/openpilot
null
null
null
null
60,804
null
null
mit
null
null
null
null
null
null
null
common/transformations/coordinates.py
null
null
null
null
null
null
Python
2026-05-04T02:17:47.955887
from openpilot.common.transformations.orientation import numpy_wrap from openpilot.common.transformations.transformations import (ecef2geodetic_single, geodetic2ecef_single) from openpilot.common.transformations.transformations import LocalCoord as LocalCoord_single ...
commaai/openpilot
https://github.com/commaai/openpilot
null
null
null
null
60,804
null
null
mit
null
null
null
null
null
null
null
common/transformations/tests/test_coordinates.py
null
null
null
null
null
null
Python
2026-05-04T02:17:48.353872
import numpy as np import openpilot.common.transformations.coordinates as coord geodetic_positions = np.array([[37.7610403, -122.4778699, 115], [27.4840915, -68.5867592, 2380], [32.4916858, -113.652821, -6], [15.1392514...
commaai/openpilot
https://github.com/commaai/openpilot
null
null
null
null
60,804
null
null
mit
null
null
null
null
null
null
null
common/transformations/transformations.py
null
null
null
null
null
null
Python
2026-05-04T02:17:48.445128
import numpy as np # Constants a = 6378137.0 b = 6356752.3142 esq = 6.69437999014e-3 e1sq = 6.73949674228e-3 def geodetic2ecef_single(g): """ Convert geodetic coordinates (latitude, longitude, altitude) to ECEF. """ try: if len(g) != 3: raise ValueError("Geodetic must be size 3") except TypeErro...
commaai/openpilot
https://github.com/commaai/openpilot
null
null
null
null
60,804
null
null
mit
null
null
null
null
null
null
null
common/transformations/tests/test_orientation.py
null
null
null
null
null
null
Python
2026-05-04T02:17:48.501374
import numpy as np import pytest from openpilot.common.transformations.orientation import euler2quat, quat2euler, euler2rot, rot2euler, \ rot2quat, quat2rot, \ ned_euler_from_ecef eulers = np.array([[ 1.46520501, 2.78688383...
commaai/openpilot
https://github.com/commaai/openpilot
null
null
null
null
60,804
null
null
mit
null
null
null
null
null
null
null
common/utils.py
null
null
null
null
null
null
Python
2026-05-04T02:17:48.548183
import io import os import tempfile import contextlib import subprocess import time import functools from subprocess import Popen, PIPE, TimeoutExpired import zstandard as zstd LOG_COMPRESSION_LEVEL = 10 # little benefit up to level 15. level ~17 is a small step change class Timer: """Simple lap timer for profilin...
commaai/openpilot
https://github.com/commaai/openpilot
null
null
null
null
60,804
null
null
mit
null
null
null
null
null
null
null
conftest.py
null
null
null
null
null
null
Python
2026-05-04T02:17:48.827376
import contextlib import gc import os import pytest from openpilot.common.prefix import OpenpilotPrefix from openpilot.system.manager import manager from openpilot.system.hardware import TICI, HARDWARE # TODO: pytest-cpp doesn't support FAIL, and we need to create test translations in sessionstart # pending https://g...
commaai/openpilot
https://github.com/commaai/openpilot
null
null
null
null
60,804
null
null
mit
null
null
null
null
null
null
null
docs/ext/glossary.py
null
null
null
null
null
null
Python
2026-05-04T02:17:48.968048
import posixpath import re import tomllib import xml.etree.ElementTree as ET from pathlib import Path from markdown.extensions import Extension from markdown.preprocessors import Preprocessor from markdown.treeprocessors import Treeprocessor from zensical.extensions.links import LinksTreeprocessor GlossaryTerm = tup...
commaai/openpilot
https://github.com/commaai/openpilot
null
null
null
null
60,804
null
null
mit
null
null
null
null
null
null
null
common/swaglog.py
null
null
null
null
null
null
Python
2026-05-04T02:17:51.529116
import logging import os import time import warnings from pathlib import Path from logging.handlers import BaseRotatingHandler import zmq from openpilot.common.logging_extra import SwagLogger, SwagFormatter, SwagLogFileFormatter from openpilot.system.hardware.hw import Paths def get_file_handler(): Path(Paths.swa...
commaai/openpilot
https://github.com/commaai/openpilot
null
null
null
null
60,804
null
null
mit
null
null
null
null
null
null
null
common/timeout.py
null
null
null
null
null
null
Python
2026-05-04T02:17:52.313219
import signal class TimeoutException(Exception): pass class Timeout: """ Timeout context manager. For example this code will raise a TimeoutException: with Timeout(seconds=5, error_msg="Sleep was too long"): time.sleep(10) """ def __init__(self, seconds, error_msg=None): if error_msg is None: ...
commaai/openpilot
https://github.com/commaai/openpilot
null
null
null
null
60,804
null
null
mit
null
null
null
null
null
null
null
common/time_helpers.py
null
null
null
null
null
null
Python
2026-05-04T02:17:52.403939
import datetime from pathlib import Path MIN_DATE = datetime.datetime(year=2025, month=2, day=21) MAX_DATE = datetime.datetime(year=2035, month=1, day=1) def min_date(): # on systemd systems, the default time is the systemd build time systemd_path = Path("/lib/systemd/systemd") if systemd_path.exists(): d =...
commaai/openpilot
https://github.com/commaai/openpilot
null
null
null
null
60,804
null
null
mit
null
null
null
null
null
null
null
common/transformations/camera.py
null
null
null
null
null
null
Python
2026-05-04T02:17:52.514899
import itertools import numpy as np from dataclasses import dataclass import openpilot.common.transformations.orientation as orient ## -- hardcoded hardware params -- @dataclass(frozen=True) class CameraConfig: width: int height: int focal_length: float @property def size(self): return (self.width, sel...
docling-project/docling
https://github.com/docling-project/docling
null
null
null
null
59,076
null
null
mit
null
null
null
null
null
null
null
docling/backend/abstract_backend.py
null
null
null
null
null
null
Python
2026-05-04T02:17:56.090274
from abc import ABC, abstractmethod from io import BytesIO from pathlib import Path from typing import TYPE_CHECKING, Optional, Union from docling_core.types.doc import DoclingDocument from docling.datamodel.backend_options import ( BackendOptions, BaseBackendOptions, DeclarativeBackendOptions, ) if TYPE...
docling-project/docling
https://github.com/docling-project/docling
null
null
null
null
59,076
null
null
mit
null
null
null
null
null
null
null
.github/scripts/check_needs_results.py
null
null
null
null
null
null
Python
2026-05-04T02:17:56.092157
from __future__ import annotations import argparse import json from typing import Any SUCCESS = "success" SKIPPED = "skipped" def parse_allowed_skips(raw_allowed_skips: str) -> set[str]: return {job for job in raw_allowed_skips.split() if job} def parse_needs(raw_needs: str) -> dict[str, Any]: loaded = js...
docling-project/docling
https://github.com/docling-project/docling
null
null
null
null
59,076
null
null
mit
null
null
null
null
null
null
null
.github/scripts/pytest_marker_selection.py
null
null
null
null
null
null
Python
2026-05-04T02:17:56.099322
from __future__ import annotations import argparse import ast import json import os from pathlib import Path ML_MARKERS = ("ml_ocr", "ml_pdf_model", "ml_vlm", "ml_asr") CROSS_PLATFORM_MARKER = "cross_platform" CI_FILE_MARKERS = (*ML_MARKERS, CROSS_PLATFORM_MARKER) SUITE_MARKERS = { "ocr": "ml_ocr", "pdf-model...
docling-project/docling
https://github.com/docling-project/docling
null
null
null
null
59,076
null
null
mit
null
null
null
null
null
null
null
docling/backend/csv_backend.py
null
null
null
null
null
null
Python
2026-05-04T02:17:56.100936
import csv import logging import warnings from io import BytesIO, StringIO from pathlib import Path from typing import Set, Union from docling_core.types.doc import DoclingDocument, DocumentOrigin, TableCell, TableData from docling.backend.abstract_backend import DeclarativeDocumentBackend from docling.datamodel.base...
docling-project/docling
https://github.com/docling-project/docling
null
null
null
null
59,076
null
null
mit
null
null
null
null
null
null
null
docling/backend/asciidoc_backend.py
null
null
null
null
null
null
Python
2026-05-04T02:17:56.101843
import logging import re from io import BytesIO from pathlib import Path from typing import Final, Union from docling_core.types.doc import ( DocItemLabel, DoclingDocument, DocumentOrigin, GroupItem, GroupLabel, ImageRef, Size, TableCell, TableData, ) from docling.backend.abstract_...
docling-project/docling
https://github.com/docling-project/docling
null
null
null
null
59,076
null
null
mit
null
null
null
null
null
null
null
.github/scripts/run_selected_examples.py
null
null
null
null
null
null
Python
2026-05-04T02:17:56.132672
#!/usr/bin/env python3 """Run a filtered set of example scripts from docs/examples.""" from __future__ import annotations import argparse import json import re import subprocess import time from pathlib import Path def parse_args() -> argparse.Namespace: parser = argparse.ArgumentParser( description="Ru...
docling-project/docling
https://github.com/docling-project/docling
null
null
null
null
59,076
null
null
mit
null
null
null
null
null
null
null
docling/backend/docling_parse_backend.py
null
null
null
null
null
null
Python
2026-05-04T02:17:56.144221
import logging from collections.abc import Iterable from io import BytesIO from pathlib import Path from typing import TYPE_CHECKING, Optional, Union import pypdfium2 as pdfium from docling_core.types.doc import BoundingBox, CoordOrigin from docling_core.types.doc.page import SegmentedPdfPage, TextCell from docling_pa...
docling-project/docling
https://github.com/docling-project/docling
null
null
null
null
59,076
null
null
mit
null
null
null
null
null
null
null
.github/scripts/run_pr_fast_checks.py
null
null
null
null
null
null
Python
2026-05-04T02:17:56.181218
from __future__ import annotations import argparse import os import shutil import subprocess import sys import time from dataclasses import dataclass from pathlib import Path RUFF_DIRECTORIES = ("docling", "tests", "docs/examples", ".github/scripts") MYPY_DIRECTORIES = ("docling", ".github/scripts") TOOLING_SMOKE_TRI...
docling-project/docling
https://github.com/docling-project/docling
null
null
null
null
59,076
null
null
mit
null
null
null
null
null
null
null
docling/backend/docling_parse_v2_backend.py
null
null
null
null
null
null
Python
2026-05-04T02:17:56.657709
import warnings from io import BytesIO from pathlib import Path from typing import TYPE_CHECKING, Optional, Union from docling.backend.docling_parse_backend import DoclingParseDocumentBackend from docling.datamodel.backend_options import PdfBackendOptions if TYPE_CHECKING: from docling.datamodel.document import I...
docling-project/docling
https://github.com/docling-project/docling
null
null
null
null
59,076
null
null
mit
null
null
null
null
null
null
null
docling/backend/docling_parse_v4_backend.py
null
null
null
null
null
null
Python
2026-05-04T02:17:56.690038
import warnings from io import BytesIO from pathlib import Path from typing import TYPE_CHECKING, Optional, Union from docling.backend.docling_parse_backend import DoclingParseDocumentBackend from docling.datamodel.backend_options import PdfBackendOptions if TYPE_CHECKING: from docling.datamodel.document import I...
docling-project/docling
https://github.com/docling-project/docling
null
null
null
null
59,076
null
null
mit
null
null
null
null
null
null
null
docling/backend/docx/drawingml/utils.py
null
null
null
null
null
null
Python
2026-05-04T02:17:56.692865
import os import shutil import subprocess from pathlib import Path from tempfile import mkdtemp from typing import Callable, Optional import pypdfium2 from docx.document import Document from PIL import Image, ImageChops def get_libreoffice_cmd(raise_if_unavailable: bool = False) -> Optional[str]: """Return the l...
docling-project/docling
https://github.com/docling-project/docling
null
null
null
null
59,076
null
null
mit
null
null
null
null
null
null
null
docling/backend/docx/latex/omml.py
null
null
null
null
null
null
Python
2026-05-04T02:17:56.714126
""" Office Math Markup Language (OMML) Adapted from https://github.com/xiilei/dwml/blob/master/dwml/omml.py On 23/01/2025 """ import logging import lxml.etree as ET from pylatexenc.latexencode import UnicodeToLatexEncoder from docling.backend.docx.latex.latex_dict import ( ALN, ARR, BACKSLASH, BLANK...
docling-project/docling
https://github.com/docling-project/docling
null
null
null
null
59,076
null
null
mit
null
null
null
null
null
null
null
docling/backend/docx/latex/latex_dict.py
null
null
null
null
null
null
Python
2026-05-04T02:17:56.745881
""" Adapted from https://github.com/xiilei/dwml/blob/master/dwml/latex_dict.py On 23/01/2025 """ CHARS = ("{", "}", "_", "^", "#", "&", "$", "%", "~") BLANK = "" BACKSLASH = "\\" ALN = "&" CHR = { # Unicode : Latex Math Symbols # Top accents "\u0300": "\\grave{{{0}}}", "\u0301": "\\acute{{{0}}}", ...
docling-project/docling
https://github.com/docling-project/docling
null
null
null
null
59,076
null
null
mit
null
null
null
null
null
null
null
docling/backend/image_backend.py
null
null
null
null
null
null
Python
2026-05-04T02:17:56.750663
import logging from io import BytesIO from pathlib import Path from typing import Iterable, List, Optional, Union from docling_core.types.doc import BoundingBox, CoordOrigin from docling_core.types.doc.page import ( BoundingRectangle, PdfPageBoundaryType, PdfPageGeometry, SegmentedPdfPage, TextCell...
docling-project/docling
https://github.com/docling-project/docling
null
null
null
null
59,076
null
null
mit
null
null
null
null
null
null
null
docling/backend/json/docling_json_backend.py
null
null
null
null
null
null
Python
2026-05-04T02:17:56.807881
from io import BytesIO from pathlib import Path from typing import Union from docling_core.types.doc import DoclingDocument from typing_extensions import override from docling.backend.abstract_backend import DeclarativeDocumentBackend from docling.datamodel.base_models import InputFormat from docling.datamodel.docume...
docling-project/docling
https://github.com/docling-project/docling
null
null
null
null
59,076
null
null
mit
null
null
null
null
null
null
null
docling/backend/latex/backend.py
null
null
null
null
null
null
Python
2026-05-04T02:17:57.605014
import logging import threading from io import BytesIO from pathlib import Path from typing import Optional, Union from docling_core.types.doc import DocItemLabel, DoclingDocument, NodeItem from docling_core.types.doc.document import Formatting from pylatexenc.latexwalker import ( LatexCharsNode, LatexEnvironm...
docling-project/docling
https://github.com/docling-project/docling
null
null
null
null
59,076
null
null
mit
null
null
null
null
null
null
null
docling/backend/latex/constants.py
null
null
null
null
null
null
Python
2026-05-04T02:17:57.635201
MACROS_NEWCOMMAND = frozenset(["newcommand", "renewcommand", "providecommand"]) MACROS_PREAMBLE_METADATA = frozenset(["title", "author", "date"]) MACROS_INLINE_VERBATIM = frozenset(["%", "$", "&", "#", "_", "{", "}", "~"]) MACROS_TEXT_FORMATTING = frozenset(["textbf", "textit", "emph", "texttt", "underline"]) MACRO...
docling-project/docling
https://github.com/docling-project/docling
null
null
null
null
59,076
null
null
mit
null
null
null
null
null
null
null
docling/backend/latex/context.py
null
null
null
null
null
null
Python
2026-05-04T02:17:57.636414
from dataclasses import dataclass from typing import Optional from docling_core.types.doc.document import ( DocItemLabel, DoclingDocument, Formatting, NodeItem, ) @dataclass class ParseContext: doc: DoclingDocument parent: NodeItem | None = None formatting: Formatting | None = None te...
docling-project/docling
https://github.com/docling-project/docling
null
null
null
null
59,076
null
null
mit
null
null
null
null
null
null
null
docling/backend/latex/handlers/environments.py
null
null
null
null
null
null
Python
2026-05-04T02:17:57.691733
import logging import re from typing import TYPE_CHECKING, Optional if TYPE_CHECKING: from typing import Any from docling_core.types.doc import CodeLanguageLabel from docling_core.types.doc.document import ( CodeMetaField, DocItemLabel, DoclingDocument, Formatting, GroupLabel, NodeItem, ...
docling-project/docling
https://github.com/docling-project/docling
null
null
null
null
59,076
null
null
mit
null
null
null
null
null
null
null
docling/backend/latex/engines/base.py
null
null
null
null
null
null
Python
2026-05-04T02:17:57.943680
from abc import ABC, abstractmethod class RenderEngine(ABC): @abstractmethod def is_available(self) -> bool: pass @abstractmethod def render(self, *args, **kwargs): pass
docling-project/docling
https://github.com/docling-project/docling
null
null
null
null
59,076
null
null
mit
null
null
null
null
null
null
null
docling/backend/latex/libraries/base.py
null
null
null
null
null
null
Python
2026-05-04T02:17:58.200665
from abc import ABC, abstractmethod from typing import FrozenSet class LibraryHandler(ABC): @property @abstractmethod def environments(self) -> FrozenSet[str]: pass @property @abstractmethod def macros(self) -> FrozenSet[str]: pass @abstractmethod def handle_environme...
docling-project/docling
https://github.com/docling-project/docling
null
null
null
null
59,076
null
null
mit
null
null
null
null
null
null
null
docling/backend/latex/utils/encoding.py
null
null
null
null
null
null
Python
2026-05-04T02:17:58.301438
import logging from io import BytesIO from pathlib import Path from typing import Union _log = logging.getLogger(__name__) def decode_latex_content(path_or_stream: Union[BytesIO, Path]) -> str: latex_text = "" if isinstance(path_or_stream, BytesIO): raw_bytes = path_or_stream.getvalue() for ...
docling-project/docling
https://github.com/docling-project/docling
null
null
null
null
59,076
null
null
mit
null
null
null
null
null
null
null
docling/backend/latex/handlers/math.py
null
null
null
null
null
null
Python
2026-05-04T02:17:58.470630
import re from typing import TYPE_CHECKING, Callable, List, Optional if TYPE_CHECKING: from typing import Any from docling_core.types.doc.document import DocItemLabel, DoclingDocument, NodeItem from pylatexenc.latexwalker import LatexMathNode from docling.backend.latex.constants import ENV_MATH_CLEAN, ENV_MATH_D...
docling-project/docling
https://github.com/docling-project/docling
null
null
null
null
59,076
null
null
mit
null
null
null
null
null
null
null
docling/backend/latex/utils/text.py
null
null
null
null
null
null
Python
2026-05-04T02:17:58.513009
import re from typing import TYPE_CHECKING, Callable, List, Optional if TYPE_CHECKING: from typing import Any from docling_core.types.doc.document import ( DocItemLabel, DoclingDocument, Formatting, NodeItem, ) from pylatexenc.latexwalker import ( LatexCharsNode, LatexEnvironmentNode, ...
docling-project/docling
https://github.com/docling-project/docling
null
null
null
null
59,076
null
null
mit
null
null
null
null
null
null
null
docling/backend/latex/utils/table.py
null
null
null
null
null
null
Python
2026-05-04T02:17:58.543898
from typing import TYPE_CHECKING, Callable, List, Optional if TYPE_CHECKING: from typing import Any from docling_core.types.doc.document import TableCell, TableData from pylatexenc.latexwalker import ( LatexCharsNode, LatexEnvironmentNode, LatexMacroNode, LatexWalker, LatexWalkerParseError, ) ...
docling-project/docling
https://github.com/docling-project/docling
null
null
null
null
59,076
null
null
mit
null
null
null
null
null
null
null
docling/backend/latex/handlers/macros.py
null
null
null
null
null
null
Python
2026-05-04T02:17:58.600187
import logging import re from pathlib import Path from typing import TYPE_CHECKING, Callable if TYPE_CHECKING: from io import BytesIO from pathlib import Path from typing import Any import pypdfium2 from docling_core.types.doc.document import ( DocItemLabel, DoclingDocument, Formatting, Im...
docling-project/docling
https://github.com/docling-project/docling
null
null
null
null
59,076
null
null
mit
null
null
null
null
null
null
null
docling/backend/md_backend.py
null
null
null
null
null
null
Python
2026-05-04T02:17:58.759338
import logging import re import warnings from copy import deepcopy from enum import Enum from html import unescape from io import BytesIO from pathlib import Path from typing import Literal, Optional, Union, cast import marko import marko.element import marko.inline from docling_core.types.doc import ( DocItemLabe...
docling-project/docling
https://github.com/docling-project/docling
null
null
null
null
59,076
null
null
mit
null
null
null
null
null
null
null
docling/backend/managed_pdfium_backend.py
null
null
null
null
null
null
Python
2026-05-04T02:17:58.787321
from __future__ import annotations from abc import ABC, abstractmethod from io import BytesIO from pathlib import Path from typing import TYPE_CHECKING, Optional, Union from docling.backend.pdf_backend import PdfDocumentBackend, PdfPageBackend from docling.datamodel.backend_options import PdfBackendOptions if TYPE_C...
docling-project/docling
https://github.com/docling-project/docling
null
null
null
null
59,076
null
null
mit
null
null
null
null
null
null
null
docling/backend/mets_gbs_backend.py
null
null
null
null
null
null
Python
2026-05-04T02:17:58.823796
"""Backend for GBS Google Books schema.""" import logging import tarfile from collections.abc import Iterable from dataclasses import dataclass from enum import Enum from io import BytesIO from pathlib import Path from typing import TYPE_CHECKING, Dict, List, Optional, Set, Tuple, Union from docling_core.types.doc im...
docling-project/docling
https://github.com/docling-project/docling
null
null
null
null
59,076
null
null
mit
null
null
null
null
null
null
null
docling/backend/msexcel_backend.py
null
null
null
null
null
null
Python
2026-05-04T02:17:58.880281
import collections import logging from io import BytesIO from pathlib import Path from typing import Annotated, Any, Optional, Union, cast from docling_core.types.doc import ( BoundingBox, ContentLayer, CoordOrigin, DocItem, DocItemLabel, DoclingDocument, DocumentOrigin, GroupLabel, ...
docling-project/docling
https://github.com/docling-project/docling
null
null
null
null
59,076
null
null
mit
null
null
null
null
null
null
null
docling/backend/mspowerpoint_backend.py
null
null
null
null
null
null
Python
2026-05-04T02:17:58.953654
import logging import warnings from io import BytesIO from pathlib import Path from typing import Optional, Union from docling_core.types.doc import ( BoundingBox, CoordOrigin, DocItemLabel, DoclingDocument, DocumentOrigin, GroupLabel, ImageRef, ProvenanceItem, Size, TableCell, ...
docling-project/docling
https://github.com/docling-project/docling
null
null
null
null
59,076
null
null
mit
null
null
null
null
null
null
null
docling/backend/msword_backend.py
null
null
null
null
null
null
Python
2026-05-04T02:17:59.066457
import logging import re import warnings from contextlib import contextmanager from copy import deepcopy from io import BytesIO from pathlib import Path from typing import Any, Callable, Final from urllib.parse import urlparse from docling_core.types.doc import ( ContentLayer, DocItem, DocItemLabel, Do...