Skip to main content

Utilities for Competitive Programming

Project description

cputils

license MIT

Utilities for Competitive Programming.

Features:

  • Download samples from kattis, aceptaelreto.
  • Test in c, cpp, python, java, rust, ruby, bash, nim.
  • Submit to kattis.

Tests only for complete textual match, ignoring leading and trailing whistespaces.

Installation

Assuming you have a Python3 distribution with pip, install the package running:

pip3 install cputils

Usage

cpconfig

To create a config file, run

cpconfig

cpsamples

To download the samples of a problem run

cpsamples <problem>

cptest

To test a solution or set of solutions run

cptest <problem>/<solution(s)>

Pro-tip: you can use glob patterns like problem/code* or problem/*.py.

cpsubmit

To submit a solution (only kattis)

cpsubmit <problem>/<solution(s)>

Development

Testing

Testing requires installing the test extra. Furthermore, some tests require the languages to be installed and available.

To run all tests:

make test

To run a single test module:

pytest tests/test_<test_name>.py

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

cputils-0.2.0.tar.gz (7.7 kB view details)

Uploaded Source

Built Distribution

cputils-0.2.0-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

Details for the file cputils-0.2.0.tar.gz.

File metadata

  • Download URL: cputils-0.2.0.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.18

File hashes

Hashes for cputils-0.2.0.tar.gz
Algorithm Hash digest
SHA256 2d0c3c5a254e987ed9a4568eace394de0f7b7b49126acfc4b05c607061c7eaf9
MD5 25decb2a2c74a0d620b18a5100bce687
BLAKE2b-256 209a720fe564bac1ace263513a7b1f1d7c689fc8182d67a621d18b5e884a7aa7

See more details on using hashes here.

File details

Details for the file cputils-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: cputils-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 7.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.18

File hashes

Hashes for cputils-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a9fd567eda0581d55d6ef65b89be2f99477a6bbe827ef7e0b6431df7d80b1e27
MD5 4f028b369246fe0b569ac031250db536
BLAKE2b-256 6ea293e13afd528fdb749a83a2674af1d9327d487ffc435657359302cc694652

See more details on using hashes here.

Supported by

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