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 hashes)

Uploaded Source

Built Distribution

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

Uploaded Python 3

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