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
baidu/CUP
https://github.com/baidu/CUP
null
null
null
null
951
null
null
apache-2.0
null
null
null
null
null
null
null
cup_test/cup_services_executor.py
null
null
null
null
null
null
Python
2026-05-04T02:41:14.066008
#!/usr/bin/env python # -*- coding: utf-8 -* # Copyright: [CUP] - See LICENSE for details. # Authors: Guannan Ma (@mythmgn), """ :description: unittest for cup.services.executor """ import os import sys import time import unittest as sysut _TOP = os.path.abspath(os.path.dirname(os.path.abspath(__file__)) + '/') sy...
baidu/CUP
https://github.com/baidu/CUP
null
null
null
null
951
null
null
apache-2.0
null
null
null
null
null
null
null
cup_test/cup_services_buffer.py
null
null
null
null
null
null
Python
2026-05-04T02:41:14.067122
#!/usr/bin/env python # -*- coding: utf-8 -* # Copyright: [CUP] - See LICENSE for details. # Authors: Guannan Ma (@mythmgn), """ :description: unittest for cup.services.buffers """ from cup.services import buffers from cup import unittest import unittest as sysut class TestServiceBuffer(sysut.TestCase): """ ...
baidu/CUP
https://github.com/baidu/CUP
null
null
null
null
951
null
null
apache-2.0
null
null
null
null
null
null
null
cup_test/cup_util_conf_test.py
null
null
null
null
null
null
Python
2026-05-04T02:41:14.255323
#!/usr/bin/env python # -*- coding: utf-8 -* # Copyright: [CUP] - See LICENSE for details. # Authors: Guannan Ma (@mythmgn), """ :description: unittest for cup.util.conf """ from __future__ import print_function import os import sys _TOPDIR = os.path.abspath(os.path.dirname(os.path.abspath(__file__)) + '/../') sys....
baidu/CUP
https://github.com/baidu/CUP
null
null
null
null
951
null
null
apache-2.0
null
null
null
null
null
null
null
cup_test_manually/cup_storage_object_test.py
null
null
null
null
null
null
Python
2026-05-04T02:41:14.256438
#!/usr/bin/env python # -*- coding: utf-8 -* # Copyright: [CUP] - See LICENSE for details. # Authors: Guannan Ma (@mythmgn), """ :description: unittest for cup.cache """ from __future__ import print_function import os import sys _NOW_PATH = os.path.dirname(os.path.abspath(__file__)) + '/' sys.path.insert(0, _NOW_P...
baidu/CUP
https://github.com/baidu/CUP
null
null
null
null
951
null
null
apache-2.0
null
null
null
null
null
null
null
docs/api-rst/newdoc/conf.py
null
null
null
null
null
null
Python
2026-05-04T02:41:14.257845
# Configuration file for the Sphinx documentation builder. # # For the full list of built-in configuration values, see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Project information ----------------------------------------------------- # https://www.sphinx-doc.org/en/master...
baidu/CUP
https://github.com/baidu/CUP
null
null
null
null
951
null
null
apache-2.0
null
null
null
null
null
null
null
cup_test/cup_util_thread_test.py
null
null
null
null
null
null
Python
2026-05-04T02:41:14.326406
#!/usr/bin/env python # -*- coding: utf-8 -* # Copyright: [CUP] - See LICENSE for details. # Authors: Guannan Ma (@mythmgn), """ :description: unittest for cup.util.thread """ from cup.util import thread # for RWLock unittest def test_rw_rw_lock(): lock = thread.RWLock() lock.acquire_writelock(None) ...
baidu/CUP
https://github.com/baidu/CUP
null
null
null
null
951
null
null
apache-2.0
null
null
null
null
null
null
null
examples/arrow-runtime/arrow/agent/control.py
null
null
null
null
null
null
Python
2026-05-04T02:41:14.661905
#!/usr/bin/env python # -*- coding: utf-8 -* """ :authors: Guannan Ma @mythmgn :create_date: """ # import gc import time # import pympler # from pympler import summary # from pympler import muppy from cup import log from cup import net from cup import platforms from cup.net.asyn import msg from cup.services impo...
baidu/CUP
https://github.com/baidu/CUP
null
null
null
null
951
null
null
apache-2.0
null
null
null
null
null
null
null
examples/arrow-runtime/arrow/agent/arrow_agent.py
null
null
null
null
null
null
Python
2026-05-04T02:41:14.756863
#!/usr/bin/env python # -*- coding: utf-8 -* """ :authors: Guannan Ma @mythmgn :create_date: 2016/05/05 :modify_date: :description: """ import os import sys import signal from cup import decorators from cup import net from cup.util import conf from cup import log from arrow.agent import control from arrow.c...
baidu/CUP
https://github.com/baidu/CUP
null
null
null
null
951
null
null
apache-2.0
null
null
null
null
null
null
null
cup_test/cup_storage_obj_test.py
null
null
null
null
null
null
Python
2026-05-04T02:41:14.787705
#!/usr/bin/env python # -*- coding: utf-8 -* # Copyright: See LICENSE for details. # Authors: Guannan Ma (@mythmgn), """ :description: """ from cup.storage import obj s3 = obj.S3ObjectSystem( { 'ak': 'dQL2wNqjcerNJsrobLbK', 'sk': 'hfkWQdDB8sMsimgIqZORBsWIZyPzahJtToKZoLCz', 'endpoint': 'ht...
baidu/CUP
https://github.com/baidu/CUP
null
null
null
null
951
null
null
apache-2.0
null
null
null
null
null
null
null
examples/arrow-runtime/arrow/agent/unique_id.py
null
null
null
null
null
null
Python
2026-05-04T02:41:14.863493
#!/usr/bin/env python # -*- coding: utf-8 -* """ :authors: Guannan Ma maguannan @mythmgn :create_date: 2016.5.10 :description: generate unique id for services """ from cup import decorators @decorators.Singleton class UniqueID(object): """ generate unique id """ def __init__(self, low, hig...
baidu/CUP
https://github.com/baidu/CUP
null
null
null
null
951
null
null
apache-2.0
null
null
null
null
null
null
null
examples/arrow-runtime/arrow/common/resource.py
null
null
null
null
null
null
Python
2026-05-04T02:41:14.911235
#!/usr/bin/env python # -*- coding: utf-8 -* # ############################################################# # # Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved # # ############################################################# """ :authors: Guannan Ma maguannan @mythmgn :create_date: 2016/04/05 17:23:06...
baidu/CUP
https://github.com/baidu/CUP
null
null
null
null
951
null
null
apache-2.0
null
null
null
null
null
null
null
examples/arrow-runtime/arrow/common/service.py
null
null
null
null
null
null
Python
2026-05-04T02:41:14.970639
#!/usr/bin/env python # -*- coding: utf-8 -* # ############################################################# # # Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved # # ############################################################# """ :authors: Guannan Ma maguannan @mythmgn :create_date: [% date('%c') %] :m...
baidu/CUP
https://github.com/baidu/CUP
null
null
null
null
951
null
null
apache-2.0
null
null
null
null
null
null
null
cup_test_manually/cup_mail_test.py
null
null
null
null
null
null
Python
2026-05-04T02:41:15.196843
#!/usr/bin/env python # -*- coding: utf-8 -* # Copyright: [CUP] - See LICENSE for details. # Authors: Guannan Ma (@mythmgn), """ :description: unittest for cup.mail """ import os import sys _NOW_PATH = os.path.dirname(os.path.abspath(__file__)) + '/' sys.path.insert(0, _NOW_PATH + '../') from cup import mail from...
baidu/CUP
https://github.com/baidu/CUP
null
null
null
null
951
null
null
apache-2.0
null
null
null
null
null
null
null
examples/arrow-runtime/arrow/common/settings.py
null
null
null
null
null
null
Python
2026-05-04T02:41:15.197546
#!/usr/bin/env python # -*- coding: utf-8 -* # ############################################################# # # Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved # # ############################################################# """ :authors: Guannan Ma maguannan @mythmgn :create_date: 2014/04/05 17:23:06...
baidu/CUP
https://github.com/baidu/CUP
null
null
null
null
951
null
null
apache-2.0
null
null
null
null
null
null
null
examples/arrow-runtime/arrow/master/arrow_master.py
null
null
null
null
null
null
Python
2026-05-04T02:41:15.303061
#!/usr/bin/env python # -*- coding: utf-8 -* """ :authors: Guannan Ma @mythmgn :create_date: 2016/05/05 :description: TODO: 1. Heartbeat with resource 2. Serialize base for all network msg 3. Heartbeat network msg """ import os import sys import signal from cup import decorators f...
baidu/CUP
https://github.com/baidu/CUP
null
null
null
null
951
null
null
apache-2.0
null
null
null
null
null
null
null
examples/arrow-runtime/arrow/master/control.py
null
null
null
null
null
null
Python
2026-05-04T02:41:15.321092
#!/usr/bin/env python # -*- coding: utf-8 -* """ :authors: Guannan Ma @mythmgn :create_date: """ # import os # import sys # import copy # import objgraph # from cup import decorators from cup import log # from cup import net from cup.services import executor from cup.net.asyn import msgcenter from cup.net.asyn im...
baidu/CUP
https://github.com/baidu/CUP
null
null
null
null
951
null
null
apache-2.0
null
null
null
null
null
null
null
src/cup/__init__.py
null
null
null
null
null
null
Python
2026-05-04T02:41:15.363624
#!/bin/env python # -*- coding: utf-8 -* """ @author Guannan Ma """ import sys # { BENGIN: for python3 compatibility # END } # { Check Env if sys.version_info < (2, 6): raise ImportError( 'cup needs to be run on python 2.6 and above.' ) # End Check-Env } from cup import log from cup import d...
baidu/CUP
https://github.com/baidu/CUP
null
null
null
null
951
null
null
apache-2.0
null
null
null
null
null
null
null
examples/arrow-runtime/arrow/master/heartbeat.py
null
null
null
null
null
null
Python
2026-05-04T02:41:15.487878
#!/usr/bin/env python # -*- coding: utf-8 -* """ :authors: Guannan Ma @mythmgn :create_date: 2016/06/07 :description: heartbeat service """ from cup.services import heartbeat class HeartbeatService(heartbeat.HeartbeatService): """ heartbeat service. not in use yet """ def __init__(self, ju...
baidu/CUP
https://github.com/baidu/CUP
null
null
null
null
951
null
null
apache-2.0
null
null
null
null
null
null
null
src/cup/cache.py
null
null
null
null
null
null
Python
2026-05-04T02:41:15.540451
#!/usr/bin/env python # -*- coding: utf-8 -* # Copyright: [CUP] - See LICENSE for details. # Authors: Guannan Ma (@mythmgn), """ :description: decorators related module """ import time import typing # from typing import Any, Iterable import uuid try: import queue except ImportError: import Queue as queue # ...
baidu/CUP
https://github.com/baidu/CUP
null
null
null
null
951
null
null
apache-2.0
null
null
null
null
null
null
null
src/cup/const.py
null
null
null
null
null
null
Python
2026-05-04T02:41:15.570535
#!/usr/bin/env python # -*- coding: utf-8 -* # Copyright: [CUP] - See LICENSE for details. # Authors: Guannan Ma (@mythmgn), """ :desc: Const variable for internal use. Use it when you know what this _const really means """ from __future__ import print_function import cup from cup import version # pylint:disab...
baidu/CUP
https://github.com/baidu/CUP
null
null
null
null
951
null
null
apache-2.0
null
null
null
null
null
null
null
src/cup/decorators.py
null
null
null
null
null
null
Python
2026-05-04T02:41:15.577396
#!/usr/bin/env python # -*- coding: utf-8 -* # Copyright: [CUP] - See LICENSE for details. # Authors: Guannan Ma (@mythmgn), """ :description: decorators related module """ from __future__ import print_function import pdb import os import time import inspect import platform import threading import functools from da...
baidu/CUP
https://github.com/baidu/CUP
null
null
null
null
951
null
null
apache-2.0
null
null
null
null
null
null
null
src/cup/exfile.py
null
null
null
null
null
null
Python
2026-05-04T02:41:15.770237
#!/usr/bin/env python # -*- coding: utf-8 -* # Copyright: [CUP] - See LICENSE for details. # Authors: Guannan Ma (@mythmgn), """ :description: file related functions """ import os import sys import copy import fcntl import shutil from cup import err from cup import decorators from cup import platforms __all__ = ...
baidu/CUP
https://github.com/baidu/CUP
null
null
null
null
951
null
null
apache-2.0
null
null
null
null
null
null
null
src/cup/err.py
null
null
null
null
null
null
Python
2026-05-04T02:41:15.872451
#!/usr/bin/python # -*- coding: utf-8 -* # Copyright: [CUP] - See LICENSE for details. # Authors: Guannan Ma (@mythmgn), """ :description: error related module """ # pylint: disable=consider-using-f-string __all__ = [ 'BaseCupException', 'DecoratorException', 'LoggerException', 'ResException', 'NoSuchProce...
baidu/CUP
https://github.com/baidu/CUP
null
null
null
null
951
null
null
apache-2.0
null
null
null
null
null
null
null
src/cup/log.py
null
null
null
null
null
null
Python
2026-05-04T02:41:15.876133
#!/usr/bin/python # -*- coding: utf-8 -* # Copyright: [CUP] - See LICENSE for details. # Authors: Guannan Ma (@mythmgn), """ :description: common log related module """ # pylint: disable=unspecified-encoding,broad-except from __future__ import print_function __all__ = [ 'debug', 'info', 'warning', 'critical', ...
baidu/CUP
https://github.com/baidu/CUP
null
null
null
null
951
null
null
apache-2.0
null
null
null
null
null
null
null
src/cup/net/__init__.py
null
null
null
null
null
null
Python
2026-05-04T02:41:15.914360
#!/usr/bin/env python # -*- coding: utf-8 -* # Copyright: [CUP] - See LICENSE for details. """ :description: network related module """ from __future__ import print_function import os import sys import time import socket import struct import netifaces as ni import platform import warnings try: import fcntl exc...
baidu/CUP
https://github.com/baidu/CUP
null
null
null
null
951
null
null
apache-2.0
null
null
null
null
null
null
null
src/cup/flag.py
null
null
null
null
null
null
Python
2026-05-04T02:41:15.965172
#!/usr/bin/env python # -*- coding: utf-8 -* # Copyright: [CUP] - See LICENSE for details. # Authors: Guannan Ma (@mythmgn), """ :description: TypeMan and FlagMan is for someone who looks up value by key and the reverse (key by value) """ __all__ = ['BaseMan', 'TypeMan', 'FlagMan'] class BaseMan(object): ...
baidu/CUP
https://github.com/baidu/CUP
null
null
null
null
951
null
null
apache-2.0
null
null
null
null
null
null
null
src/cup/mail.py
null
null
null
null
null
null
Python
2026-05-04T02:41:16.041061
#!/usr/bin/python # -*- coding: utf-8 -* # Copyright: [CUP] - See LICENSE for details. # Authors: Guannan Ma (@mythmgn), """ :description: mail related modules. **Recommand using SmtpMailer** """ __all__ = ['mutt_sendmail', 'SmtpMailer'] import os import time import warnings import mimetypes import smtplib i...
baidu/CUP
https://github.com/baidu/CUP
null
null
null
null
951
null
null
apache-2.0
null
null
null
null
null
null
null
src/cup/net/asyn/common.py
null
null
null
null
null
null
Python
2026-05-04T02:41:16.130207
#!/usr/bin/env python # -*- coding: utf-8 -* # Copyright: [CUP] - See LICENSE for details. # Authors: Guannan Ma (@mythmgn), """ common function module for cup.net.asyn """ import socket import struct from cup.util import misc __all__ = [ 'ip_port2connaddr', 'add_stub2connaddr', 'add_future2connaddr', 'get_i...
baidu/CUP
https://github.com/baidu/CUP
null
null
null
null
951
null
null
apache-2.0
null
null
null
null
null
null
null
src/cup/net/asyn/conn.py
null
null
null
null
null
null
Python
2026-05-04T02:41:16.138024
#!/usr/bin/env python # -*- coding: utf-8 -* # Copyright: [CUP] - See LICENSE for details. # Authors: Guannan Ma """ :description: connection related module 1. There's only 1 thread reading/receiving data from the interface. 2. There might have more than 1 thred writing data into the network queue. 1...
baidu/CUP
https://github.com/baidu/CUP
null
null
null
null
951
null
null
apache-2.0
null
null
null
null
null
null
null
src/cup/net/asyn/context.py
null
null
null
null
null
null
Python
2026-05-04T02:41:16.146864
#!/usr/bin/env python # -*- coding: utf-8 -* # -*- coding: utf-8 -* # Copyright: [CUP] - See LICENSE for details. # Authors: Guannan Ma (@mythmgn), """ :description: Connection Context for each socket """ import copy import time import threading import traceback try: import Queue as queue # pylint: disable=F04...
baidu/CUP
https://github.com/baidu/CUP
null
null
null
null
951
null
null
apache-2.0
null
null
null
null
null
null
null
src/cup/net/asyn/__init__.py
null
null
null
null
null
null
Python
2026-05-04T02:41:16.176906
#!/usr/bin/env python # -*- coding: utf-8 -* # Copyright: [CUP] - See LICENSE for details. # Authors: Guannan Ma (@mythmgn), """ :description: **Async Module is a tcp framework for asynchrous network msg tranfering** """ # TODO: # 1. If the socket has been in a state in which it does not send or # recv any...
baidu/CUP
https://github.com/baidu/CUP
null
null
null
null
951
null
null
apache-2.0
null
null
null
null
null
null
null
src/cup/net/asyn/ioloop.py
null
null
null
null
null
null
Python
2026-05-04T02:41:16.347680
#!/usr/bin/env python # -*- coding: utf-8 -* # Copyright: See LICENSE for details. # Authors: Guannan Ma (@mythmgn), """ :description: pollers for epoll and kqueue and others. Refer IOLoop from tornado: https://www.tornadoweb.org/en/branch2.0/_modules/tornado/ioloop.html Respect to the tornado team:...
baidu/CUP
https://github.com/baidu/CUP
null
null
null
null
951
null
null
apache-2.0
null
null
null
null
null
null
null
src/cup/net/asyn/msgcenter.py
null
null
null
null
null
null
Python
2026-05-04T02:41:16.486727
#!/usr/bin/env python # -*- coding: utf-8 -* # Copyright: [CUP] - See LICENSE for details. # Authors: Guannan Ma (@mythmgn), """ :descrition: msg center related module """ import abc import time import socket import threading import traceback from cup import log from cup.net.asyn import conn from cup.net.asyn impo...
baidu/CUP
https://github.com/baidu/CUP
null
null
null
null
951
null
null
apache-2.0
null
null
null
null
null
null
null
src/cup/net/asyn/msg.py
null
null
null
null
null
null
Python
2026-05-04T02:41:16.582001
#!/usr/bin/env python # -*- coding: utf-8 -* # Copyright: [CUP] - See LICENSE for details. # Authors: Guannan Ma (@mythmgn) """ :description: netmsg related module """ import os import cup from cup import log from cup import platforms from cup.util import misc from cup.util import generator from cup.net.asyn impor...
kormax/apple-home-key-reader
https://github.com/kormax/apple-home-key-reader
null
null
null
null
950
null
null
apache-2.0
null
null
null
null
null
null
null
main.py
null
null
null
null
null
null
Python
2026-05-04T02:41:19.007448
import json import logging import signal import sys from pyhap.accessory_driver import AccessoryDriver from accessory import Lock from repository import Repository from service import Service from util.bfclf import BroadcastFrameContactlessFrontend # By default, this file is located in the same folder as the project...
kormax/apple-home-key-reader
https://github.com/kormax/apple-home-key-reader
null
null
null
null
950
null
null
apache-2.0
null
null
null
null
null
null
null
tests/test_tlv.py
null
null
null
null
null
null
Python
2026-05-04T02:41:19.008020
from util.tlv import BERTLV class TestBERTLV: def test_encode_simple_tag(self): tlv = BERTLV(0x5A, value=b"\x01\x02\x03") packed = tlv.pack() assert packed == b"\x5a\x03\x01\x02\x03" def test_decode_simple_tag(self): data = b"\x5a\x03\x01\x02\x03" tlv = BERTLV.unpack(d...
kormax/apple-home-key-reader
https://github.com/kormax/apple-home-key-reader
null
null
null
null
950
null
null
apache-2.0
null
null
null
null
null
null
null
accessory.py
null
null
null
null
null
null
Python
2026-05-04T02:41:19.011471
import functools import logging from pyhap.accessory import Accessory from pyhap.const import CATEGORY_DOOR_LOCK from service import Service log = logging.getLogger() # Lock class performs no logic, forwarding requests to Service class class Lock(Accessory): category = CATEGORY_DOOR_LOCK def __init__(self...
kormax/apple-home-key-reader
https://github.com/kormax/apple-home-key-reader
null
null
null
null
950
null
null
apache-2.0
null
null
null
null
null
null
null
service.py
null
null
null
null
null
null
Python
2026-05-04T02:41:19.013132
import base64 import logging import time import os from operator import attrgetter from entity import ( Issuer, Operation, ReaderKeyResponse, ReaderKeyRequest, HardwareFinishResponse, HardwareFinishColor, DeviceCredentialRequest, DeviceCredentialResponse, Endpoint, Enrollments, ...
kormax/apple-home-key-reader
https://github.com/kormax/apple-home-key-reader
null
null
null
null
950
null
null
apache-2.0
null
null
null
null
null
null
null
util/bfclf.py
null
null
null
null
null
null
Python
2026-05-04T02:41:19.017977
# -*- coding: latin-1 -*- # ----------------------------------------------------------------------------- # Copyright 2009, 2017 Stephen Tiedemann <stephen.tiedemann@gmail.com> # # Licensed under the EUPL, Version 1.1 or - as soon they # will be approved by the European Commission - subsequent # versions of the EUPL (t...
kormax/apple-home-key-reader
https://github.com/kormax/apple-home-key-reader
null
null
null
null
950
null
null
apache-2.0
null
null
null
null
null
null
null
repository.py
null
null
null
null
null
null
Python
2026-05-04T02:41:19.019404
import copy import hashlib import json import logging from threading import Lock from typing import List, Optional from entity import Endpoint, Issuer log = logging.getLogger() class Repository: """Serves as a way of emulating a storage/database""" _issuers: List[Issuer] def __init__(self, storage_fil...
kormax/apple-home-key-reader
https://github.com/kormax/apple-home-key-reader
null
null
null
null
950
null
null
apache-2.0
null
null
null
null
null
null
null
entity.py
null
null
null
null
null
null
Python
2026-05-04T02:41:19.038757
import hashlib import os from dataclasses import dataclass from enum import Enum, IntEnum from typing import List, Optional, Union from util.structable import represent from util.tlv import TLV8Field, TLV8Object class KeyType(IntEnum): CURVE25519 = 0x01 SECP256R1 = 0x02 class Context(Enum): PERSISTENT ...
kormax/apple-home-key-reader
https://github.com/kormax/apple-home-key-reader
null
null
null
null
950
null
null
apache-2.0
null
null
null
null
null
null
null
homekey.py
null
null
null
null
null
null
Python
2026-05-04T02:41:19.039815
import base64 import hashlib import logging import os import time from typing import Collection, List, Optional, Tuple import cbor2 from cryptography.exceptions import InvalidSignature from cryptography.hazmat.primitives import hashes from cryptography.hazmat.primitives.asymmetric import ec, ed25519 from cryptography....
kormax/apple-home-key-reader
https://github.com/kormax/apple-home-key-reader
null
null
null
null
950
null
null
apache-2.0
null
null
null
null
null
null
null
tests/test_homekey.py
null
null
null
null
null
null
Python
2026-05-04T02:41:19.068076
import os import pytest from util.structable import pack from util.tlv import BERTLV as TLV from util.iso7816 import ISO7816Response, ISO7816Tag from homekey import read_homekey, ProtocolError class FakeTag: def __init__(self, generator): self.generator = generator def transceive(self, _): ...
kormax/apple-home-key-reader
https://github.com/kormax/apple-home-key-reader
null
null
null
null
950
null
null
apache-2.0
null
null
null
null
null
null
null
util/generic.py
null
null
null
null
null
null
Python
2026-05-04T02:41:19.601941
def get_tlv_tag(tlv_array, tag_value): try: return next(tlv_ for tlv_ in tlv_array if tlv_.tag.data[0] == tag_value).value except StopIteration: return None def chunked(source, size): for i in range(0, len(source), size): yield source[i : i + size] def int_to_bytes(value, byteord...
kormax/apple-home-key-reader
https://github.com/kormax/apple-home-key-reader
null
null
null
null
950
null
null
apache-2.0
null
null
null
null
null
null
null
util/iso18013.py
null
null
null
null
null
null
Python
2026-05-04T02:41:19.632438
import cbor2 from cryptography.hazmat.primitives import hashes from cryptography.hazmat.primitives.ciphers.aead import AESGCM from cryptography.hazmat.primitives.kdf.hkdf import HKDF from util.iso7816 import ISO7816Tag # # Code in this file is highly inspired by https://github.com/google/identity-credential # READE...
kormax/apple-home-key-reader
https://github.com/kormax/apple-home-key-reader
null
null
null
null
950
null
null
apache-2.0
null
null
null
null
null
null
null
util/crypto.py
null
null
null
null
null
null
Python
2026-05-04T02:41:19.639672
from typing import Union from cryptography.hazmat.primitives import cmac from cryptography.hazmat.primitives.asymmetric import ec from cryptography.hazmat.primitives.asymmetric.ec import EllipticCurvePublicNumbers from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes from cryptography.hazmat.pri...
kormax/apple-home-key-reader
https://github.com/kormax/apple-home-key-reader
null
null
null
null
950
null
null
apache-2.0
null
null
null
null
null
null
null
util/ndef.py
null
null
null
null
null
null
Python
2026-05-04T02:41:19.640800
from enum import IntEnum from typing import Collection, Union from util.generic import bits from util.structable import Packable, Unpackable, pack, represent # # Code inspired by information from "Beginning NFC book from O'reilly" and ndeflib # class NDEFRecordType(IntEnum): EMPTY = 0 WELL_KNOWN = 1 MI...
kormax/apple-home-key-reader
https://github.com/kormax/apple-home-key-reader
null
null
null
null
950
null
null
apache-2.0
null
null
null
null
null
null
null
util/threads.py
null
null
null
null
null
null
Python
2026-05-04T02:41:19.652194
import functools import threading import time import logging def runner(target, name: str, flag=lambda *args: True, *, delay=0, exception_delay=5): self = target.__self__ @functools.wraps(target) def function_(*args, **kwargs): while flag(self): time.sleep(delay) try: ...
kormax/apple-home-key-reader
https://github.com/kormax/apple-home-key-reader
null
null
null
null
950
null
null
apache-2.0
null
null
null
null
null
null
null
util/digital_key.py
null
null
null
null
null
null
Python
2026-05-04T02:41:19.653013
from enum import IntEnum from typing import Tuple from util.crypto import ( aes_cmac, decrypt_aes_cbc, encrypt_aes_cbc, pad_mode_3, unpad_mode_3, ) from util.iso7816 import ISO7816Command, ISO7816Response, ISO7816Tag COMMAND_PCB = bytes.fromhex("000000000000000000000000000000") RESPONSE_PCB = byt...
kormax/apple-home-key-reader
https://github.com/kormax/apple-home-key-reader
null
null
null
null
950
null
null
apache-2.0
null
null
null
null
null
null
null
util/nfc.py
null
null
null
null
null
null
Python
2026-05-04T02:41:19.653662
def crc16a(data): w_crc = 0x6363 for byte in data: byte = byte ^ (w_crc & 0x00FF) byte = (byte ^ (byte << 4)) & 0xFF w_crc = ((w_crc >> 8) ^ (byte << 8) ^ (byte << 3) ^ (byte >> 4)) & 0xFFFF return bytearray([w_crc & 0xFF, (w_crc >> 8) & 0xFF]) def with_crc16(data): return byte...
kormax/apple-home-key-reader
https://github.com/kormax/apple-home-key-reader
null
null
null
null
950
null
null
apache-2.0
null
null
null
null
null
null
null
util/ecp.py
null
null
null
null
null
null
Python
2026-05-04T02:41:19.663256
from typing import Tuple from util.structable import PackableData, Packable, pack ECP_HEADER = 0x6A TYPE_ACCESS = 0x02 SUBTYPE_HOMEKEY = 0x06 TCI_HOMEKEY = bytes.fromhex("021100") class ECP(Packable): """Elliptic Curve Point""" command: int version: int @staticmethod def home(identifier: byt...
kormax/apple-home-key-reader
https://github.com/kormax/apple-home-key-reader
null
null
null
null
950
null
null
apache-2.0
null
null
null
null
null
null
null
util/iso7816.py
null
null
null
null
null
null
Python
2026-05-04T02:41:19.663736
from enum import Enum, IntEnum from typing import Any, Union from util.structable import Packable, Unpackable, pack # # Command and response classes were inspired by and based on similar classes from following projects: # https://github.com/apuigsech/emv-framework # Documentation regarding the params was taken from: ...
kormax/apple-home-key-reader
https://github.com/kormax/apple-home-key-reader
null
null
null
null
950
null
null
apache-2.0
null
null
null
null
null
null
null
util/structable.py
null
null
null
null
null
null
Python
2026-05-04T02:41:19.707481
import abc import base64 from collections.abc import Iterable from enum import Enum from string import printable from typing import Collection, ForwardRef, TypeVar, Union PRINATBLE_BYTES = set(bytes(printable, "ascii")) Packable = ForwardRef("Packable") T = TypeVar("T") PackableBase = Union[bytes, bytearray, memor...
kormax/apple-home-key-reader
https://github.com/kormax/apple-home-key-reader
null
null
null
null
950
null
null
apache-2.0
null
null
null
null
null
null
null
util/tlv.py
null
null
null
null
null
null
Python
2026-05-04T02:41:21.909350
from enum import Enum, IntEnum from typing import Collection, List, Union, Dict from util.generic import int_to_bytes from util.structable import PackableData, Packable, Unpackable, pack, represent def try_cast_type(value: bytes, type): if isinstance(value, Packable): value = value.pack() if ( ...
xinge008/Cylinder3D
https://github.com/xinge008/Cylinder3D
null
null
null
null
950
null
null
apache-2.0
null
null
null
null
null
null
null
builder/loss_builder.py
null
null
null
null
null
null
Python
2026-05-04T02:41:24.433138
# -*- coding:utf-8 -*- # author: Xinge # @file: loss_builder.py import torch from utils.lovasz_losses import lovasz_softmax def build(wce=True, lovasz=True, num_class=20, ignore_label=0): loss_funs = torch.nn.CrossEntropyLoss(ignore_index=ignore_label) if wce and lovasz: return loss_funs, lovasz_s...
xinge008/Cylinder3D
https://github.com/xinge008/Cylinder3D
null
null
null
null
950
null
null
apache-2.0
null
null
null
null
null
null
null
dataloader/dataset_nuscenes.py
null
null
null
null
null
null
Python
2026-05-04T02:41:24.434554
# -*- coding:utf-8 -*- # author: Xinge # @file: dataset_nuscenes.py import numpy as np import torch import numba as nb from torch.utils import data from dataloader.dataset_semantickitti import register_dataset def cart2polar(input_xyz): rho = np.sqrt(input_xyz[:, 0] ** 2 + input_xyz[:, 1] ** 2) phi = np.arct...
xinge008/Cylinder3D
https://github.com/xinge008/Cylinder3D
null
null
null
null
950
null
null
apache-2.0
null
null
null
null
null
null
null
builder/model_builder.py
null
null
null
null
null
null
Python
2026-05-04T02:41:24.435688
# -*- coding:utf-8 -*- # author: Xinge # @file: model_builder.py from network.cylinder_spconv_3d import get_model_class from network.segmentator_3d_asymm_spconv import Asymm_3d_spconv from network.cylinder_fea_generator import cylinder_fea def build(model_config): output_shape = model_config['output_shape'] ...
xinge008/Cylinder3D
https://github.com/xinge008/Cylinder3D
null
null
null
null
950
null
null
apache-2.0
null
null
null
null
null
null
null
builder/data_builder.py
null
null
null
null
null
null
Python
2026-05-04T02:41:24.437345
# -*- coding:utf-8 -*- # author: Xinge # @file: data_builder.py import torch from dataloader.dataset_semantickitti import get_model_class, collate_fn_BEV from dataloader.pc_dataset import get_pc_model_class def build(dataset_config, train_dataloader_config, val_dataloader_config, grid_...
xinge008/Cylinder3D
https://github.com/xinge008/Cylinder3D
null
null
null
null
950
null
null
apache-2.0
null
null
null
null
null
null
null
dataloader/dataset_semantickitti.py
null
null
null
null
null
null
Python
2026-05-04T02:41:24.438514
# -*- coding:utf-8 -*- # author: Xinge """ SemKITTI dataloader """ import os import numpy as np import torch import random import time import numba as nb import yaml from torch.utils import data import pickle REGISTERED_DATASET_CLASSES = {} def register_dataset(cls, name=None): global REGISTERED_DATASET_CLASSES...
xinge008/Cylinder3D
https://github.com/xinge008/Cylinder3D
null
null
null
null
950
null
null
apache-2.0
null
null
null
null
null
null
null
config/config.py
null
null
null
null
null
null
Python
2026-05-04T02:41:24.441656
# -*- coding:utf-8 -*- # author: Xinge from pathlib import Path from strictyaml import Bool, Float, Int, Map, Seq, Str, as_document, load model_params = Map( { "model_architecture": Str(), "output_shape": Seq(Int()), "fea_dim": Int(), "out_fea_dim": Int(), "num_class": Int...
xinge008/Cylinder3D
https://github.com/xinge008/Cylinder3D
null
null
null
null
950
null
null
apache-2.0
null
null
null
null
null
null
null
dataloader/pc_dataset.py
null
null
null
null
null
null
Python
2026-05-04T02:41:24.451578
# -*- coding:utf-8 -*- # author: Xinge # @file: pc_dataset.py import os import numpy as np from torch.utils import data import yaml import pickle REGISTERED_PC_DATASET_CLASSES = {} def register_dataset(cls, name=None): global REGISTERED_PC_DATASET_CLASSES if name is None: name = cls.__name__ as...
xinge008/Cylinder3D
https://github.com/xinge008/Cylinder3D
null
null
null
null
950
null
null
apache-2.0
null
null
null
null
null
null
null
demo_folder.py
null
null
null
null
null
null
Python
2026-05-04T02:41:24.930562
# -*- coding:utf-8 -*- # author: Ptzu # @file: demo_folder.py import os import time import argparse import sys import numpy as np import torch import torch.optim as optim from tqdm import tqdm import yaml from utils.metric_util import per_class_iu, fast_hist_crop from dataloader.pc_dataset import get_SemKITTI_label_n...
xinge008/Cylinder3D
https://github.com/xinge008/Cylinder3D
null
null
null
null
950
null
null
apache-2.0
null
null
null
null
null
null
null
network/cylinder_fea_generator.py
null
null
null
null
null
null
Python
2026-05-04T02:41:25.011222
# -*- coding:utf-8 -*- # author: Xinge import torch import torch.nn as nn import torch.nn.functional as F import numpy as np import numba as nb import multiprocessing import torch_scatter class cylinder_fea(nn.Module): def __init__(self, grid_size, fea_dim=3, out_pt_fea_dim=64, max_pt_per_encod...
xinge008/Cylinder3D
https://github.com/xinge008/Cylinder3D
null
null
null
null
950
null
null
apache-2.0
null
null
null
null
null
null
null
network/cylinder_spconv_3d.py
null
null
null
null
null
null
Python
2026-05-04T02:41:25.016024
# -*- coding:utf-8 -*- # author: Xinge # @file: cylinder_spconv_3d.py from torch import nn REGISTERED_MODELS_CLASSES = {} def register_model(cls, name=None): global REGISTERED_MODELS_CLASSES if name is None: name = cls.__name__ assert name not in REGISTERED_MODELS_CLASSES, f"exist class: {REGIST...
xinge008/Cylinder3D
https://github.com/xinge008/Cylinder3D
null
null
null
null
950
null
null
apache-2.0
null
null
null
null
null
null
null
network/segmentator_3d_asymm_spconv.py
null
null
null
null
null
null
Python
2026-05-04T02:41:25.030577
# -*- coding:utf-8 -*- # author: Xinge # @file: segmentator_3d_asymm_spconv.py import numpy as np import spconv import torch from torch import nn def conv3x3(in_planes, out_planes, stride=1, indice_key=None): return spconv.SubMConv3d(in_planes, out_planes, kernel_size=3, stride=stride, ...
xinge008/Cylinder3D
https://github.com/xinge008/Cylinder3D
null
null
null
null
950
null
null
apache-2.0
null
null
null
null
null
null
null
train_cylinder_asym.py
null
null
null
null
null
null
Python
2026-05-04T02:41:25.031192
# -*- coding:utf-8 -*- # author: Xinge # @file: train_cylinder_asym.py import os import time import argparse import sys import numpy as np import torch import torch.optim as optim from tqdm import tqdm from utils.metric_util import per_class_iu, fast_hist_crop from dataloader.pc_dataset import get_SemKITTI_label_nam...
xinge008/Cylinder3D
https://github.com/xinge008/Cylinder3D
null
null
null
null
950
null
null
apache-2.0
null
null
null
null
null
null
null
train_cylinder_asym_nuscenes.py
null
null
null
null
null
null
Python
2026-05-04T02:41:25.051252
# -*- coding:utf-8 -*- # author: Xinge # @file: train_cylinder_asym.py import os import time import argparse import sys import numpy as np import torch import torch.optim as optim from tqdm import tqdm from utils.metric_util import per_class_iu, fast_hist_crop from dataloader.pc_dataset import get_nuScenes_label_nam...
xinge008/Cylinder3D
https://github.com/xinge008/Cylinder3D
null
null
null
null
950
null
null
apache-2.0
null
null
null
null
null
null
null
utils/load_save_util.py
null
null
null
null
null
null
Python
2026-05-04T02:41:25.112057
# -*- coding:utf-8 -*- # author: Xinge # @file: load_save_util.py import torch def load_checkpoint(model_load_path, model): my_model_dict = model.state_dict() pre_weight = torch.load(model_load_path) part_load = {} match_size = 0 nomatch_size = 0 for k in pre_weight.keys(): value = ...
xinge008/Cylinder3D
https://github.com/xinge008/Cylinder3D
null
null
null
null
950
null
null
apache-2.0
null
null
null
null
null
null
null
utils/log_util.py
null
null
null
null
null
null
Python
2026-05-04T02:41:25.117333
# -*- coding:utf-8 -*- # author: Xinge # @file: log_util.py def save_to_log(logdir, logfile, message): f = open(logdir + '/' + logfile, "a") f.write(message + '\n') f.close() return
xinge008/Cylinder3D
https://github.com/xinge008/Cylinder3D
null
null
null
null
950
null
null
apache-2.0
null
null
null
null
null
null
null
utils/lovasz_losses.py
null
null
null
null
null
null
Python
2026-05-04T02:41:25.682179
# -*- coding:utf-8 -*- # author: Xinge """ Lovasz-Softmax and Jaccard hinge loss in PyTorch Maxim Berman 2018 ESAT-PSI KU Leuven (MIT License) """ from __future__ import print_function, division import torch from torch.autograd import Variable import torch.nn.functional as F import numpy as np try: from itertoo...
xinge008/Cylinder3D
https://github.com/xinge008/Cylinder3D
null
null
null
null
950
null
null
apache-2.0
null
null
null
null
null
null
null
utils/metric_util.py
null
null
null
null
null
null
Python
2026-05-04T02:41:25.682665
# -*- coding:utf-8 -*- # author: Xinge # @file: metric_util.py import numpy as np def fast_hist(pred, label, n): k = (label >= 0) & (label < n) bin_count = np.bincount( n * label[k].astype(int) + pred[k], minlength=n ** 2) return bin_count[:n ** 2].reshape(n, n) def per_class_iu(hist): ret...
zju3dv/InfiniDepth
https://github.com/zju3dv/InfiniDepth
null
null
null
null
949
null
null
apache-2.0
null
null
null
null
null
null
null
InfiniDepth/gs/ply.py
null
null
null
null
null
null
Python
2026-05-04T02:41:29.560884
from pathlib import Path import numpy as np import torch from jaxtyping import Float from plyfile import PlyData, PlyElement from torch import Tensor def _construct_attributes(d_sh: int) -> list[str]: attrs = ["x", "y", "z", "nx", "ny", "nz", "f_dc_0", "f_dc_1", "f_dc_2"] n_rest = 3 * max(d_sh - 1, 0) att...
zju3dv/InfiniDepth
https://github.com/zju3dv/InfiniDepth
null
null
null
null
949
null
null
apache-2.0
null
null
null
null
null
null
null
InfiniDepth/model/__init__.py
null
null
null
null
null
null
Python
2026-05-04T02:41:29.595134
from .registry import MODEL_REGISTRY, register_model from .model import InfiniDepth, InfiniDepth_DepthSensor __all__ = [ "MODEL_REGISTRY", "register_model", "InfiniDepth", "InfiniDepth_DepthSensor", ] def __getattr__(name): if name in {"InfiniDepth", "InfiniDepth_DepthSensor"}: from .mode...
zju3dv/InfiniDepth
https://github.com/zju3dv/InfiniDepth
null
null
null
null
949
null
null
apache-2.0
null
null
null
null
null
null
null
InfiniDepth/gs/__init__.py
null
null
null
null
null
null
Python
2026-05-04T02:41:29.596765
"""Lightweight Gaussian Splatting inference utilities.""" from .types import Gaussians from .predictor import GSPixelAlignPredictor from .ply import export_ply __all__ = [ "Gaussians", "GSPixelAlignPredictor", "export_ply", ]
zju3dv/InfiniDepth
https://github.com/zju3dv/InfiniDepth
null
null
null
null
949
null
null
apache-2.0
null
null
null
null
null
null
null
InfiniDepth/gs/types.py
null
null
null
null
null
null
Python
2026-05-04T02:41:29.598450
from dataclasses import dataclass from typing import Optional import torch @dataclass class Gaussians: means: torch.Tensor # [B, N, 3] harmonics: torch.Tensor # [B, N, 3, d_sh] opacities: torch.Tensor # [B, N] scales: torch.Tensor # [B, N, 3] rotations: torch.Tensor ...
zju3dv/InfiniDepth
https://github.com/zju3dv/InfiniDepth
null
null
null
null
949
null
null
apache-2.0
null
null
null
null
null
null
null
InfiniDepth/gs/projection.py
null
null
null
null
null
null
Python
2026-05-04T02:41:29.599632
import torch def homogenize_points(points: torch.Tensor) -> torch.Tensor: return torch.cat([points, torch.ones_like(points[..., :1])], dim=-1) def homogenize_vectors(vectors: torch.Tensor) -> torch.Tensor: return torch.cat([vectors, torch.zeros_like(vectors[..., :1])], dim=-1) def transform_cam2world(homo...
zju3dv/InfiniDepth
https://github.com/zju3dv/InfiniDepth
null
null
null
null
949
null
null
apache-2.0
null
null
null
null
null
null
null
InfiniDepth/gs/predictor.py
null
null
null
null
null
null
Python
2026-05-04T02:41:29.603871
from dataclasses import dataclass import torch from torch import nn from .adapter import GaussianAdapter, GaussianAdapterCfg from .projection import sample_image_grid from .types import Gaussians @dataclass class GSPredictorCfg: rgb_feature_dim: int = 64 depth_feature_dim: int = 32 dino_reduced_dim: int...
zju3dv/InfiniDepth
https://github.com/zju3dv/InfiniDepth
null
null
null
null
949
null
null
apache-2.0
null
null
null
null
null
null
null
InfiniDepth/model/block/common.py
null
null
null
null
null
null
Python
2026-05-04T02:41:29.633113
# Copyright (c) Meta Platforms, Inc. and affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import torch import torch.nn as nn from typing import Type class MLPBlock(nn.Module): def __init__( self, ...
zju3dv/InfiniDepth
https://github.com/zju3dv/InfiniDepth
null
null
null
null
949
null
null
apache-2.0
null
null
null
null
null
null
null
InfiniDepth/gs/adapter.py
null
null
null
null
null
null
Python
2026-05-04T02:41:29.634506
from dataclasses import dataclass import torch import torch.nn.functional as F from torch import nn from einops import rearrange from .projection import get_world_rays from .types import Gaussians def rgb_to_sh(rgb: torch.Tensor) -> torch.Tensor: c0 = 0.28209479177387814 return (rgb - 0.5) / c0 @dataclass...
zju3dv/InfiniDepth
https://github.com/zju3dv/InfiniDepth
null
null
null
null
949
null
null
apache-2.0
null
null
null
null
null
null
null
InfiniDepth/model/block/config.py
null
null
null
null
null
null
Python
2026-05-04T02:41:30.355579
model_configs = { "vits": {"encoder": "vits", "features": 64, "out_channels": [48, 96, 192, 384], "layer_idxs": [2, 5, 8, 11]}, "vitb": {"encoder": "vitb", "features": 128, "out_channels": [96, 192, 384, 768], "layer_idxs": [2, 5, 8, 11]}, "vitl": {"encoder": "vitl", "features": 256, "out_channels": [256, 5...
zju3dv/InfiniDepth
https://github.com/zju3dv/InfiniDepth
null
null
null
null
949
null
null
apache-2.0
null
null
null
null
null
null
null
InfiniDepth/model/block/pe.py
null
null
null
null
null
null
Python
2026-05-04T02:41:30.357602
import torch import torch.nn as nn import math import numpy as np import torch import torch.nn as nn import torch.nn.functional as F from typing import Any, Optional, Tuple, Dict acc_dtype = ( torch.bfloat16 if torch.cuda.is_available() and torch.cuda.get_device_capability()[0] >= 8 else (torch.float16 if ...
zju3dv/InfiniDepth
https://github.com/zju3dv/InfiniDepth
null
null
null
null
949
null
null
apache-2.0
null
null
null
null
null
null
null
InfiniDepth/model/block/convolution.py
null
null
null
null
null
null
Python
2026-05-04T02:41:30.358850
# Copyright (c) Meta Platforms, Inc. and affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import torch import torch.nn as nn import torch.nn.functional as F from functools import partial from typing import Callab...
zju3dv/InfiniDepth
https://github.com/zju3dv/InfiniDepth
null
null
null
null
949
null
null
apache-2.0
null
null
null
null
null
null
null
InfiniDepth/model/block/perceive_io.py
null
null
null
null
null
null
Python
2026-05-04T02:41:30.359789
from typing import Callable, Optional, Union import torch from einops import rearrange from ...utils.logger import Log from torch import Tensor, nn import torch.nn.functional as F try: from xformers.ops import memory_efficient_attention, unbind XFORMERS_AVAILABLE = True except ImportError: Log.warn("xForm...
zju3dv/InfiniDepth
https://github.com/zju3dv/InfiniDepth
null
null
null
null
949
null
null
apache-2.0
null
null
null
null
null
null
null
InfiniDepth/model/block/prompt_models/crossattn.py
null
null
null
null
null
null
Python
2026-05-04T02:41:30.524653
import torch import torch.nn as nn from typing import Tuple from ..perceive_io import LayerScale, MemEffCrossAttention, Mlp from .utils.pe_utils import PositionEmbeddingRandom from torch import Tensor class CrossAttnPromptModel(nn.Module): def __init__( self, transformer_dim: int = 1024, n...
zju3dv/InfiniDepth
https://github.com/zju3dv/InfiniDepth
null
null
null
null
949
null
null
apache-2.0
null
null
null
null
null
null
null
InfiniDepth/model/block/implicit_decoder.py
null
null
null
null
null
null
Python
2026-05-04T02:41:30.531929
import enum import numpy as np import torch import torch.nn as nn import torch.nn.functional as F def exists(val): return val is not None def default(val, d): return val if exists(val) else d class MLP(nn.Module): def __init__(self, in_dim, out_dim, hidden_list, output_act='elu'): super().__in...
zju3dv/InfiniDepth
https://github.com/zju3dv/InfiniDepth
null
null
null
null
949
null
null
apache-2.0
null
null
null
null
null
null
null
InfiniDepth/model/block/prompt_models/__init__.py
null
null
null
null
null
null
Python
2026-05-04T02:41:30.532887
import torch.nn as nn from .sam import SAMPromptModel from .selfattn import SelfAttnPromptModel __all__ = [ "GeneralPromptModel", "SelfAttnPromptModel", "SAMPromptModel", ] class GeneralPromptModel(nn.Module): def __init__(self, prompt_stage=[3], **kwargs): super().__init__() self.pro...
zju3dv/InfiniDepth
https://github.com/zju3dv/InfiniDepth
null
null
null
null
949
null
null
apache-2.0
null
null
null
null
null
null
null
InfiniDepth/model/block/prompt_models/rope.py
null
null
null
null
null
null
Python
2026-05-04T02:41:30.923213
from typing import Dict, Tuple import torch import torch.nn as nn import torch.nn.functional as F acc_dtype = ( torch.bfloat16 if torch.cuda.is_available() and torch.cuda.get_device_capability()[0] >= 8 else (torch.float16 if torch.cuda.is_available() else torch.float32) ) class PositionGetter: """Ge...
zju3dv/InfiniDepth
https://github.com/zju3dv/InfiniDepth
null
null
null
null
949
null
null
apache-2.0
null
null
null
null
null
null
null
InfiniDepth/model/block/prompt_models/utils/transformer.py
null
null
null
null
null
null
Python
2026-05-04T02:41:30.952535
# Copyright (c) Meta Platforms, Inc. and affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import math from typing import Tuple, Type import torch from einops import rearrange from ...common import MLPBlock from ....
zju3dv/InfiniDepth
https://github.com/zju3dv/InfiniDepth
null
null
null
null
949
null
null
apache-2.0
null
null
null
null
null
null
null
InfiniDepth/model/block/prompt_models/utils/pe_utils.py
null
null
null
null
null
null
Python
2026-05-04T02:41:30.953885
from typing import Any, Optional, Tuple import numpy as np import torch from torch import nn class PositionEmbeddingRandom(nn.Module): """ Positional encoding using random spatial frequencies. """ patch_size = 14 def __init__(self, num_pos_feats: int = 64, scale: Optional[float] = None, image_pe...
zju3dv/InfiniDepth
https://github.com/zju3dv/InfiniDepth
null
null
null
null
949
null
null
apache-2.0
null
null
null
null
null
null
null
InfiniDepth/model/block/rope.py
null
null
null
null
null
null
Python
2026-05-04T02:41:30.983422
from typing import Tuple import torch def precompute_freqs_cis_2d(dim: int, height: int, width:int, theta: float = 10000.0, scale=16.0): # assert H * H == end # flat_patch_pos = torch.linspace(-1, 1, end) # N = end x_pos = torch.linspace(0, scale, width) y_pos = torch.linspace(0, scale, height) y...
zju3dv/InfiniDepth
https://github.com/zju3dv/InfiniDepth
null
null
null
null
949
null
null
apache-2.0
null
null
null
null
null
null
null
InfiniDepth/model/block/torchhub/dinov3/dinov3/__init__.py
null
null
null
null
null
null
Python
2026-05-04T02:41:31.106831
# Copyright (c) Meta Platforms, Inc. and affiliates. # # This software may be used and distributed in accordance with # the terms of the DINOv3 License Agreement. __version__ = "0.0.1"
zju3dv/InfiniDepth
https://github.com/zju3dv/InfiniDepth
null
null
null
null
949
null
null
apache-2.0
null
null
null
null
null
null
null
InfiniDepth/model/block/torchhub/dinov3/dinov3/checkpointer/checkpointer.py
null
null
null
null
null
null
Python
2026-05-04T02:41:31.108424
# Copyright (c) Meta Platforms, Inc. and affiliates. # # This software may be used and distributed in accordance with # the terms of the DINOv3 License Agreement. """ Suggested file structure: output_dir/ |-- ckpt/ | |-- 0/ | |-- 99/ | |-- 199/ | |-- 199_keep/ | |-- 299/ | `-- ... `-- eval/ `-- 0/ ...
zju3dv/InfiniDepth
https://github.com/zju3dv/InfiniDepth
null
null
null
null
949
null
null
apache-2.0
null
null
null
null
null
null
null
InfiniDepth/model/block/torchhub/dinov3/dinov3/checkpointer/__init__.py
null
null
null
null
null
null
Python
2026-05-04T02:41:31.143517
# Copyright (c) Meta Platforms, Inc. and affiliates. # # This software may be used and distributed in accordance with # the terms of the DINOv3 License Agreement. from .checkpointer import ( CheckpointRetentionPolicy, cleanup_checkpoint, find_all_checkpoints, find_latest_checkpoint, init_fsdp_model...
zju3dv/InfiniDepth
https://github.com/zju3dv/InfiniDepth
null
null
null
null
949
null
null
apache-2.0
null
null
null
null
null
null
null
InfiniDepth/model/block/prompt_models/selfattn.py
null
null
null
null
null
null
Python
2026-05-04T02:41:31.289656
from typing import Tuple import torch import torch.nn as nn from ..perceive_io import LayerScale, MemEffAttention, Mlp from .rope import RotaryPositionEmbedding2D from .utils.pe_utils import PositionEmbeddingRandom from torch import Tensor acc_dtype = ( torch.bfloat16 if torch.cuda.is_available() and torch.cud...
zju3dv/InfiniDepth
https://github.com/zju3dv/InfiniDepth
null
null
null
null
949
null
null
apache-2.0
null
null
null
null
null
null
null
InfiniDepth/model/block/prompt_models/sam.py
null
null
null
null
null
null
Python
2026-05-04T02:41:31.312382
# Copyright (c) Meta Platforms, Inc. and affiliates. # All rights reserved. # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. from typing import Tuple, Type import torch from .utils.pe_utils import PositionEmbeddingRandom from .utils.transformer im...
zju3dv/InfiniDepth
https://github.com/zju3dv/InfiniDepth
null
null
null
null
949
null
null
apache-2.0
null
null
null
null
null
null
null
InfiniDepth/model/block/torchhub/dinov3/dinov3/configs/__init__.py
null
null
null
null
null
null
Python
2026-05-04T02:41:31.478935
# Copyright (c) Meta Platforms, Inc. and affiliates. # # This software may be used and distributed in accordance with # the terms of the DINOv3 License Agreement. from .config import ( DinoV3SetupArgs, apply_scaling_rules_to_cfg, exit_job, get_cfg_from_args, get_default_config, setup_config, ...
zju3dv/InfiniDepth
https://github.com/zju3dv/InfiniDepth
null
null
null
null
949
null
null
apache-2.0
null
null
null
null
null
null
null
InfiniDepth/model/block/torchhub/dinov3/dinov3/configs/config.py
null
null
null
null
null
null
Python
2026-05-04T02:41:31.501767
# Copyright (c) Meta Platforms, Inc. and affiliates. # # This software may be used and distributed in accordance with # the terms of the DINOv3 License Agreement. import logging import math import os import pathlib import sys from dataclasses import dataclass, field from datetime import timedelta from typing import An...
zju3dv/InfiniDepth
https://github.com/zju3dv/InfiniDepth
null
null
null
null
949
null
null
apache-2.0
null
null
null
null
null
null
null
InfiniDepth/model/block/torchhub/dinov3/dinov3/data/adapters.py
null
null
null
null
null
null
Python
2026-05-04T02:41:31.551650
# Copyright (c) Meta Platforms, Inc. and affiliates. # # This software may be used and distributed in accordance with # the terms of the DINOv3 License Agreement. from typing import Any, Optional, Tuple from torch.utils.data import Dataset def extend_samples_with_index(dataset_class): class DatasetWithIndex(dat...
zju3dv/InfiniDepth
https://github.com/zju3dv/InfiniDepth
null
null
null
null
949
null
null
apache-2.0
null
null
null
null
null
null
null
InfiniDepth/model/block/torchhub/dinov3/dinov3/data/__init__.py
null
null
null
null
null
null
Python
2026-05-04T02:41:31.552196
# Copyright (c) Meta Platforms, Inc. and affiliates. # # This software may be used and distributed in accordance with # the terms of the DINOv3 License Agreement. from .adapters import DatasetWithEnumeratedTargets from .augmentations import DataAugmentationDINO from .collate import collate_data_and_cast from .loaders ...
zju3dv/InfiniDepth
https://github.com/zju3dv/InfiniDepth
null
null
null
null
949
null
null
apache-2.0
null
null
null
null
null
null
null
InfiniDepth/model/block/torchhub/dinov3/dinov3/data/augmentations.py
null
null
null
null
null
null
Python
2026-05-04T02:41:31.584512
# Copyright (c) Meta Platforms, Inc. and affiliates. # # This software may be used and distributed in accordance with # the terms of the DINOv3 License Agreement. import logging import numpy as np from torch import nn from torchvision import transforms from dinov3.data.transforms import IMAGENET_DEFAULT_MEAN, IMAGEN...