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
JosephLai241/URS
https://github.com/JosephLai241/URS
null
null
null
null
989
null
null
mit
null
null
null
null
null
null
null
urs/praw_scrapers/live_scrapers/utils/DisplayStream.py
null
null
null
null
null
null
Python
2026-05-04T01:31:07.996471
""" Display stream ============== Defining methods to format data that will appear in the terminal. """ from typing import Any, Dict, List from prettytable import PrettyTable class DisplayStream: """ Methods to format and display Reddit stream objects. """ @staticmethod def _populate_table( ...
JosephLai241/URS
https://github.com/JosephLai241/URS
null
null
null
null
989
null
null
mit
null
null
null
null
null
null
null
urs/praw_scrapers/live_scrapers/utils/StreamGenerator.py
null
null
null
null
null
null
Python
2026-05-04T01:31:08.014570
""" Stream Generator ================ Defining methods for the stream generator which yields new Reddit objects and converts them to JSON serializable objects when saving to file. """ from typing import Any, Dict, Generator, Union from praw.models.reddit.redditor import RedditorStream from praw.models.reddit.subredd...
JosephLai241/URS
https://github.com/JosephLai241/URS
null
null
null
null
989
null
null
mit
null
null
null
null
null
null
null
urs/praw_scrapers/static_scrapers/Basic.py
null
null
null
null
null
null
Python
2026-05-04T01:31:08.368171
""" Basic Subreddit scraper ======================= Defining the interface for the basic Subreddit scraper. """ import logging from argparse import ArgumentParser, Namespace from typing import Any, Dict, List, Tuple, Union from colorama import Fore, Style from halo import Halo from praw import Reddit from urs.praw_...
JosephLai241/URS
https://github.com/JosephLai241/URS
null
null
null
null
989
null
null
mit
null
null
null
null
null
null
null
urs/praw_scrapers/static_scrapers/Comments.py
null
null
null
null
null
null
Python
2026-05-04T01:31:08.375618
""" Submission comments scraper =========================== Defining methods for the submission comments scraper. """ import json import logging from argparse import Namespace from typing import Any, Dict, List from colorama import Fore, Style from halo import Halo from praw import Reddit from praw.models import Sub...
JosephLai241/URS
https://github.com/JosephLai241/URS
null
null
null
null
989
null
null
mit
null
null
null
null
null
null
null
urs/analytics/Wordcloud.py
null
null
null
null
null
null
Python
2026-05-04T01:31:08.376672
""" Wordcloud Generator =================== Generate a wordcloud based on word frequencies extracted from scraped data. """ from argparse import Namespace from pathlib import Path from typing import List import matplotlib.pyplot as plt from colorama import Fore, Style from halo import Halo from wordcloud import Word...
JosephLai241/URS
https://github.com/JosephLai241/URS
null
null
null
null
989
null
null
mit
null
null
null
null
null
null
null
urs/praw_scrapers/static_scrapers/Redditor.py
null
null
null
null
null
null
Python
2026-05-04T01:31:08.385361
""" Redditor scraper ================ Defining methods for the Redditor scraper. """ from argparse import Namespace from typing import Any, Dict, List, Tuple, Union from colorama import Fore, Style from halo import Halo from praw import Reddit from praw.models import Comment, Redditor, Submission from prawcore impor...
JosephLai241/URS
https://github.com/JosephLai241/URS
null
null
null
null
989
null
null
mit
null
null
null
null
null
null
null
urs/praw_scrapers/utils/Objectify.py
null
null
null
null
null
null
Python
2026-05-04T01:31:09.096498
""" Create Reddit objects ===================== Defining methods to create JSON serializable objects from Reddit metadata. """ from typing import Any, Dict from praw.models import Comment, Multireddit, Submission, Subreddit from urs.utils.Global import convert_time class Objectify: """ Methods for creatin...
JosephLai241/URS
https://github.com/JosephLai241/URS
null
null
null
null
989
null
null
mit
null
null
null
null
null
null
null
urs/praw_scrapers/utils/Validation.py
null
null
null
null
null
null
Python
2026-05-04T01:31:09.209801
""" PRAW validation =============== Validation methods for PRAW credentials and scrapers. """ import logging from argparse import ArgumentParser from typing import Dict, List, Tuple, Union from colorama import Fore, Style from halo import Halo from praw import Reddit, models from prawcore import NotFound, PrawcoreEx...
JosephLai241/URS
https://github.com/JosephLai241/URS
null
null
null
null
989
null
null
mit
null
null
null
null
null
null
null
urs/praw_scrapers/static_scrapers/Subreddit.py
null
null
null
null
null
null
Python
2026-05-04T01:31:14.087638
""" Subreddit scraper ================= Defining methods for the Subreddit scraper. """ import logging from argparse import Namespace from typing import Any, Dict, Iterator, List, Tuple from colorama import Fore, Style from halo import Halo from praw import Reddit from praw.models import Subreddit from prettytable i...
ctpbee/ctpbee
https://github.com/ctpbee/ctpbee
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
ctpbee/context/__init__.py
null
null
null
null
null
null
Python
2026-05-04T01:31:16.465318
from .proxy import current_app, _app_context_ctx, switch_app, get_app, del_app __all__ = [ current_app, _app_context_ctx, switch_app, get_app, del_app ]
ctpbee/ctpbee
https://github.com/ctpbee/ctpbee
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
ctpbee/app.py
null
null
null
null
null
null
Python
2026-05-04T01:31:16.467332
# coding:utf-8 import os from datetime import datetime from inspect import ismethod from multiprocessing import Value from threading import Thread from time import sleep from typing import Text from ctpbee import __version__ from ctpbee.center import Center from ctpbee.config import Config from ctpbee.constant import ...
ctpbee/ctpbee
https://github.com/ctpbee/ctpbee
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
ctpbee/context/proxy.py
null
null
null
null
null
null
Python
2026-05-04T01:31:16.468593
""" code are from [werkzeug](https://werkzeug.palletsprojects.com/en/2.0.x/) !!! In order to reduce the package volume, just copy code into here """ import copy import math import operator import sys import typing as t import warnings from functools import partial from threading import Lock from typing import Text F =...
ctpbee/ctpbee
https://github.com/ctpbee/ctpbee
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
ctpbee/__init__.py
null
null
null
null
null
null
Python
2026-05-04T01:31:16.533662
""" for the future of life """ __version__ = "1.7.3" # Here are pre import from ctpbee.app import CtpBee from ctpbee.constant import Mode from ctpbee.context import current_app, del_app, get_app, switch_app from ctpbee.data_handle import LocalPositionManager from ctpbee.date import get_day_from from ctpbee.func impo...
ctpbee/ctpbee
https://github.com/ctpbee/ctpbee
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
ctpbee/cmdline.py
null
null
null
null
null
null
Python
2026-05-04T01:31:16.534814
import click import os @click.group() def cli(): pass def exec_command(password, command): if password is None: pass else: command = 'echo %s|sudo -S %s' % (password, command) click.echo(f"exec: {command}") os.system(command) def append_text_to_locale(password, text): if pa...
ctpbee/ctpbee
https://github.com/ctpbee/ctpbee
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
ctpbee/center.py
null
null
null
null
null
null
Python
2026-05-04T01:31:17.415421
""" ctpbee里面的核心数据访问模块 此模块描述了ctpbee里面默认的数据访问中心,同时它也可以被回测模块所调用 """ from abc import ABC from typing import Text, List from ctpbee.constant import Direction, TickData, ContractData, OrderData, TradeData, AccountData class Missing: def __init__(self, name): self.name = name def __str__(self): ...
ctpbee/ctpbee
https://github.com/ctpbee/ctpbee
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
ctpbee/config.py
null
null
null
null
null
null
Python
2026-05-04T01:31:17.456348
# -*- coding: utf-8 -*- """ use for refrence from flask config """ import errno import json import os import types from typing import Text class ConfigAttribute(object): """Makes an attribute forward to the config""" def __init__(self, name, get_converter=None): self.__name__ = name self.get_...
ctpbee/ctpbee
https://github.com/ctpbee/ctpbee
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
ci_script/test_func.py
null
null
null
null
null
null
Python
2026-05-04T01:31:17.521718
""" this file was used to check function if raise any error, means test was failed. the change should compatible with fronted version """ from datetime import datetime from unittest import TestCase # test the trading day class Test(TestCase): def test_looper(self): pass def test_get_current_trade_...
ctpbee/ctpbee
https://github.com/ctpbee/ctpbee
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
ctpbee/constant.py
null
null
null
null
null
null
Python
2026-05-04T01:31:17.700026
""" """ import inspect import os from dataclasses import dataclass, asdict from datetime import datetime, date from enum import Enum from logging import INFO from typing import Any def __set_attr__(self, key, value): # todo: is there a faster to get the last caller function name? father = inspect.getframeinf...
ctpbee/ctpbee
https://github.com/ctpbee/ctpbee
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
ctpbee/data_handle/local_position.py
null
null
null
null
null
null
Python
2026-05-04T01:31:17.764856
""" Notice : 神兽保佑 ,测试一次通过 // // ┏┛ ┻━━━━━┛ ┻┓ // ┃       ┃ // ┃   ━   ┃ // ┃ ┳┛  ┗┳ ┃ // ┃       ┃ // ┃   ┻   ┃ // ┃       ┃ // ┗━┓   ┏━━━┛ // ┃   ┃ Author: somewheve // ┃   ┃ Datetime: 2019/7/3 下午8:46 ---> 无知即是罪恶 // ┃   ┗━━━━━━━━━┓ // ┃   ...
ctpbee/ctpbee
https://github.com/ctpbee/ctpbee
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
ctpbee/indicator/__init__.py
null
null
null
null
null
null
Python
2026-05-04T01:31:18.018897
""" 提供指标纯向量化计算方法 todo: 提供任意结构组合的向量化回测结果 """ import numpy as np def read_indicator_from_data(): raise NotImplemented class Indicator: def __init__(self, n=10): self._n = n def flush(self): raise NotImplemented
ctpbee/ctpbee
https://github.com/ctpbee/ctpbee
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
ctpbee/indicator/back.py
null
null
null
null
null
null
Python
2026-05-04T01:31:18.083406
""" 这里是向量化回测内容以及可视化 主要用于快速回测结果 todo: 通过编写函数对应的参数以及需要执行的函数 来计算出最后的回测结果 """ class VectorBackTest: raise NotImplemented
ctpbee/ctpbee
https://github.com/ctpbee/ctpbee
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
ctpbee/exceptions/exception.py
null
null
null
null
null
null
Python
2026-05-04T01:31:18.100900
""" exception 存放了基础自定义的异常模块 """ import ctpbee.helpers as helpers class BaseException(Exception): def __init__(self, *args): self.args = args class ConfigError(BaseException): def __init__(self, code=101, message='配置异常', args=('配置信息存在错误',)): self.args = args self.message = message ...
ctpbee/ctpbee
https://github.com/ctpbee/ctpbee
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
ctpbee/indicator/indicator.py
null
null
null
null
null
null
Python
2026-05-04T01:31:18.114313
""" 纯numpy实现指标计算方法 注:大部分来自于网上,已修复并扩展 """ import numpy as np def rolling(data, window): """创建滚动窗口 Args: data: 输入数据数组 window: 窗口大小 Returns: 滚动窗口数组 """ shape = data.shape[:-1] + (data.shape[-1] - window + 1, window) strides = data.strides + (data.strides[-1],) retu...
ctpbee/ctpbee
https://github.com/ctpbee/ctpbee
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
ctpbee/exceptions/__init__.py
null
null
null
null
null
null
Python
2026-05-04T01:31:18.219181
from .exception import (DatabaseError, ConfigError, ContextError, TraderError, MarketError, DataError) __all__ = [DatabaseError, ConfigError, ContextError, TraderError, MarketError, DataError]
ctpbee/ctpbee
https://github.com/ctpbee/ctpbee
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
ctpbee/interface/__init__.py
null
null
null
null
null
null
Python
2026-05-04T01:31:18.303666
""" Notice : 神兽保佑 ,测试一次通过 // // ┏┛ ┻━━━━━┛ ┻┓ // ┃       ┃ // ┃   ━   ┃ // ┃ ┳┛  ┗┳ ┃ // ┃       ┃ // ┃   ┻   ┃ // ┃       ┃ // ┗━┓   ┏━━━┛ // ┃   ┃ Author: somewheve // ┃   ┃ Datetime: 2019/7/7 下午2:45 ---> 无知即是罪恶 // ┃   ┗━━━━━━━━━┓ // ┃   ...
ctpbee/ctpbee
https://github.com/ctpbee/ctpbee
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
ctpbee/data_handle/__init__.py
null
null
null
null
null
null
Python
2026-05-04T01:31:18.341269
from .local_position import PositionHolding, LocalPositionManager local_position = PositionHolding
ctpbee/ctpbee
https://github.com/ctpbee/ctpbee
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
ctpbee/interface/ctp/md_api.py
null
null
null
null
null
null
Python
2026-05-04T01:31:19.352531
import ctpbee.signals from blinker import NamedSignal from ctpbee.constant import * from ctpbee.interface.func import * from .lib import * class BeeMdApi(MdApi): """""" def __init__(self, app_signal): """Constructor""" super(BeeMdApi, self).__init__() self.gateway_name = "ctp" ...
ctpbee/ctpbee
https://github.com/ctpbee/ctpbee
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
ctpbee/interface/ctp/td_api.py
null
null
null
null
null
null
Python
2026-05-04T01:31:19.367211
""" Notice : 神兽保佑 ,测试一次通过 // // ┏┛ ┻━━━━━┛ ┻┓ // ┃       ┃ // ┃   ━   ┃ // ┃ ┳┛  ┗┳ ┃ // ┃       ┃ // ┃   ┻   ┃ // ┃       ┃ // ┗━┓   ┏━━━┛ // ┃   ┃ Author: somewheve // ┃   ┃ Datetime: 2019/6/13 下午7:54 ---> 无知即是罪恶 // ┃   ┗━━━━━━━━━┓ // ┃  ...
ctpbee/ctpbee
https://github.com/ctpbee/ctpbee
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
ctpbee/interface/ctp/lib.py
null
null
null
null
null
null
Python
2026-05-04T01:31:19.451550
from ctpbee_api.ctp import * from ctpbee.constant import ( Direction, Offset, Exchange, OrderType, Product, Status, OptionType ) STATUS_CTP2VT = { THOST_FTDC_OAS_Submitted: Status.SUBMITTING, THOST_FTDC_OAS_Accepted: Status.SUBMITTING, THOST_FTDC_OAS_Rejected: Status.REJECTED, ...
ctpbee/ctpbee
https://github.com/ctpbee/ctpbee
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
ctpbee/interface/ctp_mini/lib.py
null
null
null
null
null
null
Python
2026-05-04T01:31:19.826582
import pytz from ctpbee_api.ctp_mini import * from ctpbee.constant import * STATUS_MINI2VT = { THOST_FTDC_OAS_Submitted: Status.SUBMITTING, THOST_FTDC_OAS_Accepted: Status.SUBMITTING, THOST_FTDC_OAS_Rejected: Status.REJECTED, THOST_FTDC_OST_NoTradeQueueing: Status.NOTTRADED, THOST_FTDC_OST_PartTra...
ctpbee/ctpbee
https://github.com/ctpbee/ctpbee
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
ctpbee/interface/ctp_rohon/lib.py
null
null
null
null
null
null
Python
2026-05-04T01:31:19.938714
from ctpbee_api.rohon import * from ctpbee.constant import ( Direction, Offset, Exchange, OrderType, Product, Status, OptionType ) STATUS_CTP2VT = { THOST_FTDC_OAS_Submitted: Status.SUBMITTING, THOST_FTDC_OAS_Accepted: Status.SUBMITTING, THOST_FTDC_OAS_Rejected: Status.REJECTED...
ctpbee/ctpbee
https://github.com/ctpbee/ctpbee
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
ctpbee/interface/ctp_rohon/md_api.py
null
null
null
null
null
null
Python
2026-05-04T01:31:19.972060
import ctpbee.signals from blinker import NamedSignal from ctpbee.constant import * from ctpbee.interface.func import * from ctpbee.interface.ctp_rohon.lib import * class RHMdApi(RohonMdApi): """""" def __init__(self, app_signal): """Constructor""" super(RHMdApi, self).__init__() se...
ctpbee/ctpbee
https://github.com/ctpbee/ctpbee
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
ctpbee/interface/ctp_rohon/td_api.py
null
null
null
null
null
null
Python
2026-05-04T01:31:20.182488
""" Notice : 神兽保佑 ,测试一次通过 // // ┏┛ ┻━━━━━┛ ┻┓ // ┃       ┃ // ┃   ━   ┃ // ┃ ┳┛  ┗┳ ┃ // ┃       ┃ // ┃   ┻   ┃ // ┃       ┃ // ┗━┓   ┏━━━┛ // ┃   ┃ Author: somewheve // ┃   ┃ Datetime: 2019/6/13 下午7:54 ---> 无知即是罪恶 // ┃   ┗━━━━━━━━━┓ // ┃  ...
ctpbee/ctpbee
https://github.com/ctpbee/ctpbee
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
ctpbee/interface/func.py
null
null
null
null
null
null
Python
2026-05-04T01:31:20.255070
import os from pathlib import Path def _get_trader_dir(temp_name: str): """ Get path where trader is running in. """ cwd = Path.cwd() temp_path = cwd.joinpath(temp_name) if temp_path.exists(): return cwd, temp_path # Otherwise use home path of system. home_path = Path.home() ...
ctpbee/ctpbee
https://github.com/ctpbee/ctpbee
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
ctpbee/interface/local/market.py
null
null
null
null
null
null
Python
2026-05-04T01:31:20.377661
import json from threading import Thread from redis.client import Redis import ctpbee.signals from blinker import NamedSignal from ctpbee.constant import EVENT_TICK, Event, EVENT_LOG class MdApi: def __init__(self, app_signal): self.order_down_kernel = None self.order_up_kernel = None s...
ctpbee/ctpbee
https://github.com/ctpbee/ctpbee
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
ctpbee/interface/local/trading.py
null
null
null
null
null
null
Python
2026-05-04T01:31:20.513261
import json from threading import Thread from time import sleep from redis.client import Redis from ctpbee.constant import Event, EVENT_LOG, OrderRequest, CancelRequest, OrderData, EVENT_ORDER, TradeData, \ EVENT_TRADE, ContractData, EVENT_CONTRACT, QueryContract, EVENT_INIT_FINISHED from ctpbee.stream import UDD...
ctpbee/ctpbee
https://github.com/ctpbee/ctpbee
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
ctpbee/interface/looper/__init__.py
null
null
null
null
null
null
Python
2026-05-04T01:31:20.595532
""" 回测基本模块 """ from .md_api import LooperMe from .td_api import LooperYou __all__ = [LooperYou, LooperMe]
ctpbee/ctpbee
https://github.com/ctpbee/ctpbee
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
ctpbee/interface/looper/td_api.py
null
null
null
null
null
null
Python
2026-05-04T01:31:20.839894
""" ctpbee里面内置模拟成交网关 ---> 主要调用回测接口进行处理 """ from ctpbee.constant import EVENT_POSITION, EVENT_ACCOUNT from ctpbee.looper.interface import LocalLooper class LooperYou(LocalLooper): """ 模拟成交接口网关, 负责向上提供API 三点之后发起结算 """ def __init__(self, app_signal, app): super().__init__(app_signal, app) ...
ctpbee/ctpbee
https://github.com/ctpbee/ctpbee
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
ctpbee/interface/looper/md_api.py
null
null
null
null
null
null
Python
2026-05-04T01:31:20.857754
from ctpbee.signals import common_signals from ctpbee.constant import EVENT_TICK, Event class LooperMe: def __init__(self, app_signal): self.app_signal = app_signal self.gateway_name = "SIM" self.login_status = True @property def md_status(self): return self.login_status ...
ctpbee/ctpbee
https://github.com/ctpbee/ctpbee
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
ctpbee/jsond/tag.py
null
null
null
null
null
null
Python
2026-05-04T01:31:21.142716
import re from datetime import datetime from enum import Enum TAG_ENUM = 'enum' TAG_DICT = 'dict' TAG_LIST = 'list' TAG_TUPLE = 'tuple' TAG_DATETIME = 'datetime' TAG_BYTES = 'bytes' TAG_STR = 'str' TAG_NUM = 'num' TAG_DATACLASS = 'dataclass' TAG_NONE = 'none' TAG_SET = 'set' class PollenTag(object): def __init__...
ctpbee/ctpbee
https://github.com/ctpbee/ctpbee
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
ctpbee/jsond/pollen.py
null
null
null
null
null
null
Python
2026-05-04T01:31:21.226109
import json from collections import defaultdict from ctpbee.constant import enums, data_class, request_class from ctpbee.jsond.tag import tags class Mether: def __init_subclass__(cls, **kwargs): cls.labeling(tags) cls.add_enum(enums) cls.add_data_class(data_class) cls.add_request...
ctpbee/ctpbee
https://github.com/ctpbee/ctpbee
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
ctpbee/level.py
null
null
null
null
null
null
Python
2026-05-04T01:31:21.416473
import inspect import os import types from functools import wraps from types import MethodType from typing import Set, List, AnyStr, Text from warnings import warn import ctpbee.constant from ctpbee.center import Center from ctpbee.constant import EVENT_INIT_FINISHED, EVENT_TICK, EVENT_BAR, EVENT_ORDER, EVENT_SHARED, ...
ctpbee/ctpbee
https://github.com/ctpbee/ctpbee
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
ctpbee/log.py
null
null
null
null
null
null
Python
2026-05-04T01:31:21.437485
""" 实现一个默认的LoggerClass<<<<<<< dev log格式 时间 ---- 执行者 ---- 等级 ---- 信息 """ from cologer import loger, Fore, Back, Style from datetime import datetime def get_time(): return datetime.now().strftime("%Y-%m-%d %H:%M:%S") loger.set_format('{created} {name} {levelname} {owner} {message}') # info loger.info.fiel...
ctpbee/ctpbee
https://github.com/ctpbee/ctpbee
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
ctpbee/looper/data.py
null
null
null
null
null
null
Python
2026-05-04T01:31:21.736700
""" 回测数据模块 数据应该是需要被特殊处理的, 这样才可以达到最佳访问速度 todo: 优化数据访问速度 --------- > """ from datetime import datetime from itertools import chain from typing import Iterable, Tuple, Sized, Generator class Bumblebee(dict): """ """ __slots__ = ['last_price', 'datetime', 'open_price', "high_price", "low_price", "close_price", "...
ctpbee/ctpbee
https://github.com/ctpbee/ctpbee
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
ctpbee/looper/account.py
null
null
null
null
null
null
Python
2026-05-04T01:31:21.767212
""" * 账户模块, 存储资金修改, 负责对外部的成交单进行成交撮合 并扣除手续费 等操作 * 需要向外提供API trading: 发起交易 is_traded: 是否可以进行交易 result: 回测结果 """ import math from collections import defaultdict from copy import deepcopy from datetime import datetime from ctpbee.record import Recorder try: from statistics import geometric_mean except Im...
ctpbee/ctpbee
https://github.com/ctpbee/ctpbee
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
ctpbee/looper/interface.py
null
null
null
null
null
null
Python
2026-05-04T01:31:21.850463
import random import uuid from copy import deepcopy from datetime import timedelta, datetime from ctpbee.constant import OrderRequest, Direction, OrderData, CancelRequest, TradeData, BarData, \ TickData, Status, Event, EVENT_ORDER, EVENT_TRADE, EVENT_LOG, EVENT_ERROR, \ EVENT_INIT_FINISHED, EVENT_BAR, EVENT_TI...
ctpbee/ctpbee
https://github.com/ctpbee/ctpbee
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
ctpbee/looper/report.py
null
null
null
null
null
null
Python
2026-05-04T01:31:21.997732
""" 此模块是用来帮助ctpbee的回测来生成指定的策略报告,UI本身采用 """ import os import webbrowser from jinja2 import Environment, PackageLoader, select_autoescape from ctpbee.func import get_ctpbee_path from ctpbee.func import join_path env = Environment( loader=PackageLoader('ctpbee', 'looper/templates'), autoescape=select_autoescap...
ctpbee/ctpbee
https://github.com/ctpbee/ctpbee
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
ctpbee/func.py
null
null
null
null
null
null
Python
2026-05-04T01:31:22.093946
""" 面向用户的函数 ,提供极其便捷的体验 """ import os import platform from datetime import time, datetime, timedelta, date from inspect import isfunction from multiprocessing import Process from time import sleep from typing import Text, Any, List from ctpbee.constant import \ (OrderRequest, CancelRequest, Direction, Exchange, ...
ctpbee/ctpbee
https://github.com/ctpbee/ctpbee
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
ctpbee/helpers.py
null
null
null
null
null
null
Python
2026-05-04T01:31:22.285172
""" 工具函数 """ import ctypes import inspect import os import pkgutil import random import sys import time import types import warnings from datetime import datetime, time from functools import wraps from io import TextIOWrapper from threading import RLock from time import sleep from typing import AnyStr, IO from ctpbee....
ctpbee/ctpbee
https://github.com/ctpbee/ctpbee
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
ctpbee/interface/ctp_mini/md_api.py
null
null
null
null
null
null
Python
2026-05-04T01:31:23.859116
from blinker import NamedSignal import ctpbee.signals from .lib import * from ..func import get_folder_path class MMdApi(MiniMdApi): def __init__(self, app_signal): """Constructor""" super(MMdApi, self).__init__() self.gateway_name = "ctp_mini" self.reqid = 0 self.app_si...
ctpbee/ctpbee
https://github.com/ctpbee/ctpbee
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
ctpbee/interface/ctp_mini/td_api.py
null
null
null
null
null
null
Python
2026-05-04T01:31:23.887915
from .lib import * from ..func import get_folder_path, LoginRequired class MTdApi(MiniTdApi, LoginRequired): """""" def __init__(self, app_signal): """Constructor""" LoginRequired.__init__(self) super(MTdApi, self).__init__() self.gateway_name = "ctp_mini" self.reqid ...
drprojects/superpoint_transformer
https://github.com/drprojects/superpoint_transformer
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
src/data/tensor_holder.py
null
null
null
null
null
null
Python
2026-05-04T01:31:25.881753
import torch import copy from typing import List, Dict, Union, Callable, Optional from torch_geometric.data.storage import recursive_apply_, recursive_apply from src.utils.memory import human_readable_memory __all__ = ['TensorHolderMixIn'] class TensorHolderMixIn: """MixIn class that allows applying several to...
drprojects/superpoint_transformer
https://github.com/drprojects/superpoint_transformer
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
src/data/csr.py
null
null
null
null
null
null
Python
2026-05-04T01:31:25.892676
import h5py import torch import numpy as np from time import time from typing import ( List, Tuple, Dict, Union, Any) import src from src.data.tensor_holder import TensorHolderMixIn from src.utils import ( tensor_idx, is_arange, is_sorted, indices_to_pointers, sizes_to_pointers,...
drprojects/superpoint_transformer
https://github.com/drprojects/superpoint_transformer
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
src/data/nag.py
null
null
null
null
null
null
Python
2026-05-04T01:31:25.901997
import h5py import torch import numpy as np from time import time from typing import Dict, List, Tuple, Union, Any from torch_geometric.nn.pool.consecutive import consecutive_cluster from torch_scatter import scatter_sum, scatter_mean import src from src.data.tensor_holder import TensorHolderMixIn from src.data impor...
drprojects/superpoint_transformer
https://github.com/drprojects/superpoint_transformer
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
src/__init__.py
null
null
null
null
null
null
Python
2026-05-04T01:31:25.904503
from .debug import is_debug_enabled, debug, set_debug import src.data import src.datasets import src.datamodules import src.loader import src.metrics import src.models import src.nn import src.transforms import src.utils import src.visualization __version__ = '3.0.0' __all__ = [ 'is_debug_enabled', 'debug', ...
drprojects/superpoint_transformer
https://github.com/drprojects/superpoint_transformer
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
src/data/instance.py
null
null
null
null
null
null
Python
2026-05-04T01:31:25.907809
import torch import numpy as np from torch.nn.functional import one_hot from typing import List, Tuple, Union from torch_geometric.nn.pool.consecutive import consecutive_cluster from torch_scatter import scatter_max, scatter_sum from src.data.csr import CSRData, CSRBatch from src.utils import tensor_idx, is_dense, has...
drprojects/superpoint_transformer
https://github.com/drprojects/superpoint_transformer
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
src/datamodules/base.py
null
null
null
null
null
null
Python
2026-05-04T01:31:25.910849
import torch import logging from pytorch_lightning import LightningDataModule from typing import Any, Dict, List, Tuple, Union from src.transforms import * from src.loader import DataLoader from src.data import NAGBatch, NAG, Data, Batch import torch_geometric.transforms as pygT log = logging.getLogger(__name__) #...
drprojects/superpoint_transformer
https://github.com/drprojects/superpoint_transformer
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
src/data/cluster.py
null
null
null
null
null
null
Python
2026-05-04T01:31:25.913012
import h5py import torch import numpy as np from time import time from typing import List, Tuple, Union from torch_geometric.nn.pool.consecutive import consecutive_cluster from src.data.csr import CSRData, CSRBatch from src.utils import ( has_duplicates, tensor_idx, load_tensor, is_arange) __all__ = ...
drprojects/superpoint_transformer
https://github.com/drprojects/superpoint_transformer
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
src/data/__init__.py
null
null
null
null
null
null
Python
2026-05-04T01:31:25.916374
from .csr import * from .cluster import * from .instance import * from .data import * from .nag import *
drprojects/superpoint_transformer
https://github.com/drprojects/superpoint_transformer
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
src/data/data.py
null
null
null
null
null
null
Python
2026-05-04T01:31:25.968722
import copy import h5py import torch import warnings import numpy as np from time import time from typing import ( List, Tuple, Optional, Union, Any, Dict) from torch_geometric.data import Data as PyGData from torch_geometric.data import Batch as PyGBatch from torch_geometric.nn.pool.consecutive...
drprojects/superpoint_transformer
https://github.com/drprojects/superpoint_transformer
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
src/datasets/__init__.py
null
null
null
null
null
null
Python
2026-05-04T01:31:26.941953
IGNORE_LABEL: int = -1 from .base import * from .dales import * from .kitti360 import * from .s3dis import * from .s3dis_room import * from .scannet import *
drprojects/superpoint_transformer
https://github.com/drprojects/superpoint_transformer
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
src/datamodules/scannet.py
null
null
null
null
null
null
Python
2026-05-04T01:31:26.943539
import logging from src.datamodules.base import BaseDataModule from src.datasets import ScanNet, MiniScanNet log = logging.getLogger(__name__) class ScanNetDataModule(BaseDataModule): """LightningDataModule for ScanNet dataset. A DataModule implements 5 key methods: def prepare_data(self): ...
drprojects/superpoint_transformer
https://github.com/drprojects/superpoint_transformer
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
src/datamodules/kitti360.py
null
null
null
null
null
null
Python
2026-05-04T01:31:26.947642
import logging from src.datamodules.base import BaseDataModule from src.datasets import KITTI360, MiniKITTI360 log = logging.getLogger(__name__) class KITTI360DataModule(BaseDataModule): """LightningDataModule for KITTI360 dataset. A DataModule implements 5 key methods: def prepare_data(self): ...
drprojects/superpoint_transformer
https://github.com/drprojects/superpoint_transformer
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
src/datamodules/s3dis_room.py
null
null
null
null
null
null
Python
2026-05-04T01:31:26.948540
import logging from src.datamodules.base import BaseDataModule from src.datasets import S3DISRoom, MiniS3DISRoom # Occasional Dataloader issues with S3DISRoomDataModule on some # machines. Hack to solve this: # https://stackoverflow.com/questions/73125231/pytorch-dataloaders-bad-file-descriptor-and-eof-for-workers0 i...
drprojects/superpoint_transformer
https://github.com/drprojects/superpoint_transformer
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
src/datamodules/s3dis.py
null
null
null
null
null
null
Python
2026-05-04T01:31:26.950146
import logging from src.datamodules.base import BaseDataModule from src.datasets import S3DIS, MiniS3DIS log = logging.getLogger(__name__) class S3DISDataModule(BaseDataModule): """LightningDataModule for S3DIS dataset. A DataModule implements 5 key methods: def prepare_data(self): # t...
drprojects/superpoint_transformer
https://github.com/drprojects/superpoint_transformer
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
src/datamodules/dales.py
null
null
null
null
null
null
Python
2026-05-04T01:31:26.951418
import logging from src.datamodules.base import BaseDataModule from src.datasets import DALES, MiniDALES log = logging.getLogger(__name__) class DALESDataModule(BaseDataModule): """LightningDataModule for DALES dataset. A DataModule implements 5 key methods: def prepare_data(self): # t...
drprojects/superpoint_transformer
https://github.com/drprojects/superpoint_transformer
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
src/datasets/dales.py
null
null
null
null
null
null
Python
2026-05-04T01:31:26.954568
import os import sys import torch import shutil import logging import os.path as osp from plyfile import PlyData from typing import List from torch_geometric.nn.pool.consecutive import consecutive_cluster from torch_geometric.data import extract_tar from src.datasets import BaseDataset from src.data import Data, Insta...
drprojects/superpoint_transformer
https://github.com/drprojects/superpoint_transformer
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
src/datasets/base.py
null
null
null
null
null
null
Python
2026-05-04T01:31:26.993849
import os import re import sys import os.path as osp import torch import random import logging import hashlib import warnings from tqdm import tqdm from time import time from datetime import datetime from itertools import product from tqdm.auto import tqdm as tq from typing import Any, List, Tuple, Union from torch_geo...
drprojects/superpoint_transformer
https://github.com/drprojects/superpoint_transformer
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
src/datasets/dales_config.py
null
null
null
null
null
null
Python
2026-05-04T01:31:28.036571
import numpy as np ######################################################################## # Download information # ######################################################################## FORM_URL = 'https://docs.google.com/forms/d/e/1FAIpQLSdl2Tag498Goc3yFPLllya3ICo...
drprojects/superpoint_transformer
https://github.com/drprojects/superpoint_transformer
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
src/eval.py
null
null
null
null
null
null
Python
2026-05-04T01:31:29.364913
import pyrootutils root = str(pyrootutils.setup_root( search_from=__file__, indicator=[".git", "README.md"], pythonpath=True, dotenv=True)) # ------------------------------------------------------------------------------------ # # `pyrootutils.setup_root(...)` is an optional line at the top of each en...
drprojects/superpoint_transformer
https://github.com/drprojects/superpoint_transformer
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
src/datasets/scannet.py
null
null
null
null
null
null
Python
2026-05-04T01:31:32.593678
import os import sys import torch import logging import os.path as osp from typing import List from torch_geometric.nn.pool.consecutive import consecutive_cluster from src.data import Data, InstanceData from src.utils.scannet import read_one_scan, read_one_test_scan from src.datasets.scannet_config import * from src.d...
drprojects/superpoint_transformer
https://github.com/drprojects/superpoint_transformer
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
src/datasets/s3dis_room.py
null
null
null
null
null
null
Python
2026-05-04T01:31:32.599951
import logging import os import os.path as osp from src.datasets.s3dis_config import * from src.datasets.s3dis import read_s3dis_room, S3DIS DIR = osp.dirname(osp.realpath(__file__)) log = logging.getLogger(__name__) __all__ = ['S3DISRoom', 'MiniS3DISRoom'] #########################################################...
drprojects/superpoint_transformer
https://github.com/drprojects/superpoint_transformer
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
src/debug.py
null
null
null
null
null
null
Python
2026-05-04T01:31:32.601335
# Copied from: __debug_flag__ = {'enabled': False} def is_debug_enabled(): r"""Returns :obj:`True`, if the debug mode is enabled.""" return __debug_flag__['enabled'] def set_debug_enabled(mode): __debug_flag__['enabled'] = mode class debug(object): r"""Context-manager that enables the debug mode ...
drprojects/superpoint_transformer
https://github.com/drprojects/superpoint_transformer
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
src/datasets/scannet_config.py
null
null
null
null
null
null
Python
2026-05-04T01:31:32.603353
import numpy as np ######################################################################## # Download information # ######################################################################## FORM_URL = "http://www.scan-net.org/ScanNet" ################################...
drprojects/superpoint_transformer
https://github.com/drprojects/superpoint_transformer
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
src/datasets/kitti360_config.py
null
null
null
null
null
null
Python
2026-05-04T01:31:32.605735
import numpy as np import os.path as osp from collections import namedtuple from src.datasets import IGNORE_LABEL as IGNORE ######################################################################## # Download information # ################################################...
drprojects/superpoint_transformer
https://github.com/drprojects/superpoint_transformer
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
src/datasets/kitti360.py
null
null
null
null
null
null
Python
2026-05-04T01:31:32.615470
import os import sys import glob import torch import shutil import logging from zipfile import ZipFile from plyfile import PlyData from typing import List from torch_geometric.data.extract import extract_zip from torch_geometric.nn.pool.consecutive import consecutive_cluster from src.datasets import BaseDataset from s...
drprojects/superpoint_transformer
https://github.com/drprojects/superpoint_transformer
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
src/datasets/s3dis_config.py
null
null
null
null
null
null
Python
2026-05-04T01:31:32.633005
import numpy as np ######################################################################## # Download information # ######################################################################## # Credit: https://github.com/torch-points3d/torch-points3d FORM_URL = "https:/...
drprojects/superpoint_transformer
https://github.com/drprojects/superpoint_transformer
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
src/datasets/s3dis.py
null
null
null
null
null
null
Python
2026-05-04T01:31:32.634351
import os import sys import glob import torch import shutil import logging import pandas as pd import os.path as osp from typing import List from torch_geometric.data import extract_zip from src.datasets import BaseDataset from src.data import Data, Batch, InstanceData from src.datasets.s3dis_config import * from src....
drprojects/superpoint_transformer
https://github.com/drprojects/superpoint_transformer
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
src/loader/dataloader.py
null
null
null
null
null
null
Python
2026-05-04T01:31:32.635786
from torch.utils.data import DataLoader as TorchDataLoader __all__ = ['DataLoader'] def __identity__(batch_list): """ fix for windows, where lambda can't be pickled. We have to use a top level function see: https://discuss.pytorch.org/t/cant-pickle-local-object-dataloader-init-loc...
drprojects/superpoint_transformer
https://github.com/drprojects/superpoint_transformer
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
src/loss/l1.py
null
null
null
null
null
null
Python
2026-05-04T01:31:34.277183
from torch.nn import L1Loss as TorchL1Loss from src.loss.weighted import WeightedLossMixIn __all__ = ['WeightedL1Loss', 'L1Loss'] class WeightedL1Loss(WeightedLossMixIn, TorchL1Loss): """Weighted L1 loss between predicted and target offsets. This is basically the L1Loss except that positive weights must be ...
drprojects/superpoint_transformer
https://github.com/drprojects/superpoint_transformer
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
src/loss/multi.py
null
null
null
null
null
null
Python
2026-05-04T01:31:34.278373
from torch import nn __all__ = ['MultiLoss'] class MultiLoss(nn.Module): """Wrapper to compute the weighted sum of multiple criteria :param criteria: List(callable) List of criteria :param lambdas: List(str) """ def __init__(self, criteria, lambdas): super().__init__() ...
drprojects/superpoint_transformer
https://github.com/drprojects/superpoint_transformer
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
src/loss/lovasz.py
null
null
null
null
null
null
Python
2026-05-04T01:31:34.279270
import torch from torch.nn.modules.loss import _Loss __all__ = ['LovaszLoss'] class LovaszLoss(_Loss): """Multi-class Lovasz-Softmax loss. Re-implementation of: Lovasz-Softmax and Jaccard hinge loss in PyTorch Maxim Berman 2018 ESAT-PSI KU Leuven (MIT License) Credit: https://github...
drprojects/superpoint_transformer
https://github.com/drprojects/superpoint_transformer
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
src/metrics/__init__.py
null
null
null
null
null
null
Python
2026-05-04T01:31:34.511866
from .semantic import * from .mean_average_precision import * from .panoptic import * from .weighted_li import *
drprojects/superpoint_transformer
https://github.com/drprojects/superpoint_transformer
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
src/loss/l2.py
null
null
null
null
null
null
Python
2026-05-04T01:31:34.686060
from torch.nn import MSELoss as TorchL2Loss from src.loss.weighted import WeightedLossMixIn __all__ = ['WeightedL2Loss', 'L2Loss'] class WeightedL2Loss(WeightedLossMixIn, TorchL2Loss): """Weighted mean squared error (ie L2 loss) between predicted and target offsets. This is basically the MSELoss except that...
drprojects/superpoint_transformer
https://github.com/drprojects/superpoint_transformer
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
src/metrics/semantic.py
null
null
null
null
null
null
Python
2026-05-04T01:31:35.030804
import os import torch import logging import numpy as np from torchmetrics.classification import MulticlassConfusionMatrix from torch_scatter import scatter_sum from src.metrics.mean_average_precision import BaseMetricResults log = logging.getLogger(__name__) __all__ = ['ConfusionMatrix', 'SemanticMetricResults'] ...
drprojects/superpoint_transformer
https://github.com/drprojects/superpoint_transformer
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
src/metrics/mean_average_precision.py
null
null
null
null
null
null
Python
2026-05-04T01:31:35.032188
import torch import logging import numpy as np import matplotlib.pyplot as plt from torch import Tensor, LongTensor from typing import Any, Dict, List, Optional, Sequence, Tuple from torchmetrics.detection.mean_ap import MeanAveragePrecision from torchmetrics.utilities.imports import _TORCHVISION_GREATER_EQUAL_0_8 from...
drprojects/superpoint_transformer
https://github.com/drprojects/superpoint_transformer
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
src/loss/weighted.py
null
null
null
null
null
null
Python
2026-05-04T01:31:35.061393
__all__ = ['WeightedLossMixIn'] class WeightedLossMixIn: """A mix-in for converting a torch loss into an item-weighted loss. """ def forward(self, input, target, weight): if weight is not None: assert weight.ge(0).all(), "Weights must be positive." assert weight.gt(0).any()...
drprojects/superpoint_transformer
https://github.com/drprojects/superpoint_transformer
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
src/metrics/panoptic.py
null
null
null
null
null
null
Python
2026-05-04T01:31:35.062779
import torch import logging from torch_scatter import scatter_sum from torch import Tensor, LongTensor from typing import Any, List, Optional, Sequence from torchmetrics.metric import Metric from torch_geometric.nn.pool.consecutive import consecutive_cluster from src.data import InstanceData, InstanceBatch from src.met...
drprojects/superpoint_transformer
https://github.com/drprojects/superpoint_transformer
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
src/metrics/weighted_li.py
null
null
null
null
null
null
Python
2026-05-04T01:31:35.746729
import logging from torch import Tensor from typing import Tuple from torchmetrics import MeanSquaredError, MeanAbsoluteError from torchmetrics.utilities.checks import _check_same_shape log = logging.getLogger(__name__) __all__ = ['WeightedL2Error', 'WeightedL1Error', 'L2Error', 'L1Error'] def _weighted_Li_error_...
drprojects/superpoint_transformer
https://github.com/drprojects/superpoint_transformer
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
src/models/components/spt.py
null
null
null
null
null
null
Python
2026-05-04T01:31:35.998771
import torch from torch import nn from typing import Any, List, Tuple, Dict, Union from src.data import Data, NAG from src.utils import listify_with_reference, VersionHolder from src.nn import Stage, PointStage, DownNFuseStage, UpNFuseStage, \ BatchNorm, CatFusion, MLP, LayerNorm from src.nn.pool import BaseAttenti...
drprojects/superpoint_transformer
https://github.com/drprojects/superpoint_transformer
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
src/loss/bce.py
null
null
null
null
null
null
Python
2026-05-04T01:31:37.332927
import torch from torch import Tensor from torch.nn import BCEWithLogitsLoss as TorchBCEWithLogitsLoss from src.loss.weighted import WeightedLossMixIn __all__ = ['WeightedBCEWithLogitsLoss', 'BCEWithLogitsLoss'] class WeightedBCEWithLogitsLoss(WeightedLossMixIn, TorchBCEWithLogitsLoss): """Weighted BCE loss bet...
drprojects/superpoint_transformer
https://github.com/drprojects/superpoint_transformer
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
src/loss/__init__.py
null
null
null
null
null
null
Python
2026-05-04T01:31:37.860407
from .bce import * from .multi import * from .lovasz import * from .focal import * from .l1 import * from .l2 import *
drprojects/superpoint_transformer
https://github.com/drprojects/superpoint_transformer
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
src/loss/focal.py
null
null
null
null
null
null
Python
2026-05-04T01:31:38.045610
from typing import Optional, Sequence import torch from torch import Tensor from torch import nn from torch.nn import functional as F __all__ = ['WeightedFocalLoss', 'BinaryFocalLoss'] class WeightedFocalLoss(nn.NLLLoss): """ Focal Loss, as described in https://arxiv.org/abs/1708.02002. It is essentially an...
drprojects/superpoint_transformer
https://github.com/drprojects/superpoint_transformer
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
src/models/components/mlp.py
null
null
null
null
null
null
Python
2026-05-04T01:31:40.597583
from torch_scatter import scatter from torch import nn from src.data import NAG from src.nn import MLP, BatchNorm __all__ = ['NodeMLP'] class NodeMLP(nn.Module): """Simple MLP on the handcrafted features of the level-i in a NAG. This is used as a baseline to test how expressive handcrafted features are....
drprojects/superpoint_transformer
https://github.com/drprojects/superpoint_transformer
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
src/models/components/__init__.py
null
null
null
null
null
null
Python
2026-05-04T01:31:40.620053
"""Model components groups architectures ready to be used a `net` in a LightningModule. These are complex architectures, on which a LightningModule can add heads and train for different types of tasks. """ from .spt import * from .mlp import *
drprojects/superpoint_transformer
https://github.com/drprojects/superpoint_transformer
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
src/loss/partition_criterion.py
null
null
null
null
null
null
Python
2026-05-04T01:31:43.288509
import torch from torch import nn from typing import Tuple from src.utils import PartitionOutput, compute_edge_distances_batch from src.loss.focal import BinaryFocalLoss import logging log = logging.getLogger(__name__) __all__ = [] class PartitionCriterion(nn.Module): """ A criterion for the partition learn...
facebookresearch/localrf
https://github.com/facebookresearch/localrf
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
localTensoRF/models/tensoRF.py
null
null
null
null
null
null
Python
2026-05-04T01:31:46.772418
# Copyright (c) Meta Platforms, Inc. and affiliates. # Copyright (c) 2022 Anpei Chen from cmath import nan import torch import torch.nn.functional as F from .tensorBase import TensorBase class TensorVMSplit(TensorBase): def __init__(self, device, aabb, gridSize, **kargs): super(TensorVMSplit, self).__ini...
facebookresearch/localrf
https://github.com/facebookresearch/localrf
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
localTensoRF/dataLoader/localrf_dataset.py
null
null
null
null
null
null
Python
2026-05-04T01:31:46.774102
# Copyright (c) Meta Platforms, Inc. and affiliates. # Copyright (c) 2022 Anpei Chen import os import random import numpy as np import torch import cv2 import re from joblib import delayed, Parallel from torch.utils.data import Dataset from utils.utils import decode_flow import json def concatenate_append(old, new,...
facebookresearch/localrf
https://github.com/facebookresearch/localrf
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
localTensoRF/local_tensorfs.py
null
null
null
null
null
null
Python
2026-05-04T01:31:46.775493
# Copyright (c) Meta Platforms, Inc. and affiliates. import math import torch from models.tensorBase import AlphaGridMask from models.tensoRF import TensorVMSplit from utils.utils import mtx_to_sixD, sixD_to_mtx from utils.ray_utils import get_ray_directions_lean, get_rays_lean, get_ray_directions_360 from utils.ut...
facebookresearch/localrf
https://github.com/facebookresearch/localrf
null
null
null
null
988
null
null
mit
null
null
null
null
null
null
null
localTensoRF/models/tensorBase.py
null
null
null
null
null
null
Python
2026-05-04T01:31:46.776066
# Copyright (c) Meta Platforms, Inc. and affiliates. # Copyright (c) 2022 Anpei Chen from cProfile import label import time import numpy as np import torch import torch.nn import torch.nn.functional as F from utils.ray_utils import contract def positional_encoding(positions, freqs): freq_bands = (2 ** torch.ar...