Tools for online-judge services
Project description
# Online Judge Tools
[](https://travis-ci.org/kmyk/online-judge-tools)
[]()
[]()
[]()
[]()
Tools for online judge services. Downloading sample cases, Testing/Submitting your code, and various utilities.
## Features
- Download sample cases
- AtCoder
- Yukicoder
- Anarchy Golf
- Codeforces
- HackerRank (using `Run Code`)
- Aizu Online Judge
- CS Academy
- Download system test cases
- Yukicoder
- Aizu Online Judge
- Login
- AtCoder
- Yukicoder (via github.com)
- Codeforces
- HackerRank
- TopCoder
- Submit your solution
- AtCoder
- Yukicoder
- HackerRank
- TopCoder (Marathon Match)
- Generate scanner for input (experimental)
- AtCoder
- Yukicoder
- Test your solution
- Test your solution for reactive problem
- Generate output files from input and reference implementation
- Split an input file with many cases to files
## How to install
from PyPI: <https://pypi.python.org/pypi/online-judge-tools>
``` sh
$ pip3 install online-judge-tools
```
or
``` sh
$ pip3 install requests
$ pip3 install beautifulsoup4
$ pip3 install colorama
$ pip3 install sympy
and
$ git clone https://github.com/kmyk/online-judge-tools
$ cat <<EOF > ~/bin/oj
#!/bin/sh
exec $PWD/online-judge-tools/oj "\$@"
EOF
$ chmod +x ~/bin/oj
```
## How to use
``` sh
$ oj [download,login] URL
$ oj submit URL FILE [-l LANGUAGE]
$ oj test [-c COMMAND] [TEST...]
```
For details, see `--help`.
## Example
``` sh
$ oj download http://agc001.contest.atcoder.jp/tasks/agc001_a
[+] problem recognized: <onlinejudge.atcoder.AtCoder object at 0x7f2925a5df60>
[x] GET: http://agc001.contest.atcoder.jp/tasks/agc001_a
[+] 200 OK
[*] sample 0
[x] input: 入力例 1
2
1 3 1 2
[+] saved to: test/sample-1.in
[x] output: 出力例 1
3
[+] saved to: test/sample-1.out
[*] sample 1
[x] input: 入力例 2
5
100 1 2 3 14 15 58 58 58 29
[+] saved to: test/sample-2.in
[x] output: 出力例 2
135
[+] saved to: test/sample-2.out
[*] sample 2
[x] input: Sample Input 1
2
1 3 1 2
[+] saved to: test/sample-3.in
[x] output: Sample Output 1
3
[+] saved to: test/sample-3.out
[*] sample 3
[x] input: Sample Input 2
5
100 1 2 3 14 15 58 58 58 29
[+] saved to: test/sample-4.in
[x] output: Sample Output 2
135
[+] saved to: test/sample-4.out
```
## License
MIT License
[](https://travis-ci.org/kmyk/online-judge-tools)
[]()
[]()
[]()
[]()
Tools for online judge services. Downloading sample cases, Testing/Submitting your code, and various utilities.
## Features
- Download sample cases
- AtCoder
- Yukicoder
- Anarchy Golf
- Codeforces
- HackerRank (using `Run Code`)
- Aizu Online Judge
- CS Academy
- Download system test cases
- Yukicoder
- Aizu Online Judge
- Login
- AtCoder
- Yukicoder (via github.com)
- Codeforces
- HackerRank
- TopCoder
- Submit your solution
- AtCoder
- Yukicoder
- HackerRank
- TopCoder (Marathon Match)
- Generate scanner for input (experimental)
- AtCoder
- Yukicoder
- Test your solution
- Test your solution for reactive problem
- Generate output files from input and reference implementation
- Split an input file with many cases to files
## How to install
from PyPI: <https://pypi.python.org/pypi/online-judge-tools>
``` sh
$ pip3 install online-judge-tools
```
or
``` sh
$ pip3 install requests
$ pip3 install beautifulsoup4
$ pip3 install colorama
$ pip3 install sympy
and
$ git clone https://github.com/kmyk/online-judge-tools
$ cat <<EOF > ~/bin/oj
#!/bin/sh
exec $PWD/online-judge-tools/oj "\$@"
EOF
$ chmod +x ~/bin/oj
```
## How to use
``` sh
$ oj [download,login] URL
$ oj submit URL FILE [-l LANGUAGE]
$ oj test [-c COMMAND] [TEST...]
```
For details, see `--help`.
## Example
``` sh
$ oj download http://agc001.contest.atcoder.jp/tasks/agc001_a
[+] problem recognized: <onlinejudge.atcoder.AtCoder object at 0x7f2925a5df60>
[x] GET: http://agc001.contest.atcoder.jp/tasks/agc001_a
[+] 200 OK
[*] sample 0
[x] input: 入力例 1
2
1 3 1 2
[+] saved to: test/sample-1.in
[x] output: 出力例 1
3
[+] saved to: test/sample-1.out
[*] sample 1
[x] input: 入力例 2
5
100 1 2 3 14 15 58 58 58 29
[+] saved to: test/sample-2.in
[x] output: 出力例 2
135
[+] saved to: test/sample-2.out
[*] sample 2
[x] input: Sample Input 1
2
1 3 1 2
[+] saved to: test/sample-3.in
[x] output: Sample Output 1
3
[+] saved to: test/sample-3.out
[*] sample 3
[x] input: Sample Input 2
5
100 1 2 3 14 15 58 58 58 29
[+] saved to: test/sample-4.in
[x] output: Sample Output 2
135
[+] saved to: test/sample-4.out
```
## License
MIT License
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
online-judge-tools-0.1.27.tar.gz
(29.9 kB
view details)
File details
Details for the file online-judge-tools-0.1.27.tar.gz.
File metadata
- Download URL: online-judge-tools-0.1.27.tar.gz
- Upload date:
- Size: 29.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a30f23ad4234054b2aef0632bdc33ca2603e34a00a4fd90c0c5e2dce75541b78
|
|
| MD5 |
4502b129b3baf973632c609574c9913a
|
|
| BLAKE2b-256 |
7652dd1911931044ded85a7755f1c32a4198c0c59bbaa55796916a4b65a8321f
|