Skip to main content

A tool for managing coding competitions.

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.30.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.30-py3-none-any.whl (9.0 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: cfkit-0.0.30.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.30.tar.gz
Algorithm Hash digest
SHA256 3ec57a2eef258f83a6d5f7be25cab20a2cc430467c9cd8ac6790fd4b3ef76276
MD5 0f015669394699ae94b01bf6eea16fc8
BLAKE2b-256 cad5d9856e70c268f315c0ffb88b7a4b0f01f648bfb478270cbdc789a893b448

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cfkit-0.0.30-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.30-py3-none-any.whl
Algorithm Hash digest
SHA256 fdb63084f7fb99d9cc944fb17ebe6e746f7a3c28ea235359047e6469b8f8b586
MD5 4cfa178aa087ec9c13199dc67d09cdfb
BLAKE2b-256 3dfe106cea42f75ae90dbb8a5b16110a551059cd0c9f0cfa89a26013b9759753

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