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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
EstrellaXD/Auto_Bangumi | https://github.com/EstrellaXD/Auto_Bangumi | null | null | null | null | 8,011 | null | null | mit | null | null | null | null | null | null | null | backend/src/module/database/passkey.py | null | null | null | null | null | null | Python | 2026-05-04T02:14:42.457958 | """
Passkey 数据库操作层
"""
import logging
from datetime import datetime, timezone
from typing import List, Optional
from fastapi import HTTPException
from sqlalchemy.ext.asyncio import AsyncSession
from sqlmodel import select
from module.models.passkey import Passkey, PasskeyList
logger = logging.getLogger(__name__)
... |
EstrellaXD/Auto_Bangumi | https://github.com/EstrellaXD/Auto_Bangumi | null | null | null | null | 8,011 | null | null | mit | null | null | null | null | null | null | null | backend/src/module/downloader/client/mock_downloader.py | null | null | null | null | null | null | Python | 2026-05-04T02:14:42.459584 | """
Mock Downloader for local development and testing.
This downloader simulates qBittorrent behavior without requiring an actual
qBittorrent instance. All operations return success and log their actions.
"""
import logging
from typing import Any
logger = logging.getLogger(__name__)
class MockDownloader:
"""
... |
EstrellaXD/Auto_Bangumi | https://github.com/EstrellaXD/Auto_Bangumi | null | null | null | null | 8,011 | null | null | mit | null | null | null | null | null | null | null | backend/src/module/database/user.py | null | null | null | null | null | null | Python | 2026-05-04T02:14:42.460069 | import logging
from fastapi import HTTPException
from sqlmodel import Session, select
from module.models import ResponseModel
from module.models.user import User, UserUpdate
from module.security.jwt import get_password_hash, verify_password
logger = logging.getLogger(__name__)
class UserDatabase:
def __init__(... |
EstrellaXD/Auto_Bangumi | https://github.com/EstrellaXD/Auto_Bangumi | null | null | null | null | 8,011 | null | null | mit | null | null | null | null | null | null | null | backend/src/module/downloader/client/qb_downloader.py | null | null | null | null | null | null | Python | 2026-05-04T02:14:42.460527 | import asyncio
import json
import logging
import httpx
from module.ab_decorator import qb_connect_failed_wait
logger = logging.getLogger(__name__)
class QbDownloader:
def __init__(self, host: str, username: str, password: str, ssl: bool):
if "://" not in host:
scheme = "https" if ssl else "... |
EstrellaXD/Auto_Bangumi | https://github.com/EstrellaXD/Auto_Bangumi | null | null | null | null | 8,011 | null | null | mit | null | null | null | null | null | null | null | backend/src/module/downloader/download_client.py | null | null | null | null | null | null | Python | 2026-05-04T02:14:42.568091 | import asyncio
import logging
from module.conf import settings
from module.models import Bangumi, Torrent
from module.network import RequestContent
from .path import TorrentPath
logger = logging.getLogger(__name__)
class DownloadClient(TorrentPath):
"""Unified async download client.
Wraps qBittorrent, Ari... |
EstrellaXD/Auto_Bangumi | https://github.com/EstrellaXD/Auto_Bangumi | null | null | null | null | 8,011 | null | null | mit | null | null | null | null | null | null | null | backend/src/module/manager/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:14:43.469101 | from .collector import SeasonCollector, eps_complete
from .renamer import Renamer
from .torrent import TorrentManager
|
EstrellaXD/Auto_Bangumi | https://github.com/EstrellaXD/Auto_Bangumi | null | null | null | null | 8,011 | null | null | mit | null | null | null | null | null | null | null | backend/src/module/downloader/path.py | null | null | null | null | null | null | Python | 2026-05-04T02:14:43.585287 | import logging
import re
from os import PathLike
from module.conf import PLATFORM, settings
from module.models import Bangumi, BangumiUpdate
logger = logging.getLogger(__name__)
if PLATFORM == "Windows":
from pathlib import PureWindowsPath as Path
else:
from pathlib import Path
_MEDIA_SUFFIXES = frozenset(... |
lanpa/tensorboardX | https://github.com/lanpa/tensorboardX | null | null | null | null | 7,986 | null | null | mit | null | null | null | null | null | null | null | examples/chainer/extension_logger/writetensorboard.py | null | null | null | null | null | null | Python | 2026-05-04T02:14:46.207583 | import json
import os
import shutil
import tempfile
import six
from chainer import reporter
from chainer import serializer as serializer_module
from chainer.training import extension
from chainer.training import trigger as trigger_module
class LogTensorboard(extension.Extension):
"""Trainer extension to output ... |
lanpa/tensorboardX | https://github.com/lanpa/tensorboardX | null | null | null | null | 7,986 | null | null | mit | null | null | null | null | null | null | null | examples/chainer/extension_logger/net.py | null | null | null | null | null | null | Python | 2026-05-04T02:14:46.226362 | #!/usr/bin/env python
from __future__ import print_function
import numpy
import chainer
from chainer import cuda
import chainer.functions as F
import chainer.links as L
def add_noise(h, sigma=0.2):
xp = cuda.get_array_module(h.data)
if chainer.config.train:
return h + sigma * xp.random.randn(*h.sha... |
lanpa/tensorboardX | https://github.com/lanpa/tensorboardX | null | null | null | null | 7,986 | null | null | mit | null | null | null | null | null | null | null | examples/chainer/plain_logger/train_vae.py | null | null | null | null | null | null | Python | 2026-05-04T02:14:46.227475 | #!/usr/bin/env python
"""Chainer example: train a VAE on MNIST
"""
from __future__ import print_function
import argparse
import matplotlib
# Disable interactive backend
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import numpy as np
import six
import chainer
from chainer import computational_graph
from chain... |
lanpa/tensorboardX | https://github.com/lanpa/tensorboardX | null | null | null | null | 7,986 | null | null | mit | null | null | null | null | null | null | null | examples/chainer/extension_logger/visualize.py | null | null | null | null | null | null | Python | 2026-05-04T02:14:46.247110 | #!/usr/bin/env python
import os
import numpy as np
from PIL import Image
import chainer
import chainer.cuda
from chainer import Variable
def out_generated_image(gen, dis, rows, cols, seed, dst, writer):
@chainer.training.make_extension()
def make_image(trainer):
np.random.seed(seed)
n_image... |
lanpa/tensorboardX | https://github.com/lanpa/tensorboardX | null | null | null | null | 7,986 | null | null | mit | null | null | null | null | null | null | null | examples/chainer/plain_logger/data.py | null | null | null | null | null | null | Python | 2026-05-04T02:14:46.260173 | import gzip
import os
import numpy as np
import six
from six.moves.urllib import request
parent = 'http://yann.lecun.com/exdb/mnist'
train_images = 'train-images-idx3-ubyte.gz'
train_labels = 'train-labels-idx1-ubyte.gz'
test_images = 't10k-images-idx3-ubyte.gz'
test_labels = 't10k-labels-idx1-ubyte.gz'
num_train = 6... |
lanpa/tensorboardX | https://github.com/lanpa/tensorboardX | null | null | null | null | 7,986 | null | null | mit | null | null | null | null | null | null | null | examples/chainer/extension_logger/updater.py | null | null | null | null | null | null | Python | 2026-05-04T02:14:46.267682 | #!/usr/bin/env python
from __future__ import print_function
import chainer
import chainer.functions as F
from chainer import Variable
class DCGANUpdater(chainer.training.StandardUpdater):
def __init__(self, *args, **kwargs):
self.gen, self.dis = kwargs.pop('models')
super(DCGANUpdater, self).__... |
lanpa/tensorboardX | https://github.com/lanpa/tensorboardX | null | null | null | null | 7,986 | null | null | mit | null | null | null | null | null | null | null | examples/chainer/extension_logger/train_dcgan.py | null | null | null | null | null | null | Python | 2026-05-04T02:14:46.293565 | #!/usr/bin/env python
from __future__ import print_function
import argparse
import os
import chainer
from chainer import training
from chainer.training import extensions
from net import Discriminator
from net import Generator
from updater import DCGANUpdater
from visualize import out_generated_image
from tensorboard... |
lanpa/tensorboardX | https://github.com/lanpa/tensorboardX | null | null | null | null | 7,986 | null | null | mit | null | null | null | null | null | null | null | examples/chainer/plain_logger/net.py | null | null | null | null | null | null | Python | 2026-05-04T02:14:46.319142 | import six
import chainer
import chainer.functions as F
from chainer.functions.loss.vae import gaussian_kl_divergence
import chainer.links as L
class VAE(chainer.Chain):
"""Variational AutoEncoder"""
def __init__(self, n_in, n_latent, n_h):
super(VAE, self).__init__()
with self.init_scope():... |
lanpa/tensorboardX | https://github.com/lanpa/tensorboardX | null | null | null | null | 7,986 | null | null | mit | null | null | null | null | null | null | null | examples/create_wit_samples.py | null | null | null | null | null | null | Python | 2026-05-04T02:14:46.784733 |
"""
https://archive.ics.uci.edu/ml/datasets/Heart+Disease
1. #3 (age)
2. #4 (sex)
3. #9 (cp)
4. #10 (trestbps)
5. #12 (chol)
6. #16 (fbs)
7. #19 (restecg)
8. #32 (thalach)
9. #38 (exang)
10. #40 (oldpeak)
11. #41 (slope)
12. #44 (ca)
13. #51 (thal)
14. #58 (num) (the predicted attribute)
ex: ['62', '0', '1', '140', '... |
lanpa/tensorboardX | https://github.com/lanpa/tensorboardX | null | null | null | null | 7,986 | null | null | mit | null | null | null | null | null | null | null | examples/demo_beholder.py | null | null | null | null | null | null | Python | 2026-05-04T02:14:46.815064 | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the 'License');
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... |
lanpa/tensorboardX | https://github.com/lanpa/tensorboardX | null | null | null | null | 7,986 | null | null | mit | null | null | null | null | null | null | null | examples/demo_embedding.py | null | null | null | null | null | null | Python | 2026-05-04T02:14:46.839234 | import torch
import torch.nn as nn
import torch.nn.functional as F
import os
from torch.autograd.variable import Variable
from tensorboardX import SummaryWriter
from torch.utils.data import TensorDataset, DataLoader
# EMBEDDING VISUALIZATION FOR A TWO-CLASSES PROBLEM
# just a bunch of layers
class M(nn.Module):
... |
lanpa/tensorboardX | https://github.com/lanpa/tensorboardX | null | null | null | null | 7,986 | null | null | mit | null | null | null | null | null | null | null | examples/demo_global_writer.py | null | null | null | null | null | null | Python | 2026-05-04T02:14:46.846274 | # This program show that you can use summary writer globally
# So that you can use the writer like the python.logging module
# This file triggers global_1 and global_2 to do their job.
import global_1
import time
time.sleep(2)
import global_2
|
lanpa/tensorboardX | https://github.com/lanpa/tensorboardX | null | null | null | null | 7,986 | null | null | mit | null | null | null | null | null | null | null | examples/demo_graph.py | null | null | null | null | null | null | Python | 2026-05-04T02:14:46.850015 | import torch
import torch.nn as nn
import torch.nn.functional as F
import torchvision
from torch.autograd import Variable
from tensorboardX import SummaryWriter
dummy_input = (torch.zeros(1, 3),)
class LinearInLinear(nn.Module):
def __init__(self):
super(LinearInLinear, self).__init__()
self.l = ... |
lanpa/tensorboardX | https://github.com/lanpa/tensorboardX | null | null | null | null | 7,986 | null | null | mit | null | null | null | null | null | null | null | examples/demo_custom_scalars.py | null | null | null | null | null | null | Python | 2026-05-04T02:14:46.855831 | from numpy.random import rand
from tensorboardX import SummaryWriter
import time
with SummaryWriter() as writer:
for n_iter in range(100):
writer.add_scalar('twse/0050', rand(), n_iter)
writer.add_scalar('twse/2330', rand(), n_iter)
t = rand()
writer.add_scalar('dow/aaa', t, n_iter... |
lanpa/tensorboardX | https://github.com/lanpa/tensorboardX | null | null | null | null | 7,986 | null | null | mit | null | null | null | null | null | null | null | examples/demo.py | null | null | null | null | null | null | Python | 2026-05-04T02:14:46.868621 | import torch
import torchvision.utils as vutils
import numpy as np
import torchvision.models as models
from torchvision import datasets
from tensorboardX import SummaryWriter
import datetime
try:
import soundfile
skip_audio = False
except ImportError:
skip_audio = True
resnet18 = models.resnet18(weights=N... |
lanpa/tensorboardX | https://github.com/lanpa/tensorboardX | null | null | null | null | 7,986 | null | null | mit | null | null | null | null | null | null | null | examples/demo_comet.py | null | null | null | null | null | null | Python | 2026-05-04T02:14:46.878886 | from tensorboardX import SummaryWriter
import torch
import torchvision.utils as vutils
import numpy as np
import torchvision.models as models
from torchvision import datasets
import datetime
try:
import soundfile
skip_audio = False
except ImportError:
skip_audio = True
resnet18 = models.resnet18(False)
wr... |
lanpa/tensorboardX | https://github.com/lanpa/tensorboardX | null | null | null | null | 7,986 | null | null | mit | null | null | null | null | null | null | null | examples/demo_hparams.py | null | null | null | null | null | null | Python | 2026-05-04T02:14:46.896954 | from tensorboardX import SummaryWriter
import time
import random
hparam = {'lr': [0.1, 0.01, 0.001],
'bsize': [1, 2, 4],
'n_hidden': [100, 200],
'bn': [True, False]}
metrics = {'accuracy', 'loss'}
def train(lr, bsize, n_hidden):
x = random.random()
return x, x*5
i = 0
with Sum... |
lanpa/tensorboardX | https://github.com/lanpa/tensorboardX | null | null | null | null | 7,986 | null | null | mit | null | null | null | null | null | null | null | examples/demo_hogwild.py | null | null | null | null | null | null | Python | 2026-05-04T02:14:46.897482 | from __future__ import print_function
import argparse
import os
import torch
import torch.optim as optim
import torch.nn as nn
import torch.nn.functional as F
import torch.multiprocessing as mp
from torchvision import datasets, transforms
from tensorboardX import GlobalSummaryWriter
# Training settings
parser = argpa... |
lanpa/tensorboardX | https://github.com/lanpa/tensorboardX | null | null | null | null | 7,986 | null | null | mit | null | null | null | null | null | null | null | examples/demo_mesh.py | null | null | null | null | null | null | Python | 2026-05-04T02:14:47.397301 | import numpy as np
from tensorboardX import SummaryWriter
from numpy.random import randint
def draw_fusilli(turns, radius, omega):
points = []
faces = []
colors = []
for t in range(turns):
for theta in np.linspace(0, 2 * np.pi, 100, endpoint=False):
z = (theta + 2 * np.pi * t) * om... |
lanpa/tensorboardX | https://github.com/lanpa/tensorboardX | null | null | null | null | 7,986 | null | null | mit | null | null | null | null | null | null | null | examples/demo_multiprocessing.py | null | null | null | null | null | null | Python | 2026-05-04T02:14:47.416544 | from tensorboardX import GlobalSummaryWriter
import multiprocessing as mp
import time
import os
import psutil
import torch
import numpy as np
w = GlobalSummaryWriter()
def train3():
for i in range(100):
w.add_scalar('many_write_in_func', np.random.randn())
time.sleep(0.01*np.random.randint(0, 10)... |
lanpa/tensorboardX | https://github.com/lanpa/tensorboardX | null | null | null | null | 7,986 | null | null | mit | null | null | null | null | null | null | null | examples/demo_nvidia_smi.py | null | null | null | null | null | null | Python | 2026-05-04T02:14:47.418504 | """
write gpu and (gpu) memory usage of nvidia cards as scalar
"""
from tensorboardX import SummaryWriter
import time
import torch
try:
import nvidia_smi
nvidia_smi.nvmlInit()
handle = nvidia_smi.nvmlDeviceGetHandleByIndex(0) # gpu0
except ImportError:
print('This demo needs nvidia-ml-py or nvidia-ml-p... |
lanpa/tensorboardX | https://github.com/lanpa/tensorboardX | null | null | null | null | 7,986 | null | null | mit | null | null | null | null | null | null | null | examples/demo_matplotlib.py | null | null | null | null | null | null | Python | 2026-05-04T02:14:47.419511 | import matplotlib.pyplot as plt
plt.switch_backend('agg')
fig = plt.figure()
c1 = plt.Circle((0.2, 0.5), 0.2, color='r')
c2 = plt.Circle((0.8, 0.5), 0.2, color='r')
ax = plt.gca()
ax.add_patch(c1)
ax.add_patch(c2)
plt.axis('scaled')
from tensorboardX import SummaryWriter
writer = SummaryWriter()
writer.add_figure(... |
lanpa/tensorboardX | https://github.com/lanpa/tensorboardX | null | null | null | null | 7,986 | null | null | mit | null | null | null | null | null | null | null | examples/demo_multiple_embedding.py | null | null | null | null | null | null | Python | 2026-05-04T02:14:47.434890 | import math
import numpy as np
from tensorboardX import SummaryWriter
def main():
degrees = np.linspace(0, 3600 * math.pi / 180.0, 3600)
degrees = degrees.reshape(3600, 1)
labels = ["%d" % (i) for i in range(0, 3600)]
with SummaryWriter() as writer:
# Maybe make a bunch of data that's always ... |
lanpa/tensorboardX | https://github.com/lanpa/tensorboardX | null | null | null | null | 7,986 | null | null | mit | null | null | null | null | null | null | null | examples/demo_openvino.py | null | null | null | null | null | null | Python | 2026-05-04T02:14:47.473563 | from tensorboardX import SummaryWriter
with SummaryWriter() as w:
# https://download.01.org/opencv/2019/open_model_zoo/R3/20190905_163000_models_bin/mobilenetv2-int8-sparse-v1-tf-0001/FP32/mobilenetv2-int8-sparse-v1-tf-0001.xml
w.add_openvino_graph('examples/mobilenetv2.xml')
|
lanpa/tensorboardX | https://github.com/lanpa/tensorboardX | null | null | null | null | 7,986 | null | null | mit | null | null | null | null | null | null | null | examples/demo_onnx.py | null | null | null | null | null | null | Python | 2026-05-04T02:14:47.474137 | from tensorboardX import SummaryWriter
import subprocess
zoo_address = 'https://onnxzoo.blob.core.windows.net/models/opset_8/mnist/mnist.tar.gz'
res = subprocess.call(['wget', '-nc', zoo_address])
assert res == 0, 'cannot download example onnx model from the zoo'
res = subprocess.call(['tar', 'xf', 'mnist.tar.gz', '-... |
lanpa/tensorboardX | https://github.com/lanpa/tensorboardX | null | null | null | null | 7,986 | null | null | mit | null | null | null | null | null | null | null | examples/global_1.py | null | null | null | null | null | null | Python | 2026-05-04T02:14:47.491191 | # called by demo_global_writer
from tensorboardX import GlobalSummaryWriter
writer = GlobalSummaryWriter.getSummaryWriter()
writer.add_text('my_log', 'greeting from global1')
for i in range(100):
writer.add_scalar('global1', i)
for i in range(100):
writer.add_scalar('common', i) |
lanpa/tensorboardX | https://github.com/lanpa/tensorboardX | null | null | null | null | 7,986 | null | null | mit | null | null | null | null | null | null | null | examples/demo_purge.py | null | null | null | null | null | null | Python | 2026-05-04T02:14:47.508768 | from time import sleep
from tensorboardX import SummaryWriter
with SummaryWriter(logdir='runs/purge') as w:
for i in range(100):
w.add_scalar('purgetest', i, i)
sleep(1.0)
with SummaryWriter(logdir='runs/purge', purge_step=42) as w:
# event 42~99 are removed (inclusively)
for i in range(42, 100):... |
lanpa/tensorboardX | https://github.com/lanpa/tensorboardX | null | null | null | null | 7,986 | null | null | mit | null | null | null | null | null | null | null | examples/global_2.py | null | null | null | null | null | null | Python | 2026-05-04T02:14:47.530823 | # called by demo_global_writer
from tensorboardX import GlobalSummaryWriter
writer = GlobalSummaryWriter.getSummaryWriter()
writer.add_text('my_log', 'greeting from global2')
for i in range(100):
writer.add_scalar('global2', i)
for i in range(100):
writer.add_scalar('common', i) |
lanpa/tensorboardX | https://github.com/lanpa/tensorboardX | null | null | null | null | 7,986 | null | null | mit | null | null | null | null | null | null | null | tensorboardX/comet_utils.py | null | null | null | null | null | null | Python | 2026-05-04T02:14:47.996562 | import functools
import json
import logging
from io import BytesIO
import numpy as np
from google.protobuf.json_format import MessageToJson
from .summary import _clean_tag
try:
import comet_ml
comet_installed = True
from PIL import Image
except ImportError:
comet_installed = False
logger = logging.ge... |
lanpa/tensorboardX | https://github.com/lanpa/tensorboardX | null | null | null | null | 7,986 | null | null | mit | null | null | null | null | null | null | null | tensorboardX/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:14:47.997881 | """A module for visualization with tensorboard
"""
from .global_writer import GlobalSummaryWriter
from .record_writer import RecordWriter
from .writer import FileWriter, SummaryWriter
try:
from ._version import __version__
except ImportError:
__version__ = "unknown version"
|
lanpa/tensorboardX | https://github.com/lanpa/tensorboardX | null | null | null | null | 7,986 | null | null | mit | null | null | null | null | null | null | null | tensorboardX/crc32c.py | null | null | null | null | null | null | Python | 2026-05-04T02:14:48.005572 | # https://www.ietf.org/rfc/rfc3309.txt
import array
import os
try:
if os.environ.get('CRC32C_SW_MODE', None) is None:
os.environ['CRC32C_SW_MODE'] = 'auto'
from crc32c import crc32c as _crc32c_native
except ImportError:
_crc32c_native = None
CRC_TABLE = (
0x00000000, 0xf26b8303, 0xe13b70f7, 0... |
lanpa/tensorboardX | https://github.com/lanpa/tensorboardX | null | null | null | null | 7,986 | null | null | mit | null | null | null | null | null | null | null | tensorboardX/event_file_writer.py | null | null | null | null | null | null | Python | 2026-05-04T02:14:48.017358 | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... |
lanpa/tensorboardX | https://github.com/lanpa/tensorboardX | null | null | null | null | 7,986 | null | null | mit | null | null | null | null | null | null | null | tensorboardX/embedding.py | null | null | null | null | null | null | Python | 2026-05-04T02:14:48.033697 | import os
import sys
# Maximum sprite size allowed by TB frontend,
# see https://github.com/lanpa/tensorboardX/issues/516
TB_MAX_SPRITE_SIZE = 8192
def maybe_upload_file(local_path):
'''Upload a file to remote cloud storage
if the path starts with gs:// or s3://
'''
if local_path.startswith(('s3://',... |
lanpa/tensorboardX | https://github.com/lanpa/tensorboardX | null | null | null | null | 7,986 | null | null | mit | null | null | null | null | null | null | null | tensorboardX/onnx_graph.py | null | null | null | null | null | null | Python | 2026-05-04T02:14:48.069407 | from .proto.attr_value_pb2 import AttrValue
from .proto.graph_pb2 import GraphDef
from .proto.node_def_pb2 import NodeDef
from .proto.tensor_shape_pb2 import TensorShapeProto
from .proto.versions_pb2 import VersionDef
def load_onnx_graph(fname):
import onnx
m = onnx.load(fname)
g = m.graph
return pars... |
lanpa/tensorboardX | https://github.com/lanpa/tensorboardX | null | null | null | null | 7,986 | null | null | mit | null | null | null | null | null | null | null | tensorboardX/global_writer.py | null | null | null | null | null | null | Python | 2026-05-04T02:14:48.080628 | import multiprocessing as mp
from multiprocessing import Value
from .writer import SummaryWriter
global _writer
_writer = None
class GlobalSummaryWriter:
"""A class that implements an event writer that supports concurrent logging and global logging across
different modules.
The GlobalSummaryWriter clas... |
lanpa/tensorboardX | https://github.com/lanpa/tensorboardX | null | null | null | null | 7,986 | null | null | mit | null | null | null | null | null | null | null | tensorboardX/openvino_graph.py | null | null | null | null | null | null | Python | 2026-05-04T02:14:48.111564 | from .proto.attr_value_pb2 import AttrValue
from .proto.graph_pb2 import GraphDef
from .proto.node_def_pb2 import NodeDef
from .proto.tensor_shape_pb2 import TensorShapeProto
from .proto.versions_pb2 import VersionDef
def load_openvino_graph(fname):
nodes = []
import xml.etree.ElementTree as ET
tree = ET... |
LibrePhotos/librephotos | https://github.com/LibrePhotos/librephotos | null | null | null | null | 7,983 | null | null | mit | null | null | null | null | null | null | null | apps/backend/api/autoalbum.py | null | null | null | null | null | null | Python | 2026-05-04T02:14:51.445131 | from datetime import datetime, timedelta
import numpy as np
import pytz
from django.db.models import Q
from api.models import (
AlbumAuto,
AlbumDate,
AlbumPlace,
AlbumThing,
AlbumUser,
Face,
File,
LongRunningJob,
Photo,
)
from api.util import logger
def regenerate_event_titles(us... |
LibrePhotos/librephotos | https://github.com/LibrePhotos/librephotos | null | null | null | null | 7,983 | null | null | mit | null | null | null | null | null | null | null | apps/backend/api/batch_jobs.py | null | null | null | null | null | null | Python | 2026-05-04T02:14:51.465235 | import os
from django.db.models import Q
from api import util
from api.image_similarity import build_image_similarity_index
from api.models.long_running_job import LongRunningJob
from api.models.photo import Photo
from api.semantic_search import create_clip_embeddings
def batch_calculate_clip_embedding(user):
i... |
LibrePhotos/librephotos | https://github.com/LibrePhotos/librephotos | null | null | null | null | 7,983 | null | null | mit | null | null | null | null | null | null | null | apps/backend/api/api_util.py | null | null | null | null | null | null | Python | 2026-05-04T02:14:51.466552 | import os
import random
import stat
from api.models import (
LongRunningJob,
Photo,
)
from api.serializers.job import LongRunningJobSerializer
from api.util import logger
def get_current_job():
job_detail = None
running_job = (
LongRunningJob.objects.filter(finished=False).order_by("-started_... |
LibrePhotos/librephotos | https://github.com/LibrePhotos/librephotos | null | null | null | null | 7,983 | null | null | mit | null | null | null | null | null | null | null | apps/backend/api/admin.py | null | null | null | null | null | null | Python | 2026-05-04T02:14:51.479141 | from django.contrib import admin
from django_q.tasks import AsyncTask
from api.util import FACE_OVERLAP_IOU_THRESHOLD, calculate_iou
from .models import (
AlbumAuto,
AlbumDate,
AlbumPlace,
AlbumThing,
AlbumUser,
Cluster,
Face,
File,
LongRunningJob,
Person,
Photo,
User,
... |
LibrePhotos/librephotos | https://github.com/LibrePhotos/librephotos | null | null | null | null | 7,983 | null | null | mit | null | null | null | null | null | null | null | apps/backend/api/cluster_manager.py | null | null | null | null | null | null | Python | 2026-05-04T02:14:51.480837 | import numpy as np
from api.models.cluster import UNKNOWN_CLUSTER_ID, Cluster, get_unknown_cluster
from api.models.face import Face
from api.models.person import Person, get_or_create_person
from api.models.user import User
from api.util import logger
class ClusterManager:
@staticmethod
def try_add_cluster(
... |
LibrePhotos/librephotos | https://github.com/LibrePhotos/librephotos | null | null | null | null | 7,983 | null | null | mit | null | null | null | null | null | null | null | apps/backend/api/burst_detection_rules.py | null | null | null | null | null | null | Python | 2026-05-04T02:14:51.482018 | """
Burst detection rules module for grouping photos taken in rapid succession.
This module provides a rules-based system for detecting burst sequences,
following the same pattern as date_time_extractor.py. Rules are stored
as JSON in each user's profile and applied sequentially.
Rules are divided into two categories... |
LibrePhotos/librephotos | https://github.com/LibrePhotos/librephotos | null | null | null | null | 7,983 | null | null | mit | null | null | null | null | null | null | null | apps/backend/api/background_tasks.py | null | null | null | null | null | null | Python | 2026-05-04T02:14:51.493304 | from tqdm import tqdm
from django.db import models
from api.models import Photo
from api.models.photo_caption import PhotoCaption
from api.util import logger
def generate_captions(overwrite=False):
if overwrite:
photos = Photo.objects.all()
else:
# Find photos that don't have search captions ... |
LibrePhotos/librephotos | https://github.com/LibrePhotos/librephotos | null | null | null | null | 7,983 | null | null | mit | null | null | null | null | null | null | null | apps/backend/api/all_tasks.py | null | null | null | null | null | null | Python | 2026-05-04T02:14:51.523030 | import io
import os
import zipfile
from django.conf import settings
from django.utils import timezone
from django_q.tasks import AsyncTask, schedule
from api import util
from api.models.long_running_job import LongRunningJob
def create_download_job(job_type, user, photos, filename):
lrj = LongRunningJob.create_... |
LibrePhotos/librephotos | https://github.com/LibrePhotos/librephotos | null | null | null | null | 7,983 | null | null | mit | null | null | null | null | null | null | null | apps/backend/api/apps.py | null | null | null | null | null | null | Python | 2026-05-04T02:14:51.556397 | import logging
from django.apps import AppConfig
logger = logging.getLogger(__name__)
class ApiConfig(AppConfig):
name = "api"
verbose_name = "LibrePhotos"
def ready(self):
from api.util import reconfigure_logging
try:
reconfigure_logging()
except Exception:
... |
LibrePhotos/librephotos | https://github.com/LibrePhotos/librephotos | null | null | null | null | 7,983 | null | null | mit | null | null | null | null | null | null | null | apps/backend/api/date_time_extractor.py | null | null | null | null | null | null | Python | 2026-05-04T02:14:52.074002 | import json
import math
import os
import pathlib
import re
from datetime import datetime
import pytz
from api.metadata.tags import Tags
from api.util import logger
def _regexp_group_range(a, b):
return "(" + "|".join(f"{i:02}" for i in range(a, b)) + ")"
_REGEXP_GROUP_YEAR = r"((?:19|20|21)\d\d)"
_REGEXP_GROU... |
LibrePhotos/librephotos | https://github.com/LibrePhotos/librephotos | null | null | null | null | 7,983 | null | null | mit | null | null | null | null | null | null | null | apps/backend/api/directory_watcher/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:14:52.081091 | """
Directory watcher module for scanning and processing photos.
This module implements a two-phase scan architecture to avoid race conditions
when processing RAW+JPEG pairs concurrently:
Phase 1: Collect all files and group by (directory, basename)
- IMG_001.jpg, IMG_001.CR2, IMG_001.xmp -> one group
... |
LibrePhotos/librephotos | https://github.com/LibrePhotos/librephotos | null | null | null | null | 7,983 | null | null | mit | null | null | null | null | null | null | null | apps/backend/api/color_palettes.py | null | null | null | null | null | null | Python | 2026-05-04T02:14:52.083842 | from colorsys import hls_to_rgb
DEEP_PALETTE = [
"#4c72b0",
"#dd8452",
"#55a868",
"#c44e52",
"#8172b3",
"#937860",
"#da8bc3",
"#8c8c8c",
"#ccb974",
"#64b5cd",
]
PAIRED_PALETTE = [
"#a6cee3",
"#1f78b4",
"#b2df8a",
"#33a02c",
"#fb9a99",
"#e31a1c",
"#fd... |
LibrePhotos/librephotos | https://github.com/LibrePhotos/librephotos | null | null | null | null | 7,983 | null | null | mit | null | null | null | null | null | null | null | apps/backend/api/directory_watcher/file_grouping.py | null | null | null | null | null | null | Python | 2026-05-04T02:14:52.099531 | """
File grouping utilities for the two-phase scan architecture.
This module provides functions for grouping related files (RAW+JPEG pairs,
Live Photos, etc.) so they can be processed together as a single Photo.
"""
import os
from api.models import File, Photo
# JPEG/image extensions that RAW files can be paired w... |
LibrePhotos/librephotos | https://github.com/LibrePhotos/librephotos | null | null | null | null | 7,983 | null | null | mit | null | null | null | null | null | null | null | apps/backend/api/directory_watcher/repair_jobs.py | null | null | null | null | null | null | Python | 2026-05-04T02:14:52.126189 | """
Repair jobs for fixing ungrouped file variants.
This module contains jobs that repair data inconsistencies, such as
RAW files that weren't properly grouped with their JPEG counterparts
due to race conditions in previous scans.
"""
from uuid import UUID
from api import util
from api.models import File, LongRunnin... |
LibrePhotos/librephotos | https://github.com/LibrePhotos/librephotos | null | null | null | null | 7,983 | null | null | mit | null | null | null | null | null | null | null | apps/backend/api/directory_watcher/scan_jobs.py | null | null | null | null | null | null | Python | 2026-05-04T02:14:52.138257 | """
Main scan jobs for photo discovery and processing.
This module contains the core scan_photos function that implements the
two-phase scan architecture to avoid race conditions with RAW+JPEG grouping.
"""
import datetime
import os
import uuid
from collections import defaultdict
from uuid import UUID
import pytz
fr... |
LibrePhotos/librephotos | https://github.com/LibrePhotos/librephotos | null | null | null | null | 7,983 | null | null | mit | null | null | null | null | null | null | null | apps/backend/api/directory_watcher/utils.py | null | null | null | null | null | null | Python | 2026-05-04T02:14:52.168263 | """
Utility functions for directory scanning and job management.
"""
import os
import stat
from constance import config as site_config
from django.db.models import F
from django.utils import timezone
from api.models import LongRunningJob
# How often (in loop iterations) to check the DB for job cancellation.
# Lower... |
LibrePhotos/librephotos | https://github.com/LibrePhotos/librephotos | null | null | null | null | 7,983 | null | null | mit | null | null | null | null | null | null | null | apps/backend/api/drf_optimize.py | null | null | null | null | null | null | Python | 2026-05-04T02:14:52.186071 | from django.db import ProgrammingError, models
from django.db.models.constants import LOOKUP_SEP
from django.db.models.query import normalize_prefetch_lookups
from rest_framework import serializers
from rest_framework.utils import model_meta
class OptimizeRelatedModelViewSetMetaclass(type):
"""This metaclass opti... |
LibrePhotos/librephotos | https://github.com/LibrePhotos/librephotos | null | null | null | null | 7,983 | null | null | mit | null | null | null | null | null | null | null | apps/backend/api/directory_watcher/file_handlers.py | null | null | null | null | null | null | Python | 2026-05-04T02:14:52.236154 | """
File and Photo creation handlers.
This module contains functions for creating File records and grouping
them into Photo objects.
"""
import datetime
import os
import pytz
from django.conf import settings
from django.db.models import Q
from api import util
from api.models import File, Photo, Thumbnail
from api.m... |
LibrePhotos/librephotos | https://github.com/LibrePhotos/librephotos | null | null | null | null | 7,983 | null | null | mit | null | null | null | null | null | null | null | apps/backend/api/directory_watcher/processing_jobs.py | null | null | null | null | null | null | Python | 2026-05-04T02:14:52.238003 | """
Photo processing jobs (tags, geolocation, faces).
These jobs run after the main scan to enrich photos with additional
metadata like location information, image tags, and face detection.
"""
import traceback
import uuid
from uuid import UUID
from django import db
from django.db.models import Q
from django_q.tasks... |
LibrePhotos/librephotos | https://github.com/LibrePhotos/librephotos | null | null | null | null | 7,983 | null | null | mit | null | null | null | null | null | null | null | apps/backend/api/face_classify.py | null | null | null | null | null | null | Python | 2026-05-04T02:14:52.658595 | import datetime
import uuid
import numpy as np
from bulk_update.helper import bulk_update
from django.core.paginator import Paginator
from django.db.models import Q
from django_q.tasks import AsyncTask
from hdbscan import HDBSCAN
from sklearn.decomposition import PCA
from sklearn.neural_network import MLPClassifier
f... |
LibrePhotos/librephotos | https://github.com/LibrePhotos/librephotos | null | null | null | null | 7,983 | null | null | mit | null | null | null | null | null | null | null | apps/backend/api/face_recognition.py | null | null | null | null | null | null | Python | 2026-05-04T02:14:52.681847 | import html
import re
from html.parser import HTMLParser
import numpy as np
import requests
from constance import config as site_config
class _HTMLTextExtractor(HTMLParser):
"""Minimal HTML parser that collects visible text content."""
def __init__(self):
super().__init__()
self._parts = []
... |
LibrePhotos/librephotos | https://github.com/LibrePhotos/librephotos | null | null | null | null | 7,983 | null | null | mit | null | null | null | null | null | null | null | apps/backend/api/face_extractor.py | null | null | null | null | null | null | Python | 2026-05-04T02:14:52.698049 | import numpy as np
import PIL
from api.face_recognition import get_face_locations
from api.metadata.reader import get_metadata
from api.metadata.tags import Tags
from api.util import is_number, logger
def extract_from_exif(image_path, big_thumbnail_image_path):
(region_info, orientation) = get_metadata(
... |
LibrePhotos/librephotos | https://github.com/LibrePhotos/librephotos | null | null | null | null | 7,983 | null | null | mit | null | null | null | null | null | null | null | apps/backend/api/feature/tests/test_embedded_media.py | null | null | null | null | null | null | Python | 2026-05-04T02:14:53.082451 | import os
from django.conf import settings
from django.test import override_settings
from rest_framework.test import APIClient, APITestCase
from api.models import User
from api.models.file import File
from api.stacks.live_photo import (
GOOGLE_PIXEL_MP4_SIGNATURES,
JPEG_EOI_MARKER,
SAMSUNG_MOTION_MARKER,
... |
LibrePhotos/librephotos | https://github.com/LibrePhotos/librephotos | null | null | null | null | 7,983 | null | null | mit | null | null | null | null | null | null | null | apps/backend/api/filters.py | null | null | null | null | null | null | Python | 2026-05-04T02:14:53.166673 | import datetime
import operator
from functools import reduce
from django.db.models import Q
from rest_framework import filters
from api import util
from api.image_similarity import search_similar_embedding
from api.semantic_search import calculate_query_embeddings
class SemanticSearchFilter(filters.SearchFilter):
... |
LibrePhotos/librephotos | https://github.com/LibrePhotos/librephotos | null | null | null | null | 7,983 | null | null | mit | null | null | null | null | null | null | null | apps/backend/api/geocode/config.py | null | null | null | null | null | null | Python | 2026-05-04T02:14:53.296272 | from constance import config as settings
from .parsers.mapbox import parse as parse_mapbox
from .parsers.nominatim import parse as parse_nominatim
from .parsers.opencage import parse as parse_opencage
from .parsers.tomtom import parse as parse_tomtom
def _get_config():
return {
"mapbox": {
"g... |
LibrePhotos/librephotos | https://github.com/LibrePhotos/librephotos | null | null | null | null | 7,983 | null | null | mit | null | null | null | null | null | null | null | apps/backend/api/duplicate_detection.py | null | null | null | null | null | null | Python | 2026-05-04T02:14:53.598195 | """
Duplicate detection module for finding duplicate photos.
Handles two types of duplicates:
- EXACT_COPY: Files with identical MD5 hash (byte-for-byte copies)
- VISUAL_DUPLICATE: Photos with similar perceptual hash
This is separate from stack detection (RAW+JPEG pairs, bursts, etc.)
because duplicates are about sto... |
LibrePhotos/librephotos | https://github.com/LibrePhotos/librephotos | null | null | null | null | 7,983 | null | null | mit | null | null | null | null | null | null | null | apps/backend/api/geocode/parsers/nominatim.py | null | null | null | null | null | null | Python | 2026-05-04T02:14:53.620015 | from api.geocode import GEOCODE_VERSION
def parse(location):
data = location.raw["address"]
props = [
"road",
"town",
"neighbourhood",
"suburb",
"hamlet",
"borough",
"city",
"county",
"state",
"country",
]
places = [data[p... |
LibrePhotos/librephotos | https://github.com/LibrePhotos/librephotos | null | null | null | null | 7,983 | null | null | mit | null | null | null | null | null | null | null | apps/backend/api/geocode/parsers/opencage.py | null | null | null | null | null | null | Python | 2026-05-04T02:14:53.680423 | from api.geocode import GEOCODE_VERSION
def parse(location):
data = location.raw["components"]
center = [location.raw["geometry"]["lat"], location.raw["geometry"]["lng"]]
props = [
data["_type"],
"road",
"suburb",
"municipality",
"hamlet",
"towncity",
... |
LibrePhotos/librephotos | https://github.com/LibrePhotos/librephotos | null | null | null | null | 7,983 | null | null | mit | null | null | null | null | null | null | null | apps/backend/api/image_captioning.py | null | null | null | null | null | null | Python | 2026-05-04T02:14:53.861817 | import requests
from constance import config as site_config
def generate_caption(image_path, blip=False, prompt=None):
# Check if Moondream is selected as captioning model
if site_config.CAPTIONING_MODEL == "moondream":
# Use custom prompt if provided, otherwise use default caption prompt
if p... |
LibrePhotos/librephotos | https://github.com/LibrePhotos/librephotos | null | null | null | null | 7,983 | null | null | mit | null | null | null | null | null | null | null | apps/backend/api/llm.py | null | null | null | null | null | null | Python | 2026-05-04T02:14:53.863566 | import requests
import base64
import io
from PIL import Image
from constance import config as site_config
def image_to_base64_data_uri(image_path):
"""Convert image file to base64 data URI, converting to JPEG for compatibility"""
try:
# Open image with PIL and convert to RGB (handles WebP, PNG with tr... |
LibrePhotos/librephotos | https://github.com/LibrePhotos/librephotos | null | null | null | null | 7,983 | null | null | mit | null | null | null | null | null | null | null | apps/backend/api/geocode/parsers/tomtom.py | null | null | null | null | null | null | Python | 2026-05-04T02:14:53.913259 | from functools import reduce
from api.geocode import GEOCODE_VERSION
def _dedup(iterable):
unique_items = set()
def reducer(acc, item):
if item not in unique_items:
unique_items.add(item)
acc.append(item)
return acc
return reduce(reducer, iterable, [])
def pars... |
LibrePhotos/librephotos | https://github.com/LibrePhotos/librephotos | null | null | null | null | 7,983 | null | null | mit | null | null | null | null | null | null | null | apps/backend/api/image_similarity.py | null | null | null | null | null | null | Python | 2026-05-04T02:14:53.950164 | from datetime import datetime
import numpy as np
import requests
from django.conf import settings
from django.core.paginator import Paginator
from django.db.models import Q
from api.models import Photo
from api.util import logger
def search_similar_embedding(user, emb, result_count=100, threshold=27):
if isinst... |
LibrePhotos/librephotos | https://github.com/LibrePhotos/librephotos | null | null | null | null | 7,983 | null | null | mit | null | null | null | null | null | null | null | apps/backend/api/management/commands/build_similarity_index.py | null | null | null | null | null | null | Python | 2026-05-04T02:14:54.280540 | from django.core.management.base import BaseCommand
from django_q.tasks import AsyncTask
from api.image_similarity import build_image_similarity_index
from api.models import User
class Command(BaseCommand):
help = "Build image similarity index for all users"
def handle(self, *args, **kwargs):
for us... |
LibrePhotos/librephotos | https://github.com/LibrePhotos/librephotos | null | null | null | null | 7,983 | null | null | mit | null | null | null | null | null | null | null | apps/backend/api/management/commands/clear_cache.py | null | null | null | null | null | null | Python | 2026-05-04T02:14:54.341306 | from django.conf import settings
from django.core.cache import cache
from django.core.management.base import BaseCommand, CommandError
class Command(BaseCommand):
"""A simple management command which clears the site-wide cache."""
help = "Fully clear your site-wide cache."
def handle(self, *args, **kwar... |
LibrePhotos/librephotos | https://github.com/LibrePhotos/librephotos | null | null | null | null | 7,983 | null | null | mit | null | null | null | null | null | null | null | apps/backend/api/management/commands/createadmin.py | null | null | null | null | null | null | Python | 2026-05-04T02:14:54.412815 | import os
import sys
from django.core.management.base import BaseCommand, CommandError
from django.core.validators import ValidationError, validate_email
from api.models import User
class Command(BaseCommand):
help = "Create a LibrePhotos user with administrative permissions"
def add_arguments(self, parser... |
LibrePhotos/librephotos | https://github.com/LibrePhotos/librephotos | null | null | null | null | 7,983 | null | null | mit | null | null | null | null | null | null | null | apps/backend/api/management/commands/createuser.py | null | null | null | null | null | null | Python | 2026-05-04T02:14:54.462209 | import os
import sys
from django.core.management.base import BaseCommand, CommandError
from django.core.validators import ValidationError, validate_email
from api.models import User
class Command(BaseCommand):
help = "Create a LibrePhotos user"
def add_arguments(self, parser):
parser.add_argument("... |
LibrePhotos/librephotos | https://github.com/LibrePhotos/librephotos | null | null | null | null | 7,983 | null | null | mit | null | null | null | null | null | null | null | apps/backend/api/management/commands/save_metadata.py | null | null | null | null | null | null | Python | 2026-05-04T02:14:54.586157 | from django.core.management.base import BaseCommand
from api.models import Photo, User
class Command(BaseCommand):
help = "Save metadata to image files (or XMP sidecar files)"
def add_arguments(self, parser):
parser.add_argument(
"--types",
nargs="+",
choices=["ra... |
LibrePhotos/librephotos | https://github.com/LibrePhotos/librephotos | null | null | null | null | 7,983 | null | null | mit | null | null | null | null | null | null | null | apps/backend/api/management/commands/scan.py | null | null | null | null | null | null | Python | 2026-05-04T02:14:54.654081 | import traceback
import uuid
from django.core.management.base import BaseCommand
from api.directory_watcher import scan_photos
from api.models import User
from api.models.user import get_deleted_user
from nextcloud.directory_watcher import scan_photos as scan_photos_nextcloud
class Command(BaseCommand):
help = ... |
LibrePhotos/librephotos | https://github.com/LibrePhotos/librephotos | null | null | null | null | 7,983 | null | null | mit | null | null | null | null | null | null | null | apps/backend/api/management/commands/start_cleaning_service.py | null | null | null | null | null | null | Python | 2026-05-04T02:14:54.887892 | from django.core.management.base import BaseCommand
from django_q.models import Schedule
from django_q.tasks import schedule
from api.util import logger
class Command(BaseCommand):
help = "Start the cleanup service."
def handle(self, *args, **kwargs):
if not Schedule.objects.filter(
func... |
LibrePhotos/librephotos | https://github.com/LibrePhotos/librephotos | null | null | null | null | 7,983 | null | null | mit | null | null | null | null | null | null | null | apps/backend/api/management/commands/start_service.py | null | null | null | null | null | null | Python | 2026-05-04T02:14:54.959738 | from django.core.management.base import BaseCommand
from django_q.models import Schedule
from django_q.tasks import schedule
from api.services import SERVICES, start_service
class Command(BaseCommand):
help = "Start one of the services."
# Define all the services that can be started
def add_arguments(se... |
LibrePhotos/librephotos | https://github.com/LibrePhotos/librephotos | null | null | null | null | 7,983 | null | null | mit | null | null | null | null | null | null | null | apps/backend/api/metadata/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:14:54.999635 | # api/metadata — organized metadata reading, writing, and tag constants.
#
# Submodules:
# api.metadata.tags — Tag name constants (Tags class)
# api.metadata.reader — get_metadata(), sidecar file helpers
# api.metadata.writer — write_metadata()
# api.metadata.face_regions — face region c... |
LibrePhotos/librephotos | https://github.com/LibrePhotos/librephotos | null | null | null | null | 7,983 | null | null | mit | null | null | null | null | null | null | null | apps/backend/api/management/commands/start_job_cleanup_service.py | null | null | null | null | null | null | Python | 2026-05-04T02:14:55.020445 | from django.core.management.base import BaseCommand
from django_q.models import Schedule
from django_q.tasks import schedule
from api.util import logger
class Command(BaseCommand):
help = "Start the job cleanup service to mark stuck jobs as failed and remove old completed jobs."
def handle(self, *args, **kw... |
LibrePhotos/librephotos | https://github.com/LibrePhotos/librephotos | null | null | null | null | 7,983 | null | null | mit | null | null | null | null | null | null | null | apps/backend/api/geocode/geocode.py | null | null | null | null | null | null | Python | 2026-05-04T02:14:58.255394 | from typing import List
import geopy
from constance import config as site_config
from api import util
from .config import get_provider_config, get_provider_parser
class Geocode:
def __init__(self, provider):
self._provider_config = get_provider_config(provider)
self._parser = get_provider_parse... |
LibrePhotos/librephotos | https://github.com/LibrePhotos/librephotos | null | null | null | null | 7,983 | null | null | mit | null | null | null | null | null | null | null | apps/backend/api/geocode/parsers/mapbox.py | null | null | null | null | null | null | Python | 2026-05-04T02:14:58.449526 | from api.geocode import GEOCODE_VERSION
def parse(location):
context = location.raw["context"]
center = [location.raw["center"][1], location.raw["center"][0]]
local_name = location.raw["text"]
places = [local_name] + [
i["text"] for i in context if not i["id"].startswith("post")
]
retu... |
wanshuiyin/Auto-claude-code-research-in-sleep | https://github.com/wanshuiyin/Auto-claude-code-research-in-sleep | null | null | null | null | 7,979 | null | null | mit | null | null | null | null | null | null | null | mcp-servers/claude-review/server.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:01.050543 | #!/usr/bin/env python3
"""Claude review MCP server for Codex-first ARIS workflows.
This server exposes a narrow review-only interface over Claude Code CLI so
Codex can remain the executor while Claude acts as the external reviewer.
"""
from __future__ import annotations
import json
import os
import shutil
import sub... |
wanshuiyin/Auto-claude-code-research-in-sleep | https://github.com/wanshuiyin/Auto-claude-code-research-in-sleep | null | null | null | null | 7,979 | null | null | mit | null | null | null | null | null | null | null | tests/_llm_chat_helpers.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:01.076530 | """
Helper module that extracts testable functions from llm-chat/server.py
without triggering the module-level sys.stdout/stdin manipulation.
"""
import os
import httpx
import tempfile
LLM_API_KEY = os.environ.get("LLM_API_KEY", "")
BASE_URL = os.environ.get("LLM_BASE_URL", "https://api.openai.com/v1")
DEFAULT_MODEL ... |
wanshuiyin/Auto-claude-code-research-in-sleep | https://github.com/wanshuiyin/Auto-claude-code-research-in-sleep | null | null | null | null | 7,979 | null | null | mit | null | null | null | null | null | null | null | mcp-servers/codex-image2/server.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:01.077215 | #!/usr/bin/env python3
"""Codex app-server image bridge for Claude-first ARIS workflows.
This server exposes a narrow MCP interface that asks the local Codex desktop
app to generate an image through the app-server path. It is intentionally kept
small and dependency-free so users can copy it into `~/.claude/mcp-servers... |
wanshuiyin/Auto-claude-code-research-in-sleep | https://github.com/wanshuiyin/Auto-claude-code-research-in-sleep | null | null | null | null | 7,979 | null | null | mit | null | null | null | null | null | null | null | mcp-servers/feishu-bridge/server.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:01.088465 | #!/usr/bin/env python3
"""
Feishu Bridge Server — provides HTTP API for ARIS skills to send messages
to Feishu and poll for user replies.
Endpoints:
POST /send — send a card message to Feishu user, return message_id
GET /poll — wait for user reply (long-poll with timeout)
GET /health — health check
Requ... |
wanshuiyin/Auto-claude-code-research-in-sleep | https://github.com/wanshuiyin/Auto-claude-code-research-in-sleep | null | null | null | null | 7,979 | null | null | mit | null | null | null | null | null | null | null | mcp-servers/minimax-chat/server.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:01.097832 | #!/usr/bin/env python3
"""MiniMax Chat MCP Server - A robust MCP server that calls MiniMax Chat Completions API"""
import json
import os
import sys
import tempfile
import httpx
# Force unbuffered stdout/stdin
sys.stdout = os.fdopen(sys.stdout.fileno(), 'wb', buffering=0)
sys.stdin = os.fdopen(sys.stdin.fileno(), 'rb'... |
wanshuiyin/Auto-claude-code-research-in-sleep | https://github.com/wanshuiyin/Auto-claude-code-research-in-sleep | null | null | null | null | 7,979 | null | null | mit | null | null | null | null | null | null | null | mcp-servers/llm-chat/server.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:01.100273 | #!/usr/bin/env python3
"""Generic LLM Chat MCP Server - Supports any OpenAI-compatible API
Environment Variables:
LLM_API_KEY - API key (required)
LLM_BASE_URL - API base URL (default: https://api.openai.com/v1)
LLM_MODEL - Model name (default: gpt-4o)
LLM_FALLBACK_MODEL - Fal... |
wanshuiyin/Auto-claude-code-research-in-sleep | https://github.com/wanshuiyin/Auto-claude-code-research-in-sleep | null | null | null | null | 7,979 | null | null | mit | null | null | null | null | null | null | null | tests/_minimax_helpers.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:01.133825 | """
Helper module that extracts testable functions from minimax-chat/server.py
without triggering the module-level sys.stdout/stdin manipulation.
"""
import os
import httpx
import tempfile
MINIMAX_API_KEY = os.environ.get("MINIMAX_API_KEY", "")
MINIMAX_BASE_URL = os.environ.get("MINIMAX_BASE_URL", "https://api.minima... |
wanshuiyin/Auto-claude-code-research-in-sleep | https://github.com/wanshuiyin/Auto-claude-code-research-in-sleep | null | null | null | null | 7,979 | null | null | mit | null | null | null | null | null | null | null | tests/_feishu_bridge_helpers.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:01.156619 | """
Helper module that extracts testable functions from feishu-bridge/server.py
without requiring lark-oapi to be installed or real Feishu credentials.
Only the pure-logic pieces (reply store management, HTTP handler helpers)
are reproduced here so tests can import them cleanly.
"""
import json
import threading
# --... |
wanshuiyin/Auto-claude-code-research-in-sleep | https://github.com/wanshuiyin/Auto-claude-code-research-in-sleep | null | null | null | null | 7,979 | null | null | mit | null | null | null | null | null | null | null | mcp-servers/gemini-review/server.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:01.158411 | #!/usr/bin/env python3
"""Gemini review MCP server for Codex-first workflows.
This server mirrors the narrow review-only interface used by the existing
review bridges, but defaults to the direct Gemini API so Codex can reuse the
original ARIS review-heavy skill structure with minimal changes. Gemini CLI is
kept only a... |
wanshuiyin/Auto-claude-code-research-in-sleep | https://github.com/wanshuiyin/Auto-claude-code-research-in-sleep | null | null | null | null | 7,979 | null | null | mit | null | null | null | null | null | null | null | tests/test_codex_skill_mirror.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:01.680391 | from __future__ import annotations
import re
from pathlib import Path
REPO_ROOT = Path(__file__).resolve().parents[1]
MAIN_SKILLS = REPO_ROOT / "skills"
CODEX_SKILLS = REPO_ROOT / "skills" / "skills-codex"
CLAUDE_OVERLAY = REPO_ROOT / "skills" / "skills-codex-claude-review"
GEMINI_OVERLAY = REPO_ROOT / "skills" / "s... |
wanshuiyin/Auto-claude-code-research-in-sleep | https://github.com/wanshuiyin/Auto-claude-code-research-in-sleep | null | null | null | null | 7,979 | null | null | mit | null | null | null | null | null | null | null | tests/test_codex_image2_server.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:01.689294 | """Unit tests for the experimental codex-image2 MCP bridge."""
from __future__ import annotations
import importlib.util
import json
import subprocess
import tempfile
import unittest
from pathlib import Path
from unittest import mock
ROOT = Path(__file__).resolve().parent.parent
SERVER_PATH = ROOT / "mcp-servers" / ... |
wanshuiyin/Auto-claude-code-research-in-sleep | https://github.com/wanshuiyin/Auto-claude-code-research-in-sleep | null | null | null | null | 7,979 | null | null | mit | null | null | null | null | null | null | null | tests/test_feishu_bridge_server.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:01.693959 | #!/usr/bin/env python3
"""Unit tests for mcp-servers/feishu-bridge/server.py.
Tests cover the pure-Python logic in the bridge server:
- Reply store management (receive_reply, poll_reply)
- Card payload construction
- Query-string parsing used by the HTTP handler
- HTTP handler routing (via a lightweight fake handler)
... |
wanshuiyin/Auto-claude-code-research-in-sleep | https://github.com/wanshuiyin/Auto-claude-code-research-in-sleep | null | null | null | null | 7,979 | null | null | mit | null | null | null | null | null | null | null | tests/test_exa_search.py | null | null | null | null | null | null | Python | 2026-05-04T02:15:01.720552 | import importlib.util
import json
from pathlib import Path
from types import SimpleNamespace
import pytest
ROOT = Path(__file__).resolve().parents[1]
MODULE_PATH = ROOT / "tools" / "exa_search.py"
def load_module():
spec = importlib.util.spec_from_file_location("exa_search", MODULE_PATH)
module = importlib... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.