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
TRI-ML/prismatic-vlms
https://github.com/TRI-ML/prismatic-vlms
null
null
null
null
975
null
null
mit
null
null
null
null
null
null
null
prismatic/models/materialize.py
null
null
null
null
null
null
Python
2026-05-04T01:37:16.765151
""" materialize.py Factory class for initializing Vision Backbones, LLM Backbones, and VLMs from a set registry; provides and exports individual functions for clear control flow. """ from typing import Optional, Tuple from transformers import PreTrainedTokenizerBase from prismatic.models.backbones.llm import LLaMa2...
TRI-ML/prismatic-vlms
https://github.com/TRI-ML/prismatic-vlms
null
null
null
null
975
null
null
mit
null
null
null
null
null
null
null
prismatic/models/load.py
null
null
null
null
null
null
Python
2026-05-04T01:37:16.767268
""" load.py Entry point for loading pretrained VLMs for inference; exposes functions for listing available models (with canonical IDs, mappings to paper experiments, and short descriptions), as well as for loading models (from disk or HF Hub). """ import json import os from pathlib import Path from typing import List...
TRI-ML/prismatic-vlms
https://github.com/TRI-ML/prismatic-vlms
null
null
null
null
975
null
null
mit
null
null
null
null
null
null
null
prismatic/models/backbones/vision/siglip_vit.py
null
null
null
null
null
null
Python
2026-05-04T01:37:16.768151
""" siglip_vit.py """ from prismatic.models.backbones.vision.base_vision import TimmViTBackbone # Registry =>> Supported SigLIP Vision Backbones (from TIMM) =>> Note:: Using SigLIP w/ Patch = 14 (but SO400M Arch) SIGLIP_VISION_BACKBONES = { "siglip-vit-b16-224px": "vit_base_patch16_siglip_224", "siglip-vit-b1...
TRI-ML/prismatic-vlms
https://github.com/TRI-ML/prismatic-vlms
null
null
null
null
975
null
null
mit
null
null
null
null
null
null
null
prismatic/models/registry.py
null
null
null
null
null
null
Python
2026-05-04T01:37:16.795999
""" registry.py Exhaustive list of pretrained VLMs (with full descriptions / links to corresponding names and sections of paper). """ # === Pretrained Model Registry === # fmt: off MODEL_REGISTRY = { # === LLaVa v1.5 Reproductions === "reproduction-llava-v15+7b": { "model_id": "reproduction-llava-v15+...
TRI-ML/prismatic-vlms
https://github.com/TRI-ML/prismatic-vlms
null
null
null
null
975
null
null
mit
null
null
null
null
null
null
null
prismatic/models/vlms/base_vlm.py
null
null
null
null
null
null
Python
2026-05-04T01:37:16.846804
""" base_vlm.py Abstract class definition of a Vision-Language Model (VLM), with full annotations of class methods, utility functions, and initialization logic. This is mostly to future-proof the codebase; while all our experiments instantiate from PrismaticVLM, theoretically, this base class should be general enough ...
TRI-ML/prismatic-vlms
https://github.com/TRI-ML/prismatic-vlms
null
null
null
null
975
null
null
mit
null
null
null
null
null
null
null
prismatic/preprocessing/materialize.py
null
null
null
null
null
null
Python
2026-05-04T01:37:17.740988
""" materialize.py Factory class for initializing pretraining datasets on a per-VLM basis; provides and exports individual functions for clear control flow. """ from typing import Tuple, Type from torch.utils.data import Dataset from transformers import PreTrainedTokenizerBase from prismatic.conf import DatasetConf...
TRI-ML/prismatic-vlms
https://github.com/TRI-ML/prismatic-vlms
null
null
null
null
975
null
null
mit
null
null
null
null
null
null
null
prismatic/overwatch/overwatch.py
null
null
null
null
null
null
Python
2026-05-04T01:37:17.765977
""" overwatch.py Utility class for creating a centralized/standardized logger (built on Rich) and accelerate handler. """ import logging import logging.config import os from contextlib import nullcontext from logging import LoggerAdapter from typing import Any, Callable, ClassVar, Dict, MutableMapping, Tuple, Union ...
TRI-ML/prismatic-vlms
https://github.com/TRI-ML/prismatic-vlms
null
null
null
null
975
null
null
mit
null
null
null
null
null
null
null
prismatic/models/vlms/prismatic.py
null
null
null
null
null
null
Python
2026-05-04T01:37:17.796354
""" prismatic.py PyTorch Module defining a PrismaticVLM, our general interface for defining the various different VLMs in our work. Notes: - For now, we don't subclass `transformers.PretrainedModel` (or CausalLM). Instead, we assume a very limited subset of the {Model}ForCausalLM API that enables dispatch t...
TRI-ML/prismatic-vlms
https://github.com/TRI-ML/prismatic-vlms
null
null
null
null
975
null
null
mit
null
null
null
null
null
null
null
prismatic/preprocessing/datasets/datasets.py
null
null
null
null
null
null
Python
2026-05-04T01:37:17.874916
""" datasets.py PyTorch Dataset Definitions for Prismatic models; supports processing for both the `align` and `finetune` stages, with utilities for formatting conversations during the `finetune` stage subject to the given LLM backbone's expected formatting (e.g., SYS_PROMPT + USER: ... ASSISTANT: ... for Vicuña v1.5 ...
TRI-ML/prismatic-vlms
https://github.com/TRI-ML/prismatic-vlms
null
null
null
null
975
null
null
mit
null
null
null
null
null
null
null
prismatic/preprocessing/__init__.py
null
null
null
null
null
null
Python
2026-05-04T01:37:17.876004
from .download import convert_to_jpg, download_extract from .materialize import get_dataset_and_collator
TRI-ML/prismatic-vlms
https://github.com/TRI-ML/prismatic-vlms
null
null
null
null
975
null
null
mit
null
null
null
null
null
null
null
prismatic/preprocessing/download.py
null
null
null
null
null
null
Python
2026-05-04T01:37:17.877485
""" download.py Utility functions for downloading and extracting various datasets to (local) disk. """ import os import shutil from pathlib import Path from typing import Dict, List, TypedDict from zipfile import ZipFile import requests from PIL import Image from rich.progress import BarColumn, DownloadColumn, MofNC...
TRI-ML/prismatic-vlms
https://github.com/TRI-ML/prismatic-vlms
null
null
null
null
975
null
null
mit
null
null
null
null
null
null
null
prismatic/training/metrics.py
null
null
null
null
null
null
Python
2026-05-04T01:37:18.636852
""" metrics.py Utility classes defining a Metrics container and multiple Trackers to enable model/stage-specific logging to various endpoints (e.g., JSONL local logs, Weights & Biases). """ import time from collections import deque from pathlib import Path from typing import Any, Dict, Optional, Protocol, Tuple, Unio...
TRI-ML/prismatic-vlms
https://github.com/TRI-ML/prismatic-vlms
null
null
null
null
975
null
null
mit
null
null
null
null
null
null
null
prismatic/training/strategies/fsdp.py
null
null
null
null
null
null
Python
2026-05-04T01:37:18.708256
""" fsdp.py Core class definition for a strategy implementing Torch native Fully Sharded Data Parallel Training (with support for fine-grained control over wrapping policies and mixed precision per component). """ import math import shutil from collections import OrderedDict from functools import partial from pathlib...
TRI-ML/prismatic-vlms
https://github.com/TRI-ML/prismatic-vlms
null
null
null
null
975
null
null
mit
null
null
null
null
null
null
null
prismatic/training/materialize.py
null
null
null
null
null
null
Python
2026-05-04T01:37:18.721514
""" materialize.py Factory class defining functions for instantiating various Training Strategies, supporting different VLMs, backbones, and strategy configurations. """ from typing import Callable, Optional import torch from prismatic.models.vlms import PrismaticVLM from prismatic.training.strategies import FSDPSt...
TRI-ML/prismatic-vlms
https://github.com/TRI-ML/prismatic-vlms
null
null
null
null
975
null
null
mit
null
null
null
null
null
null
null
prismatic/util/nn_utils.py
null
null
null
null
null
null
Python
2026-05-04T01:37:18.784109
""" nn_utils.py Utility functions and PyTorch submodule definitions. """ import torch import torch.nn as nn # === Definitions for Various Projection Modules, with Signature :: [..., in_dim] --> [..., out_dim] === class LinearProjector(nn.Module): def __init__(self, vision_dim: int, llm_dim: int) -> None: ...
TRI-ML/prismatic-vlms
https://github.com/TRI-ML/prismatic-vlms
null
null
null
null
975
null
null
mit
null
null
null
null
null
null
null
prismatic/util/batching_utils.py
null
null
null
null
null
null
Python
2026-05-04T01:37:18.821805
""" batching_utils.py Core definitions of (Distributed) Samplers for VLM finetuning; provides functionality for construction and allocating "split-modality" batches as described in the LLaVa paper; this makes sure that a given device/batch is either entirely (vision, language) or (language-only) data, which leads to s...
TRI-ML/prismatic-vlms
https://github.com/TRI-ML/prismatic-vlms
null
null
null
null
975
null
null
mit
null
null
null
null
null
null
null
prismatic/util/data_utils.py
null
null
null
null
null
null
Python
2026-05-04T01:37:18.866806
""" data_utils.py General utilities and classes for facilitating data loading and collation. """ from dataclasses import dataclass from typing import Dict, Sequence, Tuple import torch from torch.nn.utils.rnn import pad_sequence # HuggingFace Default / LLaMa-2 IGNORE_INDEX (for labels) IGNORE_INDEX = -100 @datacl...
TRI-ML/prismatic-vlms
https://github.com/TRI-ML/prismatic-vlms
null
null
null
null
975
null
null
mit
null
null
null
null
null
null
null
prismatic/util/torch_utils.py
null
null
null
null
null
null
Python
2026-05-04T01:37:19.493206
""" torch_utils.py General utilities for randomness, mixed precision training, and miscellaneous checks in PyTorch. Random `set_global_seed` functionality is taken directly from PyTorch-Lighting: > Ref: https://github.com/PyTorchLightning/pytorch-lightning/blob/master/pytorch_lightning/utilities/seed.py This is ...
TRI-ML/prismatic-vlms
https://github.com/TRI-ML/prismatic-vlms
null
null
null
null
975
null
null
mit
null
null
null
null
null
null
null
prismatic/training/strategies/ddp.py
null
null
null
null
null
null
Python
2026-05-04T01:37:19.690909
""" ddp.py Core class definition for a strategy implementing Torch native Distributed Data Parallel Training; note that on most GPU hardware and LLM backbones >= 5-7B parameters, DDP training will OOM, which is why we opt for FSDP. """ import shutil from pathlib import Path from typing import Optional import torch f...
TRI-ML/prismatic-vlms
https://github.com/TRI-ML/prismatic-vlms
null
null
null
null
975
null
null
mit
null
null
null
null
null
null
null
prismatic/training/strategies/__init__.py
null
null
null
null
null
null
Python
2026-05-04T01:37:28.253035
from .base_strategy import TrainingStrategy from .ddp import DDPStrategy from .fsdp import FSDPStrategy
TRI-ML/prismatic-vlms
https://github.com/TRI-ML/prismatic-vlms
null
null
null
null
975
null
null
mit
null
null
null
null
null
null
null
prismatic/training/strategies/base_strategy.py
null
null
null
null
null
null
Python
2026-05-04T01:37:28.282508
""" base_strategy.py Abstract class definition of a (distributed) training strategy, with full annotations of class methods, utility functions, and initialization logic. Training Strategies (DDP, FSDP-Grad, FSDP-Full) tend to have a lot of repeated components; this class does a lot of heavy lifting. """ from abc imp...
dcharatan/flowmap
https://github.com/dcharatan/flowmap
null
null
null
null
976
null
null
mit
null
null
null
null
null
null
null
flowmap/config/tools.py
null
null
null
null
null
null
Python
2026-05-04T01:37:30.403873
from dataclasses import dataclass from pathlib import Path from typing import Type, TypeVar from dacite import Config, from_dict from omegaconf import DictConfig, OmegaConf TYPE_HOOKS = { Path: Path, } T = TypeVar("T") def get_typed_config( data_class: Type[T], cfg: DictConfig, extra_type_hooks: d...
dcharatan/flowmap
https://github.com/dcharatan/flowmap
null
null
null
null
976
null
null
mit
null
null
null
null
null
null
null
flowmap/config/pretrain.py
null
null
null
null
null
null
Python
2026-05-04T01:37:30.408941
from dataclasses import dataclass from ..dataset.data_module_pretrain import DataModulePretrainCfg from ..model.model_wrapper_pretrain import ModelWrapperPretrainCfg from .common import CommonCfg @dataclass class StageCfg: batch_size: int num_workers: int @dataclass class PretrainCfg(CommonCfg): model_...
dcharatan/flowmap
https://github.com/dcharatan/flowmap
null
null
null
null
976
null
null
mit
null
null
null
null
null
null
null
flowmap/dataset/data_module_pretrain.py
null
null
null
null
null
null
Python
2026-05-04T01:37:30.410136
import random from dataclasses import dataclass from typing import Callable import numpy as np import torch from lightning.pytorch import LightningDataModule from torch import Generator from torch.utils.data import DataLoader, Dataset, IterableDataset from ..frame_sampler import FrameSamplerCfg from . import DatasetC...
dcharatan/flowmap
https://github.com/dcharatan/flowmap
null
null
null
null
976
null
null
mit
null
null
null
null
null
null
null
flowmap/config/common.py
null
null
null
null
null
null
Python
2026-05-04T01:37:30.414169
from dataclasses import dataclass from typing import Literal, Type, TypeVar from omegaconf import DictConfig from ..dataset import DatasetCfg from ..flow import FlowPredictorCfg from ..frame_sampler import FrameSamplerCfg from ..loss import LossCfg from ..misc.cropping import CroppingCfg from ..model.model import Mod...
dcharatan/flowmap
https://github.com/dcharatan/flowmap
null
null
null
null
976
null
null
mit
null
null
null
null
null
null
null
flowmap/dataset/__init__.py
null
null
null
null
null
null
Python
2026-05-04T01:37:30.425463
from ..frame_sampler import FrameSamplerCfg, get_frame_sampler try: from .dataset_co3d import DatasetCO3D, DatasetCO3DCfg from .dataset_colmap import DatasetCOLMAP, DatasetCOLMAPCfg from .dataset_images import DatasetImages, DatasetImagesCfg from .dataset_llff import DatasetLLFF, DatasetLLFFCfg fro...
dcharatan/flowmap
https://github.com/dcharatan/flowmap
null
null
null
null
976
null
null
mit
null
null
null
null
null
null
null
flowmap/dataset/data_module_overfit.py
null
null
null
null
null
null
Python
2026-05-04T01:37:30.425990
from typing import Iterator from lightning.pytorch import LightningDataModule from torch.utils.data import DataLoader, IterableDataset class DummyDataset(IterableDataset): def __init__(self, limit: int | None = None) -> None: self.limit = limit def __iter__(self) -> Iterator: if self.limit: ...
dcharatan/flowmap
https://github.com/dcharatan/flowmap
null
null
null
null
976
null
null
mit
null
null
null
null
null
null
null
flowmap/dataset/dataset.py
null
null
null
null
null
null
Python
2026-05-04T01:37:30.428140
from dataclasses import dataclass @dataclass class DatasetCfgCommon: image_shape: tuple[int, int] | None scene: str | None
dcharatan/flowmap
https://github.com/dcharatan/flowmap
null
null
null
null
976
null
null
mit
null
null
null
null
null
null
null
flowmap/dataset/dataset_co3d.py
null
null
null
null
null
null
Python
2026-05-04T01:37:30.429291
import gzip import json from collections import defaultdict from dataclasses import dataclass from functools import cache from pathlib import Path from typing import Literal import torch import torchvision.transforms as tf from jaxtyping import Float from PIL import Image from torch import Tensor from torch.utils.data...
dcharatan/flowmap
https://github.com/dcharatan/flowmap
null
null
null
null
976
null
null
mit
null
null
null
null
null
null
null
flowmap/config/overfit.py
null
null
null
null
null
null
Python
2026-05-04T01:37:30.433615
from dataclasses import dataclass from pathlib import Path from ..model.model_wrapper_overfit import ModelWrapperOverfitCfg from ..tracking import TrackPrecomputationCfg, TrackPredictorCfg from .common import CommonCfg @dataclass class OverfitCfg(CommonCfg): tracking: TrackPredictorCfg track_precomputation: ...
dcharatan/flowmap
https://github.com/dcharatan/flowmap
null
null
null
null
976
null
null
mit
null
null
null
null
null
null
null
flowmap/dataset/dataset_colmap.py
null
null
null
null
null
null
Python
2026-05-04T01:37:30.452353
from dataclasses import dataclass from pathlib import Path from typing import Literal import torch import torchvision.transforms as tf from PIL import Image from torch.utils.data import Dataset from ..export.colmap import read_colmap_model from ..frame_sampler.frame_sampler import FrameSampler from .dataset import Da...
dcharatan/flowmap
https://github.com/dcharatan/flowmap
null
null
null
null
976
null
null
mit
null
null
null
null
null
null
null
flowmap/dataset/dataset_merged.py
null
null
null
null
null
null
Python
2026-05-04T01:37:31.013830
import torch from torch.utils.data import Dataset, IterableDataset class DatasetMerged(IterableDataset): def __init__(self, datasets: list[IterableDataset | Dataset]) -> None: self.datasets = datasets def __iter__(self): remaining = [len(dataset) for dataset in self.datasets] iterator...
dcharatan/flowmap
https://github.com/dcharatan/flowmap
null
null
null
null
976
null
null
mit
null
null
null
null
null
null
null
flowmap/dataset/dataset_images.py
null
null
null
null
null
null
Python
2026-05-04T01:37:31.014400
from dataclasses import dataclass from pathlib import Path from typing import Literal import torch import torchvision.transforms as tf from PIL import Image from torch.utils.data import Dataset from ..frame_sampler.frame_sampler import FrameSampler from .dataset import DatasetCfgCommon from .types import Stage @dat...
dcharatan/flowmap
https://github.com/dcharatan/flowmap
null
null
null
null
976
null
null
mit
null
null
null
null
null
null
null
flowmap/dataset/types.py
null
null
null
null
null
null
Python
2026-05-04T01:37:31.054408
from dataclasses import dataclass from typing import Literal from jaxtyping import Float, Int64 from torch import Tensor from ..misc.manipulable import Manipulable Stage = Literal["train", "test", "val"] @dataclass class Batch(Manipulable): videos: Float[Tensor, "batch frame 3 height=_ width=_"] indices: I...
dcharatan/flowmap
https://github.com/dcharatan/flowmap
null
null
null
null
976
null
null
mit
null
null
null
null
null
null
null
flowmap/dataset/dataset_llff.py
null
null
null
null
null
null
Python
2026-05-04T01:37:31.063736
from dataclasses import dataclass from pathlib import Path from typing import Literal import numpy as np import torch import torchvision.transforms as tf from einops import rearrange, repeat from jaxtyping import Float from PIL import Image from torch import Tensor from torch.utils.data import Dataset from ..frame_sa...
dcharatan/flowmap
https://github.com/dcharatan/flowmap
null
null
null
null
976
null
null
mit
null
null
null
null
null
null
null
flowmap/dataset/validation_wrapper.py
null
null
null
null
null
null
Python
2026-05-04T01:37:31.065018
from typing import Iterator, Optional import torch from torch.utils.data import Dataset, IterableDataset class ValidationWrapper(Dataset): """Wraps a dataset so that PyTorch Lightning's validation step can be turned into a visualization step. """ dataset: Dataset dataset_iterator: Optional[Itera...
dcharatan/flowmap
https://github.com/dcharatan/flowmap
null
null
null
null
976
null
null
mit
null
null
null
null
null
null
null
flowmap/flow/common.py
null
null
null
null
null
null
Python
2026-05-04T01:37:31.071749
from einops import rearrange from jaxtyping import Float from torch import Tensor def split_videos( videos: Float[Tensor, "batch frame 3 height width"], ) -> tuple[ Float[Tensor, "batch*(frame-1) 3 height width"], # source (flattened batch dims) Float[Tensor, "batch*(frame-1) 3 height width"], # target ...
dcharatan/flowmap
https://github.com/dcharatan/flowmap
null
null
null
null
976
null
null
mit
null
null
null
null
null
null
null
flowmap/dataset/dataset_re10k.py
null
null
null
null
null
null
Python
2026-05-04T01:37:31.075157
import json from dataclasses import dataclass from functools import cached_property from io import BytesIO from pathlib import Path from typing import Literal import torch import torchvision.transforms as tf from einops import rearrange, repeat from jaxtyping import Float, UInt8 from PIL import Image from torch import...
dcharatan/flowmap
https://github.com/dcharatan/flowmap
null
null
null
null
976
null
null
mit
null
null
null
null
null
null
null
flowmap/export/colmap.py
null
null
null
null
null
null
Python
2026-05-04T01:37:31.076321
import shutil from pathlib import Path import numpy as np import torch from einops import einsum, rearrange from jaxtyping import Float from plyfile import PlyData, PlyElement from scipy.spatial.transform import Rotation as R from torch import Tensor from ..misc.cropping import center_crop_intrinsics from ..model.mod...
dcharatan/flowmap
https://github.com/dcharatan/flowmap
null
null
null
null
976
null
null
mit
null
null
null
null
null
null
null
flowmap/flow/flow_predictor.py
null
null
null
null
null
null
Python
2026-05-04T01:37:31.112112
from abc import ABC, abstractmethod from dataclasses import dataclass from typing import Generic, TypeVar import torch.nn.functional as F from einops import rearrange from jaxtyping import Float from torch import Tensor, nn from ..dataset.types import Batch from ..misc.manipulable import Manipulable from ..model.proj...
dcharatan/flowmap
https://github.com/dcharatan/flowmap
null
null
null
null
976
null
null
mit
null
null
null
null
null
null
null
flowmap/flow/__init__.py
null
null
null
null
null
null
Python
2026-05-04T01:37:31.126157
import torch from ..dataset.types import Batch from ..misc.nn_module_tools import convert_to_buffer from .flow_predictor import FlowPredictor, Flows from .flow_predictor_gmflow import FlowPredictorGMFlow, FlowPredictorGMFlowCfg from .flow_predictor_raft import FlowPredictorRaft, FlowPredictorRaftCfg FLOW_PREDICTORS =...
dcharatan/flowmap
https://github.com/dcharatan/flowmap
null
null
null
null
976
null
null
mit
null
null
null
null
null
null
null
flowmap/frame_sampler/__init__.py
null
null
null
null
null
null
Python
2026-05-04T01:37:32.379783
from typing import Any from .frame_sampler import FrameSampler from .frame_sampler_overfit import FrameSamplerOverfit, FrameSamplerOverfitCfg from .frame_sampler_pretrain import FrameSamplerPretrain, FrameSamplerPretrainCfg FRAME_SAMPLER = { "overfit": FrameSamplerOverfit, "pretrain": FrameSamplerPretrain, } ...
dcharatan/flowmap
https://github.com/dcharatan/flowmap
null
null
null
null
976
null
null
mit
null
null
null
null
null
null
null
flowmap/frame_sampler/frame_sampler_overfit.py
null
null
null
null
null
null
Python
2026-05-04T01:37:32.383409
from dataclasses import dataclass from typing import Literal import torch from jaxtyping import Int64 from torch import Tensor from .frame_sampler import FrameSampler @dataclass class FrameSamplerOverfitCfg: name: Literal["overfit"] start: int | None num_frames: int | None step: int | None class F...
dcharatan/flowmap
https://github.com/dcharatan/flowmap
null
null
null
null
976
null
null
mit
null
null
null
null
null
null
null
flowmap/frame_sampler/frame_sampler_pretrain.py
null
null
null
null
null
null
Python
2026-05-04T01:37:32.385265
from dataclasses import dataclass from typing import Literal import torch from jaxtyping import Int64 from torch import Tensor from .frame_sampler import FrameSampler @dataclass class FrameSamplerPretrainCfg: name: Literal["pretrain"] num_frames: int class FrameSamplerPretrain(FrameSampler[FrameSamplerPre...
dcharatan/flowmap
https://github.com/dcharatan/flowmap
null
null
null
null
976
null
null
mit
null
null
null
null
null
null
null
flowmap/frame_sampler/frame_sampler.py
null
null
null
null
null
null
Python
2026-05-04T01:37:32.386148
from abc import ABC, abstractmethod from typing import Generic, TypeVar import torch from jaxtyping import Int64 from torch import Tensor T = TypeVar("T") class FrameSampler(ABC, Generic[T]): """A frame sampler picks the frames that should be sampled from a dataset's video. It makes sense to break the logic...
dcharatan/flowmap
https://github.com/dcharatan/flowmap
null
null
null
null
976
null
null
mit
null
null
null
null
null
null
null
flowmap/flow/flow_predictor_gmflow.py
null
null
null
null
null
null
Python
2026-05-04T01:37:32.387027
import sys import urllib.request from dataclasses import dataclass from pathlib import Path from typing import Literal import torch from einops import rearrange from jaxtyping import Float from torch import Tensor try: from ..third_party.gmflow.gmflow.gmflow import GMFlow except ImportError: GMFlow = None fr...
dcharatan/flowmap
https://github.com/dcharatan/flowmap
null
null
null
null
976
null
null
mit
null
null
null
null
null
null
null
flowmap/flow/flow_predictor_raft.py
null
null
null
null
null
null
Python
2026-05-04T01:37:32.388528
from dataclasses import dataclass from functools import partial from typing import Literal import torch from einops import rearrange from jaxtyping import Float from torch import Tensor from torchvision.models.optical_flow import Raft_Large_Weights, raft_large from tqdm import tqdm from .common import split_videos fr...
dcharatan/flowmap
https://github.com/dcharatan/flowmap
null
null
null
null
976
null
null
mit
null
null
null
null
null
null
null
flowmap/loss/__init__.py
null
null
null
null
null
null
Python
2026-05-04T01:37:32.389065
from .loss import Loss from .loss_flow import LossFlow, LossFlowCfg from .loss_tracking import LossTracking, LossTrackingCfg LOSSES = { "flow": LossFlow, "tracking": LossTracking, } LossCfg = LossFlowCfg | LossTrackingCfg def get_losses(cfgs: list[LossCfg]) -> list[Loss]: return [LOSSES[cfg.name](cfg) f...
dcharatan/flowmap
https://github.com/dcharatan/flowmap
null
null
null
null
976
null
null
mit
null
null
null
null
null
null
null
flowmap/loss/loss.py
null
null
null
null
null
null
Python
2026-05-04T01:37:33.324993
from abc import ABC, abstractmethod from dataclasses import dataclass from typing import Generic, TypeVar import torch from jaxtyping import Float from torch import Tensor, nn from ..dataset.types import Batch from ..flow import Flows from ..model.model import ModelOutput from ..tracking import Tracks @dataclass cl...
dcharatan/flowmap
https://github.com/dcharatan/flowmap
null
null
null
null
976
null
null
mit
null
null
null
null
null
null
null
flowmap/loss/mapping/__init__.py
null
null
null
null
null
null
Python
2026-05-04T01:37:33.326146
from .mapping import Mapping from .mapping_huber import MappingHuber, MappingHuberCfg from .mapping_l1 import MappingL1, MappingL1Cfg from .mapping_l2 import MappingL2, MappingL2Cfg MAPPINGS = { "huber": MappingHuber, "l1": MappingL1, "l2": MappingL2, } MappingCfg = MappingHuberCfg | MappingL1Cfg | Mappin...
dcharatan/flowmap
https://github.com/dcharatan/flowmap
null
null
null
null
976
null
null
mit
null
null
null
null
null
null
null
flowmap/misc/common_training_setup.py
null
null
null
null
null
null
Python
2026-05-04T01:37:33.354263
from pathlib import Path import hydra import torch import wandb from lightning.pytorch.callbacks import Callback, LearningRateMonitor, ModelCheckpoint from lightning.pytorch.loggers import Logger from lightning.pytorch.loggers.wandb import WandbLogger from omegaconf import DictConfig, OmegaConf from ..config.common i...
dcharatan/flowmap
https://github.com/dcharatan/flowmap
null
null
null
null
976
null
null
mit
null
null
null
null
null
null
null
flowmap/loss/loss_flow.py
null
null
null
null
null
null
Python
2026-05-04T01:37:33.440645
from dataclasses import dataclass from typing import Literal from jaxtyping import Float from torch import Tensor from ..dataset.types import Batch from ..flow import Flows from ..model.model import ModelOutput from ..model.projection import ( compute_backward_flow, compute_forward_flow, sample_image_grid...
dcharatan/flowmap
https://github.com/dcharatan/flowmap
null
null
null
null
976
null
null
mit
null
null
null
null
null
null
null
flowmap/loss/loss_tracking.py
null
null
null
null
null
null
Python
2026-05-04T01:37:33.456447
from dataclasses import dataclass from typing import Literal from einops import rearrange from jaxtyping import Float from torch import Tensor from ..dataset.types import Batch from ..flow import Flows from ..model.model import ModelOutput from ..model.projection import compute_track_flow from ..tracking import Track...
dcharatan/flowmap
https://github.com/dcharatan/flowmap
null
null
null
null
976
null
null
mit
null
null
null
null
null
null
null
flowmap/misc/config_tools.py
null
null
null
null
null
null
Python
2026-05-04T01:37:34.221903
from dataclasses import dataclass from pathlib import Path from typing import Type, TypeVar from dacite import Config, from_dict from omegaconf import DictConfig, OmegaConf TYPE_HOOKS = { Path: Path, } T = TypeVar("T") def get_typed_config( data_class: Type[T], cfg: DictConfig, extra_type_hooks: d...
dcharatan/flowmap
https://github.com/dcharatan/flowmap
null
null
null
null
976
null
null
mit
null
null
null
null
null
null
null
flowmap/misc/image_io.py
null
null
null
null
null
null
Python
2026-05-04T01:37:34.224509
import io from pathlib import Path from typing import Union import numpy as np import torch import torchvision.transforms as tf from einops import rearrange, repeat from jaxtyping import Float, UInt8 from matplotlib.figure import Figure from PIL import Image from torch import Tensor FloatImage = Union[ Float[Tens...
dcharatan/flowmap
https://github.com/dcharatan/flowmap
null
null
null
null
976
null
null
mit
null
null
null
null
null
null
null
flowmap/misc/disk_cache.py
null
null
null
null
null
null
Python
2026-05-04T01:37:34.225925
import hashlib import json from pathlib import Path from typing import Any, Callable, TypeVar import torch T = TypeVar("T") def make_cache(location: Path | None): def cache(key: Any, fallback: Callable[[], T]) -> T: # If there's no cache location, the cache is disabled. if location is None: ...
dcharatan/flowmap
https://github.com/dcharatan/flowmap
null
null
null
null
976
null
null
mit
null
null
null
null
null
null
null
flowmap/loss/mapping/mapping_l1.py
null
null
null
null
null
null
Python
2026-05-04T01:37:34.227464
from dataclasses import dataclass from typing import Literal from jaxtyping import Float from torch import Tensor from .mapping import Mapping @dataclass class MappingL1Cfg: name: Literal["l1"] class MappingL1(Mapping[MappingL1Cfg]): def forward_undistorted( self, delta: Float[Tensor, "*ba...
dcharatan/flowmap
https://github.com/dcharatan/flowmap
null
null
null
null
976
null
null
mit
null
null
null
null
null
null
null
flowmap/misc/local_logger.py
null
null
null
null
null
null
Python
2026-05-04T01:37:34.228403
import os from pathlib import Path from typing import Any, Optional from lightning.pytorch.loggers import Logger from lightning.pytorch.utilities import rank_zero_only from PIL import Image LOG_PATH = Path("outputs/local") class LocalLogger(Logger): def __init__(self) -> None: super().__init__() ...
dcharatan/flowmap
https://github.com/dcharatan/flowmap
null
null
null
null
976
null
null
mit
null
null
null
null
null
null
null
flowmap/loss/mapping/mapping_huber.py
null
null
null
null
null
null
Python
2026-05-04T01:37:34.229637
from dataclasses import dataclass from typing import Literal import torch import torch.nn.functional as F from jaxtyping import Float from torch import Tensor from .mapping import Mapping @dataclass class MappingHuberCfg: name: Literal["huber"] delta: float class MappingHuber(Mapping[MappingHuberCfg]): ...
dcharatan/flowmap
https://github.com/dcharatan/flowmap
null
null
null
null
976
null
null
mit
null
null
null
null
null
null
null
flowmap/loss/mapping/mapping_l2.py
null
null
null
null
null
null
Python
2026-05-04T01:37:34.230601
from dataclasses import dataclass from typing import Literal from jaxtyping import Float from torch import Tensor from .mapping import Mapping @dataclass class MappingL2Cfg: name: Literal["l2"] class MappingL2(Mapping[MappingL2Cfg]): def forward_undistorted( self, delta: Float[Tensor, "*ba...
dcharatan/flowmap
https://github.com/dcharatan/flowmap
null
null
null
null
976
null
null
mit
null
null
null
null
null
null
null
flowmap/misc/ate.py
null
null
null
null
null
null
Python
2026-05-04T01:37:34.231708
import torch from jaxtyping import Float from scipy import spatial from torch import Tensor def compute_ate( gt: Float[Tensor, "point 3"], predicted: Float[Tensor, "point 3"], ) -> tuple[ Float[Tensor, ""], # ate Float[Tensor, "point 3"], # aligned gt Float[Tensor, "point 3"], # aligned predict...
dcharatan/flowmap
https://github.com/dcharatan/flowmap
null
null
null
null
976
null
null
mit
null
null
null
null
null
null
null
flowmap/misc/cropping.py
null
null
null
null
null
null
Python
2026-05-04T01:37:34.335140
from dataclasses import dataclass, replace import torch.nn.functional as F from einops import rearrange from jaxtyping import Float from PIL import Image from torch import Tensor from ..dataset.types import Batch @dataclass class CroppingCfg: image_shape: tuple[int, int] | int flow_scale_multiplier: int ...
dcharatan/flowmap
https://github.com/dcharatan/flowmap
null
null
null
null
976
null
null
mit
null
null
null
null
null
null
null
flowmap/misc/manipulable.py
null
null
null
null
null
null
Python
2026-05-04T01:37:35.226947
from dataclasses import fields, replace from typing import Any, TypeVar import numpy as np import torch from jaxtyping import Bool, Int64 from torch import Tensor T = TypeVar("T") SliceLike = slice | int | Int64[Tensor, "..."] | Bool[Tensor, "..."] Sliceable = Tensor | np.ndarray | list | tuple def to_tuple(lst): ...
dcharatan/flowmap
https://github.com/dcharatan/flowmap
null
null
null
null
976
null
null
mit
null
null
null
null
null
null
null
flowmap/misc/wandb_tools.py
null
null
null
null
null
null
Python
2026-05-04T01:37:35.227561
from pathlib import Path import wandb from ..config.common import WandbCfg def version_to_int(artifact) -> int: """Convert versions of the form vX to X. For example, v12 to 12.""" return int(artifact.version[1:]) def download_checkpoint( run_id: str, download_dir: Path, version: str | None, ) ...
dcharatan/flowmap
https://github.com/dcharatan/flowmap
null
null
null
null
976
null
null
mit
null
null
null
null
null
null
null
flowmap/model/backbone/backbone_explicit_depth.py
null
null
null
null
null
null
Python
2026-05-04T01:37:35.228896
from dataclasses import dataclass from typing import Literal import torch from torch import nn from ...dataset.types import Batch from ...flow.flow_predictor import Flows from .backbone import Backbone, BackboneOutput @dataclass class BackboneExplicitDepthCfg: name: Literal["explicit_depth"] initial_depth: ...
dcharatan/flowmap
https://github.com/dcharatan/flowmap
null
null
null
null
976
null
null
mit
null
null
null
null
null
null
null
flowmap/misc/nn_module_tools.py
null
null
null
null
null
null
Python
2026-05-04T01:37:35.229671
from torch import nn def convert_to_buffer(module: nn.Module, persistent: bool = True): # Recurse over child modules. for name, child in list(module.named_children()): convert_to_buffer(child, persistent) # Also re-save buffers to change persistence. for name, parameter_or_buffer in ( ...
dcharatan/flowmap
https://github.com/dcharatan/flowmap
null
null
null
null
976
null
null
mit
null
null
null
null
null
null
null
flowmap/model/backbone/backbone.py
null
null
null
null
null
null
Python
2026-05-04T01:37:35.230133
from abc import ABC, abstractmethod from dataclasses import dataclass from typing import Generic, TypeVar from jaxtyping import Float from torch import Tensor, nn from ...dataset.types import Batch from ...flow.flow_predictor import Flows T = TypeVar("T") @dataclass class BackboneOutput: depths: Float[Tensor, ...
dcharatan/flowmap
https://github.com/dcharatan/flowmap
null
null
null
null
976
null
null
mit
null
null
null
null
null
null
null
flowmap/model/backbone/__init__.py
null
null
null
null
null
null
Python
2026-05-04T01:37:35.230579
from .backbone import Backbone from .backbone_explicit_depth import BackboneExplicitDepth, BackboneExplicitDepthCfg from .backbone_midas import BackboneMidas, BackboneMidasCfg BACKBONES = { "explicit_depth": BackboneExplicitDepth, "midas": BackboneMidas, } BackboneCfg = BackboneExplicitDepthCfg | BackboneMida...
dcharatan/flowmap
https://github.com/dcharatan/flowmap
null
null
null
null
976
null
null
mit
null
null
null
null
null
null
null
flowmap/model/backbone/backbone_midas.py
null
null
null
null
null
null
Python
2026-05-04T01:37:35.231089
from dataclasses import dataclass from typing import Literal import torch import torch.nn.functional as F from einops import rearrange from jaxtyping import Float from torch import Tensor, nn from ...dataset.types import Batch from ...flow.flow_predictor import Flows from ..projection import earlier, later, sample_im...
dcharatan/flowmap
https://github.com/dcharatan/flowmap
null
null
null
null
976
null
null
mit
null
null
null
null
null
null
null
flowmap/model/extrinsics/__init__.py
null
null
null
null
null
null
Python
2026-05-04T01:37:35.666205
from .extrinsics import Extrinsics from .extrinsics_procrustes import ExtrinsicsProcrustes, ExtrinsicsProcrustesCfg from .extrinsics_regressed import ExtrinsicsRegressed, ExtrinsicsRegressedCfg EXTRINSICS = { "procrustes": ExtrinsicsProcrustes, "regressed": ExtrinsicsRegressed, } ExtrinsicsCfg = ExtrinsicsPro...
dcharatan/flowmap
https://github.com/dcharatan/flowmap
null
null
null
null
976
null
null
mit
null
null
null
null
null
null
null
flowmap/loss/mapping/mapping.py
null
null
null
null
null
null
Python
2026-05-04T01:37:38.244950
from abc import ABC, abstractmethod from typing import Generic, TypeVar import torch from jaxtyping import Float from torch import Tensor, nn def fix_aspect_ratio( points: Float[Tensor, "*batch 2"], image_shape: tuple[int, int], ) -> Float[Tensor, "*batch 2"]: """When computing losses on normalized image...
RicterZ/doujinshi-dl
https://github.com/RicterZ/doujinshi-dl
null
null
null
null
975
null
null
mit
null
null
null
null
null
null
null
doujinshi_dl/core/logger.py
null
null
null
null
null
null
Python
2026-05-04T01:37:40.445294
# # Copyright (C) 2010-2012 Vinay Sajip. All rights reserved. Licensed under the new BSD license. # import logging import re import platform import sys if platform.system() == 'Windows': import ctypes import ctypes.wintypes # Reference: https://gist.github.com/vsajip/758430 # https://githu...
RicterZ/doujinshi-dl
https://github.com/RicterZ/doujinshi-dl
null
null
null
null
975
null
null
mit
null
null
null
null
null
null
null
doujinshi_dl/cmdline.py
null
null
null
null
null
null
Python
2026-05-04T01:37:40.446420
# coding: utf-8 import os import sys import json from urllib.parse import urlparse from argparse import ArgumentParser from doujinshi_dl import __version__ from doujinshi_dl.utils import generate_html, generate_main_html, DB, EXTENSIONS from doujinshi_dl.logger import logger from doujinshi_dl.constant import PATH_SE...
RicterZ/doujinshi-dl
https://github.com/RicterZ/doujinshi-dl
null
null
null
null
975
null
null
mit
null
null
null
null
null
null
null
doujinshi_dl/command.py
null
null
null
null
null
null
Python
2026-05-04T01:37:40.449262
# coding: utf-8 import os import shutil import sys import signal import platform import urllib3.exceptions from doujinshi_dl.cmdline import cmd_parser, banner, write_config from doujinshi_dl.core.registry import get_first_plugin from doujinshi_dl.core import config as core_config from doujinshi_dl.downloader import Do...
RicterZ/doujinshi-dl
https://github.com/RicterZ/doujinshi-dl
null
null
null
null
975
null
null
mit
null
null
null
null
null
null
null
doujinshi_dl/core/registry.py
null
null
null
null
null
null
Python
2026-05-04T01:37:40.450614
# coding: utf-8 from typing import TYPE_CHECKING if TYPE_CHECKING: from doujinshi_dl.core.plugin import BasePlugin def get_plugin(name: str) -> 'BasePlugin': from importlib.metadata import entry_points eps = entry_points(group='doujinshi_dl.plugins') for ep in eps: if ep.name == name: ...
RicterZ/doujinshi-dl
https://github.com/RicterZ/doujinshi-dl
null
null
null
null
975
null
null
mit
null
null
null
null
null
null
null
doujinshi_dl/core/config.py
null
null
null
null
null
null
Python
2026-05-04T01:37:40.453866
# coding: utf-8 """Runtime configuration store for the main package. Plugins write their paths and settings here so that generic utilities (e.g. db.py) can read them without hard-coding any plugin name. """ _runtime: dict = {} def set(key: str, value) -> None: _runtime[key] = value def get(key: str, default=N...
RicterZ/doujinshi-dl
https://github.com/RicterZ/doujinshi-dl
null
null
null
null
975
null
null
mit
null
null
null
null
null
null
null
doujinshi_dl/core/downloader.py
null
null
null
null
null
null
Python
2026-05-04T01:37:40.459029
# coding: utf- import os import asyncio import httpx import urllib3.exceptions import zipfile import io from urllib.parse import urlparse from doujinshi_dl.core.logger import logger from doujinshi_dl.core.utils.db import Singleton from doujinshi_dl.core import config as core_config async def _async_request(method, ...
RicterZ/doujinshi-dl
https://github.com/RicterZ/doujinshi-dl
null
null
null
null
975
null
null
mit
null
null
null
null
null
null
null
doujinshi_dl/constant.py
null
null
null
null
null
null
Python
2026-05-04T01:37:40.460119
# coding: utf-8 """Main-package constants. Only the constants that the main package itself needs are defined here. Plugin-specific constants live in the respective plugin package. """ import os PATH_SEPARATOR = os.path.sep
RicterZ/doujinshi-dl
https://github.com/RicterZ/doujinshi-dl
null
null
null
null
975
null
null
mit
null
null
null
null
null
null
null
doujinshi_dl/core/plugin.py
null
null
null
null
null
null
Python
2026-05-04T01:37:40.476688
# coding: utf-8 from abc import ABC, abstractmethod from dataclasses import dataclass, field from typing import List, Dict, Any, Iterator, Tuple @dataclass class GalleryMeta: id: str name: str pretty_name: str img_id: str ext: list pages: int info: Dict[str, Any] = field(default_factory=di...
RicterZ/doujinshi-dl
https://github.com/RicterZ/doujinshi-dl
null
null
null
null
975
null
null
mit
null
null
null
null
null
null
null
doujinshi_dl/core/utils/fs.py
null
null
null
null
null
null
Python
2026-05-04T01:37:41.357982
# coding: utf-8 """Filesystem utilities: filename formatting, CBZ generation, folder management.""" import os import zipfile import shutil from typing import Tuple from doujinshi_dl.core.logger import logger from doujinshi_dl.constant import PATH_SEPARATOR MAX_FIELD_LENGTH = 100 EXTENSIONS = ('.png', '.jpg', '.jpeg',...
RicterZ/doujinshi-dl
https://github.com/RicterZ/doujinshi-dl
null
null
null
null
975
null
null
mit
null
null
null
null
null
null
null
doujinshi_dl/downloader.py
null
null
null
null
null
null
Python
2026-05-04T01:37:46.201703
# coding: utf-8 # Compatibility shim — re-exports from new location. # Preserves backward compatibility for: from doujinshi_dl.downloader import Downloader, CompressedDownloader from doujinshi_dl.core.downloader import * # noqa: F401, F403 from doujinshi_dl.core.downloader import Downloader, CompressedDownloader, down...
RicterZ/doujinshi-dl
https://github.com/RicterZ/doujinshi-dl
null
null
null
null
975
null
null
mit
null
null
null
null
null
null
null
doujinshi_dl/core/utils/http.py
null
null
null
null
null
null
Python
2026-05-04T01:37:46.232187
# coding: utf-8 """Generic async HTTP request helper (no site-specific headers injected here).""" import httpx import urllib3.exceptions urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) async def async_request(method, url, proxy=None, **kwargs): """ Thin async HTTP client wrapper. Hea...
RicterZ/doujinshi-dl
https://github.com/RicterZ/doujinshi-dl
null
null
null
null
975
null
null
mit
null
null
null
null
null
null
null
doujinshi_dl/logger.py
null
null
null
null
null
null
Python
2026-05-04T01:37:46.233716
# coding: utf-8 # Compatibility shim — re-exports from new location. # Preserves backward compatibility for: from doujinshi_dl.logger import logger from doujinshi_dl.core.logger import * # noqa: F401, F403 from doujinshi_dl.core.logger import logger # noqa: F401
RicterZ/doujinshi-dl
https://github.com/RicterZ/doujinshi-dl
null
null
null
null
975
null
null
mit
null
null
null
null
null
null
null
doujinshi_dl/utils.py
null
null
null
null
null
null
Python
2026-05-04T01:37:46.758285
# coding: utf-8 # Utility helpers for the main package. # No plugin-specific imports. # Generic filesystem / HTML utilities from doujinshi_dl.core.utils.fs import ( # noqa: F401 format_filename, parse_doujinshi_obj, generate_cbz, move_to_folder, EXTENSIONS, MAX_FIELD_LENGTH, ) from doujinshi_dl.core.utils.htm...
RicterZ/doujinshi-dl
https://github.com/RicterZ/doujinshi-dl
null
null
null
null
975
null
null
mit
null
null
null
null
null
null
null
doujinshi_dl/core/utils/db.py
null
null
null
null
null
null
Python
2026-05-04T01:37:46.760092
# coding: utf-8 """DB and Singleton utilities.""" import os import sqlite3 class _Singleton(type): """ A metaclass that creates a Singleton base class when called. """ _instances = {} def __call__(cls, *args, **kwargs): if cls not in cls._instances: cls._instances[cls] = super(_Single...
RicterZ/doujinshi-dl
https://github.com/RicterZ/doujinshi-dl
null
null
null
null
975
null
null
mit
null
null
null
null
null
null
null
doujinshi_dl/core/utils/html.py
null
null
null
null
null
null
Python
2026-05-04T01:37:46.760652
# coding: utf-8 """HTML viewer generation utilities (generic, no site-specific references).""" import json import os import urllib.parse from doujinshi_dl.core.logger import logger from doujinshi_dl.core.utils.fs import EXTENSIONS, parse_doujinshi_obj from doujinshi_dl.constant import PATH_SEPARATOR def _readfile(pa...
RicterZ/doujinshi-dl
https://github.com/RicterZ/doujinshi-dl
null
null
null
null
975
null
null
mit
null
null
null
null
null
null
null
doujinshi_dl/core/utils/__init__.py
null
null
null
null
null
null
Python
2026-05-04T01:37:47.213169
# coding: utf-8 from doujinshi_dl.core.utils.db import Singleton, DB from doujinshi_dl.core.utils.fs import format_filename, generate_cbz, move_to_folder, parse_doujinshi_obj, EXTENSIONS from doujinshi_dl.core.utils.html import generate_html, generate_main_html from doujinshi_dl.core.utils.http import async_request
dannymcc/bluehood
https://github.com/dannymcc/bluehood
null
null
null
null
975
null
null
mit
null
null
null
null
null
null
null
bluehood/config.py
null
null
null
null
null
null
Python
2026-05-04T01:37:49.358431
"""Configuration for bluehood.""" import os from pathlib import Path # Data directory DATA_DIR = Path(os.environ.get("BLUEHOOD_DATA_DIR", Path.home() / ".local" / "share" / "bluehood")) DATA_DIR.mkdir(parents=True, exist_ok=True) # Database path (can be overridden directly) DB_PATH = Path(os.environ.get("BLUEHOOD_DB...
dannymcc/bluehood
https://github.com/dannymcc/bluehood
null
null
null
null
975
null
null
mit
null
null
null
null
null
null
null
bluehood/notifications.py
null
null
null
null
null
null
Python
2026-05-04T01:37:49.359815
"""Notification system using ntfy.sh for push notifications.""" import asyncio import logging from datetime import datetime, timedelta from typing import Optional import aiohttp from . import db from .db import Device, Settings logger = logging.getLogger(__name__) # ntfy.sh base URL NTFY_BASE_URL = "https://ntfy.s...
dannymcc/bluehood
https://github.com/dannymcc/bluehood
null
null
null
null
975
null
null
mit
null
null
null
null
null
null
null
bluehood/patterns.py
null
null
null
null
null
null
Python
2026-05-04T01:37:49.361365
"""Traffic pattern analysis for bluehood.""" from dataclasses import dataclass from typing import Optional from . import db @dataclass class Pattern: """Analyzed traffic pattern for a device.""" time_description: str # e.g., "Evenings (5PM-11PM)" day_description: str # e.g., "Weekdays" frequency:...
dannymcc/bluehood
https://github.com/dannymcc/bluehood
null
null
null
null
975
null
null
mit
null
null
null
null
null
null
null
bluehood/daemon.py
null
null
null
null
null
null
Python
2026-05-04T01:37:49.368137
"""Bluehood daemon - continuous Bluetooth scanning service.""" import argparse import asyncio import json import logging import os import platform import signal import sys import time from pathlib import Path from typing import Optional import aiohttp from . import db, __version__ from .config import SCAN_INTERVAL, ...
dannymcc/bluehood
https://github.com/dannymcc/bluehood
null
null
null
null
975
null
null
mit
null
null
null
null
null
null
null
bluehood/web.py
null
null
null
null
null
null
Python
2026-05-04T01:37:49.369197
"""Compatibility module for the Bluehood web server.""" from .webapp.server import WebServer __all__ = ["WebServer"]
dannymcc/bluehood
https://github.com/dannymcc/bluehood
null
null
null
null
975
null
null
mit
null
null
null
null
null
null
null
bluehood/classifier.py
null
null
null
null
null
null
Python
2026-05-04T01:37:49.369806
"""Device type classification based on vendor and patterns.""" import re from typing import Optional # macOS CoreBluetooth provides UUIDs instead of real MAC addresses for privacy. # These are 36-character strings like "460649E9-2306-1FF2-1272-A8D9B9D9143D". _MACOS_UUID_RE = re.compile( r'^[0-9A-Fa-f]{8}-[0-9A-Fa...
dannymcc/bluehood
https://github.com/dannymcc/bluehood
null
null
null
null
975
null
null
mit
null
null
null
null
null
null
null
bluehood/db.py
null
null
null
null
null
null
Python
2026-05-04T01:37:49.371929
"""Database operations for bluehood.""" import json import aiosqlite from datetime import datetime, timedelta from typing import Optional from dataclasses import dataclass from .config import DB_PATH, HEARTBEAT_URL, HEARTBEAT_INTERVAL, PRUNE_DAYS @dataclass class Device: """Represents a Bluetooth device.""" ...
dannymcc/bluehood
https://github.com/dannymcc/bluehood
null
null
null
null
975
null
null
mit
null
null
null
null
null
null
null
bluehood/scanner.py
null
null
null
null
null
null
Python
2026-05-04T01:37:49.395026
"""Bluetooth scanning module using bleak (BLE) and hcitool (classic).""" import asyncio import logging import os import re import subprocess import time from dataclasses import dataclass, field from typing import Callable, Optional import aiohttp from bleak import BleakScanner from bleak.backends.device import BLEDev...
dannymcc/bluehood
https://github.com/dannymcc/bluehood
null
null
null
null
975
null
null
mit
null
null
null
null
null
null
null
bluehood/prometheus.py
null
null
null
null
null
null
Python
2026-05-04T01:37:49.480850
"""Prometheus metrics exporter for Bluehood.""" import logging from threading import Thread from typing import Optional import aiosqlite from prometheus_client import ( Counter, Gauge, Histogram, Info, start_http_server, ) from .config import DB_PATH logger = logging.getLogger(__name__) # Bucke...
dannymcc/bluehood
https://github.com/dannymcc/bluehood
null
null
null
null
975
null
null
mit
null
null
null
null
null
null
null
bluehood/webapp/server.py
null
null
null
null
null
null
Python
2026-05-04T01:37:50.073514
"""Web server for the Bluehood dashboard.""" import hashlib import logging import math import secrets from datetime import datetime, timedelta from typing import Optional from aiohttp import web from .. import db from ..classifier import classify_device, get_type_icon, get_type_label, get_all_types, is_randomized_ma...
ProHiryu/bert-chinese-ner
https://github.com/ProHiryu/bert-chinese-ner
null
null
null
null
975
null
null
mit
null
null
null
null
null
null
null
tf_metrics.py
null
null
null
null
null
null
Python
2026-05-04T01:37:52.531364
""" Multiclass from: https://github.com/guillaumegenthial/tf_metrics/blob/master/tf_metrics/__init__.py """ __author__ = "Guillaume Genthial" import numpy as np import tensorflow as tf from tensorflow.python.ops.metrics_impl import _streaming_confusion_matrix def precision(labels, predictions, num_c...
ProHiryu/bert-chinese-ner
https://github.com/ProHiryu/bert-chinese-ner
null
null
null
null
975
null
null
mit
null
null
null
null
null
null
null
BERT_NER.py
null
null
null
null
null
null
Python
2026-05-04T01:37:52.531818
#! usr/bin/env python3 # -*- coding:utf-8 -*- """ Copyright 2018 The Google AI Language Team Authors. BASED ON Google_BERT. @Author:zhoukaiyin Adjust code for chinese ner """ from __future__ import absolute_import from __future__ import division from __future__ import print_function import collections imp...
Olivia5k/doge
https://github.com/Olivia5k/doge
null
null
null
null
974
null
null
mit
null
null
null
null
null
null
null
src/doge/core.py
null
null
null
null
null
null
Python
2026-05-04T01:37:54.406950
#!/usr/bin/env python # Copyright (C) 2013-2024 Olivia Thiderman """Wow print Shibe to terminal, such random words.""" import argparse import contextlib import datetime import getpass import os import platform import random import re import shutil import subprocess import sys import traceback import unicodedata from...