A CLI tool for solving Kattis problems with python.
Project description
pykattis
A CLI tool for solving Kattis problems with python.
Installation
pip install pykattis
Usage
To create a solution for a problem, run:
pykattis create {problem_id}
where problem_id
is the Kattis problem ID.
This creates the directory problems/{problem_id}
in the current working directory with the files solution.py
, an __init__.py
file, and downloads the sample input-anwer pairs to a samples.json
file.
The solution.py
-file is where you will be writing the solution to the problem.
Inside it is a function solve(input_: str) -> str:
, which you will fill out with your program as you see fit.
This function is called by the commands kattis run
and kattis test
.
To simply run the program as a script, run:
pykattis run {problem_id}
and to test it on the sample input-answer pairs defined in samples.json
, run:
pykattis test {problem_id}
To upload the solution to Kattis, you can submit the problem's solution.py
file through Kattis's web form.
However, this is a temporary solution.
In a future version, you will be able to publish your solution to Kattis directly through pykattis.
If you, for some reason, just want to download a problem's samples, you can run:
pykattis download_samples {problem_id}
It is recommended to use a VCS, like git, to keep track of your solutions.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pykattis-0.0.3.tar.gz
.
File metadata
- Download URL: pykattis-0.0.3.tar.gz
- Upload date:
- Size: 5.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b4e7ffee1c822e5fdb47664a37ab4d1a2213ed184fb36da5c177f1ec46c71049 |
|
MD5 | 999f2564ebc0ed743387c83b85f47c99 |
|
BLAKE2b-256 | 6de844b05c0630ca7544ca0823294af32a54af96297c72fb07b53638ab64b4c6 |
File details
Details for the file pykattis-0.0.3-py2.py3-none-any.whl
.
File metadata
- Download URL: pykattis-0.0.3-py2.py3-none-any.whl
- Upload date:
- Size: 8.2 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 10349592e708dd92c0def5e6ff7756c426309025a2a05eeb8e7340b06da343ba |
|
MD5 | 0fe4127d4680e080ca2095a6fa5cf6af |
|
BLAKE2b-256 | 2d890d58c5a665d0858bfcdb8ad0520255ed608edf45947c2b5b06f662b55542 |