Skip to main content

A tool for managing coding competitions.

Reason this release was yanked:

Versions below 0.0.30 contain critical bugs. Please upgrade to the latest release

Project description

cfkit

platform Language Python_version license

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! :)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cfkit-0.0.28.tar.gz (16.3 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cfkit-0.0.28-py3-none-any.whl (9.0 MB view details)

Uploaded Python 3

File details

Details for the file cfkit-0.0.28.tar.gz.

File metadata

  • Download URL: cfkit-0.0.28.tar.gz
  • Upload date:
  • Size: 16.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.3

File hashes

Hashes for cfkit-0.0.28.tar.gz
Algorithm Hash digest
SHA256 2b7ca26f0abd3a2d36e3a6bebf004acbcf782884deb1cb0cf849f09862edd1a9
MD5 fadb1b6aec3016dc013abb2f37a7a15b
BLAKE2b-256 62516319906cb2125703ba04aa9bb2b36ed564f090c8fb73d4f17865c36742ec

See more details on using hashes here.

File details

Details for the file cfkit-0.0.28-py3-none-any.whl.

File metadata

  • Download URL: cfkit-0.0.28-py3-none-any.whl
  • Upload date:
  • Size: 9.0 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.3

File hashes

Hashes for cfkit-0.0.28-py3-none-any.whl
Algorithm Hash digest
SHA256 d4e7f3009dc417de2c0d747557520a16f2081093b4979a4b39c0bc4779b02362
MD5 a75340c4584a805af89d03cfd2d0d9c2
BLAKE2b-256 d2bac306d1c6ee232a9fdf7d4439ec2c4abe1e6459db54532aa32f34949d8513

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page