Commandline tool for Kattis problems
Project description
Conventions:
All kattis solutions are named by their problem id on kattis and are enclosed in a directory by that name. If they have sample inputs or expected outputs those will be included in the directory.
Installation of Katti Automation
To install the Katti command line tool, simply install using pip.
I recommend using a virtual environment to install katti, so you don't have to worry about conflicting dependencies.
$ python -m pip install katti
Additional Setup
1. Login to Kattis and download or copy and paste your personal .kattisrc file from:
https://open.kattis.com/download/kattisrc
2. Move your .kattisrc to your home directory:
$ mv .kattisrc $HOME
3. add password to .kattisrc: In the .kattisrc file, add your password to the below line that says "token:". It should look like this:
[user]
username: <username>
token: <token>
password: <password>
Usage
The tool can be run using a terminal or command prompt. If you are using a virtual environment, make sure to activate it before running the tool.
Commands
katti get <problem_id>
Download the problem description, sample inputs and sample outputs from Kattis and create a directory for the problem. It will do this in the directory that you run the command from.
$ katti get carrots
katti description <problem_id>
Open the problem description for the given problem_id in your default browser.
$ katti description carrots
katti run
Run test cases on the problem in the current directory. This will run all the test cases in the directory, and will tell you if you passed or failed each one.
$ katti run
katti submit
Submit the problem in the current directory to Kattis. This will submit the problem, and give you a link to watch the submission status.
$ katti submit
katti add <problem_id>
Add a problem to your "todo" list, which is stored with your katti install. Running this command will allow katti random to select this problem.
$ katti add carrots
katti update
Update the list of problems from Kattis. This will update the list of problems that katti random can select from. This will also update the rating of each problem in "todo" list. (this function is slow, and may take about a minute to run)
$ katti update
katti random Select a random problem from your "unsolved" list. If you specify a difficulty, it will only select problems that have the same difficulty, rounded down.
$ katti random 2.0
katti selected Select a random problem from our high quality list. If you specify a difficulty, it will only select problems that have the same difficulty, rounded down.
$ katti selected 2.0
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file katti-0.0.3.tar.gz.
File metadata
- Download URL: katti-0.0.3.tar.gz
- Upload date:
- Size: 24.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5d0bd4cffcebf5609355d41cdc5ba55d97866e1f648f8ac5a86c9cf9329dbe8e
|
|
| MD5 |
73996bd283820a706899661b2a819326
|
|
| BLAKE2b-256 |
c94fc4427d4435e9cd80be26541c3f44781d8e4008aa0eed6137f573566236b7
|
File details
Details for the file katti-0.0.3-py3-none-any.whl.
File metadata
- Download URL: katti-0.0.3-py3-none-any.whl
- Upload date:
- Size: 24.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
235d1e30238db77610891cee1f6626a7971c3f4b8e82f4bf567e537406707f4c
|
|
| MD5 |
87aebcd52d61e94f6eff72f1deb44ae5
|
|
| BLAKE2b-256 |
c4052274ee1cb11a9f7b154547a6092099636c51a72f81ab505150c89c0d0f18
|