Utilities for Standard Ranklist (srk).
Project description
algoux-standard-ranklist-utils
Python utilities for Standard Ranklist (srk).
Supported srk versions: >=0.3.0 <0.4.0.
Install
pip install algoux-standard-ranklist-utils
Usage Sample
from standard_ranklist_utils import format_time_duration, resolve_text, sort_rows
format_time_duration([1.5, "h"], "min") # 90
resolve_text({"fallback": "English", "zh-CN": "中文"}, ["zh-CN"]) # 中文
sort_rows(ranklist["rows"], ranklist.get("sorter", {}).get("config"))
Utilities
formatters
format_time_duration: Convert an srkTimeDurationbetweenms,s,min,h, andd.pre_zero_fill: Left-pad a number with zeroes for fixed-width display.sec_to_time_str: Format elapsed seconds as a ranklist time string such as1:02:03or1D 1:02:03.number_to_alphabet: Convert a zero-based problem index to an alphabetic alias such asA,Z, orAA.alphabet_to_number: Convert an alphabetic problem alias back to a zero-based index.
resolvers
resolve_text: Resolve plain or i18n srk text using explicit language preferences and fallback text.resolve_contributor: Parse a contributor string intoname, optionalemail, and optionalurl.resolve_color: Normalize an srk color value to a CSS color string.resolve_theme_color: Expand a single color or theme color object into explicit light and dark colors.resolve_style: Resolve text/background style colors and auto-pick readable text color when needed.resolve_user_markers: Resolve a user's marker IDs to marker definitions from the ranklist config.
ranklist
sort_rows: Sort rows by ICPC solved count descending and penalty time ascending, with optional ranking-time precision.regenerate_ranklist_by_solutions: Rebuild rows, scores, sorting, and problem statistics from solution tetrads.regenerate_rows_by_incremental_solutions: Apply incremental solution tetrads to existing rows and re-sort them.convert_to_static_ranklist: Add precomputed per-series rank values and segment indexes to each row.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file algoux_standard_ranklist_utils-0.3.0.tar.gz.
File metadata
- Download URL: algoux_standard_ranklist_utils-0.3.0.tar.gz
- Upload date:
- Size: 13.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cbc6704c0a550056b805cfa9385ad6817c90f1d00b4e052546ffea214bc619f0
|
|
| MD5 |
199fbba9e01277555b3bf51f754a7c0c
|
|
| BLAKE2b-256 |
9cfd628acd04e0f56ce8a1fb7a3d259f0b6620c0bedf7245da7dcc49be51dc61
|
Provenance
The following attestation bundles were made for algoux_standard_ranklist_utils-0.3.0.tar.gz:
Publisher:
release.yml on algoux/standard-ranklist-utils
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
algoux_standard_ranklist_utils-0.3.0.tar.gz -
Subject digest:
cbc6704c0a550056b805cfa9385ad6817c90f1d00b4e052546ffea214bc619f0 - Sigstore transparency entry: 1573900930
- Sigstore integration time:
-
Permalink:
algoux/standard-ranklist-utils@c4ce812f0580886e1983c3c1cdceb693d36143d3 -
Branch / Tag:
refs/heads/master - Owner: https://github.com/algoux
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@c4ce812f0580886e1983c3c1cdceb693d36143d3 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file algoux_standard_ranklist_utils-0.3.0-py3-none-any.whl.
File metadata
- Download URL: algoux_standard_ranklist_utils-0.3.0-py3-none-any.whl
- Upload date:
- Size: 11.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3028e4b5b2005877806680dc2485366a70f2026215716a3f55d9a497aa23269b
|
|
| MD5 |
d51eebfa570d76f1375550ed15d949f8
|
|
| BLAKE2b-256 |
b86ee2938978fbad88201ae28e735b8af7fed4bdbcb833fc971e54ffcd64b95a
|
Provenance
The following attestation bundles were made for algoux_standard_ranklist_utils-0.3.0-py3-none-any.whl:
Publisher:
release.yml on algoux/standard-ranklist-utils
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
algoux_standard_ranklist_utils-0.3.0-py3-none-any.whl -
Subject digest:
3028e4b5b2005877806680dc2485366a70f2026215716a3f55d9a497aa23269b - Sigstore transparency entry: 1573900946
- Sigstore integration time:
-
Permalink:
algoux/standard-ranklist-utils@c4ce812f0580886e1983c3c1cdceb693d36143d3 -
Branch / Tag:
refs/heads/master - Owner: https://github.com/algoux
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@c4ce812f0580886e1983c3c1cdceb693d36143d3 -
Trigger Event:
workflow_dispatch
-
Statement type: