cfkit
cfkit is a lightweight and efficient CLI tool designed for Codeforces.
It’s easy to use, fast and works across platforms.
Installation | Usage | FAQ
1. Introduction
Overview:
cfkit is a fast, cross-platform (Windows, macOS, Linux) command-line interface (CLI) tool built for Codeforces users to simplify competitive programming. It focuses on result comparison, fetching problem samples, and automating routine contest tasks, allowing users to focus more on problem-solving.
Features:
-
Efficient Result Comparison: Compare floating-point numbers, allow any-order comparison, or use strict comparison.
-
High Traffic Resilience: Parses problem data even under server load.
-
Language Support: Compatible with all programming languages used on Codeforces.
-
Fetch Problem Samples: Retrieves sample test cases for problems.
-
Local Compilation and Testing: Compile and test solutions locally.
-
Template-Based Code Generation: Generate code with templates, including timestamps and author info.
-
Contest Problem Stats: Lists problem statistics for specific contests.
-
Enhanced CLI Output: Distinguish correct and incorrect results easily with colored output.
2. Installation
Ensure Python is installed on your system. Then, run these commands in your terminal:
pip install cfkit
cf config all
And your are ready to go!
3. Usage
cf run 2000a.cpp Compiles and tests your solution locally,
fetching and parsing missing sample test cases,
then comparing your output to the expected results with highlighted differences.
Options:
-o: Accept answers in any order.
-c: Run only custom samples or use custom input without comparing results.
-s: Do not ignore extra spaces during comparison.
-n: Do not ignore extra new lines during comparison.
cf gen 2000a Generates a code file from the default (or chosen) template.
In your template code, you can include various placeholders. When you generate code from the template, these placeholders will be automatically replaced with specific values:
$%author%$ (e.g., ghoudiy).
$%year%$ (e.g., 2024).
$%month%$ (e.g., 9).
$%day%$ (e.g., 7).
$%hour%$ (e.g., 12).
$%minute%$ (e.g., 05).
$%second%$ (e.g., 00).
cf parse 2000 Fetch all sample test cases from a contest.
4. FAQ
Q: How do I add a new test case?
A: To add a new test case, create two files: inK.txt and outK.txt, where K is a number. If you're using Linux or MacOs, omit the .txt extension (e.g., in1, ou1, in2, out2). You can create additional test cases by increasing the value of K (e.g., in1.txt, out1.txt, in2.txt, out2.txt).
Q: How to update cfkit package?
A: pip install --upgrade cfkit
5. Contact
I’m always open to feedback, suggestions, and collaboration! If you have any questions or want to get in touch, feel free to reach out:
Email: ghoudi.dev@gmail.com
GitHub: my github account — check out my other projects or contribute to ongoing ones.
Support: If you’d like to support my work and help me continue creating cool programs, you can do so here.
Looking forward to hearing from you! :)
Metadata
Release files for cfkit 0.0.30
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| cfkit-0.0.30.tar.gz | 16.3 MB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cfkit-0.0.30-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 25.3 MB
Release files / cfkit-0.0.30.tar.gz
| Download URL | cfkit-0.0.30.tar.gz |
|---|---|
| Size | 16.3 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3ec57a2eef258f83a6d5f7be25cab20a2cc430467c9cd8ac6790fd4b3ef76276
|
|
BLAKE2b-256 checksum How to use checksums |
cad5d9856e70c268f315c0ffb88b7a4b0f01f648bfb478270cbdc789a893b448
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.12.3
|
Release files / cfkit-0.0.30-py3-none-any.whl
| Download URL | cfkit-0.0.30-py3-none-any.whl |
|---|---|
| Size | 9.0 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fdb63084f7fb99d9cc944fb17ebe6e746f7a3c28ea235359047e6469b8f8b586
|
|
BLAKE2b-256 checksum How to use checksums |
3dfe106cea42f75ae90dbb8a5b16110a551059cd0c9f0cfa89a26013b9759753
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.12.3
|
Security for cfkit 0.0.30
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.