osu!的实用程序库。提供从文件或从API解析重放的支持,以及不稳定的速率、打击、相似性和帧时间计算的支持。
项目描述
Circlecore (文档)
Circlecore是osu!的实用程序库。功能包括
- 不稳定的速率计算
- 判定计算(将所有打击对象分类为miss、hit300s、hit100s、hit50s或sliderbreaks)
- 两个重放之间的相似性计算,用于重放窃取检测
- 帧时间计算,用于时间扭曲检测
- 卡顿、可疑动作检测(称为Snaps)
Circlecore由Circleguard(重放分析工具)使用。
Circlecore由以下人员开发和维护:
安装
Circlecore可以从pip安装
pip install circleguard
本文档将项目称为circlecore
以区分我们的组织Circleguard和重放分析工具Circleguard。然而,circlecore
以circleguard
的名称从pypi安装,并在代码中以此方式导入(import circleguard
)。
链接
Github: https://github.com/circleguard/circlecore
文档:https://circleguard.github.io/circlecore/
Discord:https://discord.gg/VNnkTjm
使用方法
我们提供了完整的教程和文档在https://circleguard.github.io/circlecore/。如果您想立即开始,以下是一个快速入门指南
from circleguard import *
# replace "key" with your api key
cg = Circleguard("key")
# replay on http://osu.ppy.sh/b/221777 by http://osu.ppy.sh/u/2757689
replay = ReplayMap(221777, 2757689)
print(cg.ur(replay)) # unstable rate
print(cg.frametime(replay)) # average frametime
print(cg.frametimes(replay)) # full frametime list
print(cg.hits(replay)) # where the replay hits hitobjects
print(cg.snaps(replay)) # any jerky/suspicious movement
replay2 = ReplayMap(221777, 4196808)
print(cg.similarity(replay, replay2)) # how similar the replays are
# ReplayMap isn't the only way to represent replays; we can also
# get a beatmap's top 3 plays
map_ = cg.Map(221777, span="1-3")
# or a User's fifteenth and twentieth best plays
user = cg.User(124493, span="15, 20")
# or a local replay
replay3 = ReplayPath("/path/to/local/osr/replay.osr")
# and more. You can find them all at
# https://circleguard.github.io/circlecore/appendix.html#circleguard.loadables.Loadable
# maps and users can be iterated over
for r in map_:
print(cg.ur(r))
贡献
加入我们的Discord并询问如何帮助,或者寻找您感兴趣的开源问题并解决它们。欢迎提交拉取请求!
项目详情
下载文件
下载适用于您平台的文件。如果您不确定选择哪个,请了解有关安装包的更多信息。
源代码分发
circleguard-5.4.3.tar.gz (66.0 kB 查看哈希值)
构建分发
circleguard-5.4.3-py3-none-any.whl (73.0 kB 查看哈希值)