online-judge-tools / Oj

Licence: mit
Tools for various online judges. Downloading sample cases, generating additional test cases, testing your code, and submitting it.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Oj

Usaco
General Resources for Competitive Programming
Stars: ✭ 1,152 (+122.82%)
Mutual labels:  competitive-programming, codeforces, programming-contests
Stopstalk Deployment
Stop stalking and start StopStalking 😉
Stars: ✭ 276 (-46.62%)
Mutual labels:  competitive-programming, codeforces, programming-contests
Usaco Guide
A free collection of curated, high-quality resources to take you from Bronze to Platinum and beyond.
Stars: ✭ 439 (-15.09%)
Mutual labels:  competitive-programming, codeforces, programming-contests
Cpeditor
The IDE for competitive programming 🎉 | Fetch, Code, Compile, Run, Check, Submit 🚀
Stars: ✭ 562 (+8.7%)
Mutual labels:  competitive-programming, codeforces, programming-contests
USACO
Algorithms, data structures, and problems in competitive programming up to USACO Platinum
Stars: ✭ 34 (-93.42%)
Mutual labels:  competitive-programming, codeforces, programming-contests
Nickjs
Web scraping library made by the Phantombuster team. Modern, simple & works on all websites. (Deprecated)
Stars: ✭ 494 (-4.45%)
Mutual labels:  automation, scraping
Apify Js
Apify SDK — The scalable web scraping and crawling library for JavaScript/Node.js. Enables development of data extraction and web automation jobs (not only) with headless Chrome and Puppeteer.
Stars: ✭ 3,154 (+510.06%)
Mutual labels:  automation, scraping
Hightail
Stars: ✭ 267 (-48.36%)
Mutual labels:  competitive-programming, codeforces
Autoscraper
A Smart, Automatic, Fast and Lightweight Web Scraper for Python
Stars: ✭ 4,077 (+688.59%)
Mutual labels:  automation, scraping
Code
Macesuted's Code Repository.
Stars: ✭ 20 (-96.13%)
Mutual labels:  competitive-programming, codeforces
Competitive Companion
Browser extension which parses competitive programming problems
Stars: ✭ 295 (-42.94%)
Mutual labels:  competitive-programming, codeforces
Codercalendar
DEPRECATED -> Checkout nishanthvijayan/CoderCalendar-Extensions
Stars: ✭ 348 (-32.69%)
Mutual labels:  codeforces, programming-contests
Competitive Programming Score API
API to get user details for competitive coding platforms - Codeforces, Codechef, SPOJ, Interviewbit
Stars: ✭ 118 (-77.18%)
Mutual labels:  competitive-programming, codeforces
harwest-tool
A one-shot tool to harvest submissions from different OJs onto one single VCS managed repository http://bit.ly/harwest
Stars: ✭ 89 (-82.79%)
Mutual labels:  competitive-programming, codeforces
category-wise-problems
contains category wise problems(data structures, competitive) of popular platforms.
Stars: ✭ 32 (-93.81%)
Mutual labels:  competitive-programming, codeforces
Competitive Programming
Solutions to problems from various online judges / contest sites.
Stars: ✭ 337 (-34.82%)
Mutual labels:  competitive-programming, codeforces
Domjudge
DOMjudge programming contest jury system
Stars: ✭ 484 (-6.38%)
Mutual labels:  competitive-programming, programming-contests
Undetected Chromedriver
Custom Selenium Chromedriver | Zero-Config | Passes ALL bot mitigation systems (like Distil / Imperva/ Datadadome / CloudFlare IUAM)
Stars: ✭ 365 (-29.4%)
Mutual labels:  automation, scraping
Competitive Programming
📌 📚 Solution of competitive programming problems, code templates, Data Structures and Algorithms, hackathons, interviews and much more.
Stars: ✭ 496 (-4.06%)
Mutual labels:  competitive-programming, codeforces
yukicoder-problems
Problem manager for yukicoder users
Stars: ✭ 12 (-97.68%)
Mutual labels:  competitive-programming, programming-contests

online-judge-tools/oj

test PyPI Downloads PyPI Join the chat at https://gitter.im/online-judge-tools/community

oj is a command to help solving problems on various online judges. This command automates downloading sample cases, generating additional test cases, testing for your code, and submitting it.

Screencast

screencast

Features

  • Download sample cases
  • Download system test cases
  • Login
  • Submit your code
  • Test your code
  • Test your code for reactive problems
  • Generate input files from generators
  • Generate output files from input and reference implementation

For the detailed documentation, read docs/getting-started.md. For Japanese: 日本語バージョンのドキュメントは docs/getting-started.ja.md にあります。

Many online judges (Codeforces, AtCoder, HackerRank, etc.) are supported. For the full list, see the table of online-judge-tools/api-client.

How to install

The package is https://pypi.python.org/pypi/online-judge-tools PyPI.

$ pip3 install online-judge-tools

For detailed instructions, read docs/INSTALL.md. For Japanese: 日本語バージョンのドキュメントは docs/INSTALL.ja.md にあります。

How to use

$ oj download [--system] URL
$ oj login URL
$ oj submit [URL] FILE
$ oj test [-c COMMAND] [TEST...]
$ oj test-reactive [-c COMMAND] JUDGE_COMMAND
$ oj generate-input GENERATOR_COMMAND
$ oj generate-output [-c COMMAND] [TEST...]

For details, see $ oj --help.

Example

$ 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

FAQ

  • I usually make one directory per one contest (or, site). Can I keep using this style?
    • Yes, you can use the --directory (-d) option or $ rm -rf test/. However, we don't recommend this style, because you should make additional test cases by yourself and run stress tests to maximize your rating.
  • Can I download all sample cases of all problems at once?
  • Can I automatically compile my source code before testing?
    • Yes, use your shell. Run $ g++ main.cpp && oj t.
  • Can I automatically submit code after it passes tests?
    • Yes, use your shell. Run $ oj t && oj s main.cpp. By the way, you need to take care of problems whose sample cases are not so strong.
  • Can I remove the delays and the [y/N] confirmation before submitting code?
    • Yes, put --wait=0 option and --yes option to oj s subcommand. Of course, we don't recommend this. They exist for failsafe. For example, please consider a situation where if you save 3 seconds, you will move up 3 places on the standings. In such a case, if you get a penalty of 5 minutes, then you will move down at least 300 places on the standings.
  • Can I clear my download history to omit the URL of the problem to submit?
    • Yes, remove the history file, whose name is download-history.jsonl.
  • Is my password stored?
  • Can I specify problems by their IDs or names, instead of URLs?
    • No. It may sound nice, but actually, hard to use and maintain.
  • Does the config file exist?
    • No. You can use your .bashrc (or similar files) instead. It's a config file of your shell. Read man bash and write shell aliases or shell functions. For example, if you want to use Python code for tests by default, write alias oj-test-python='oj t -c "python3 main.py"' (alias) to .bashrc and use $ oj-test-python, or write function oj-test-python() { FILE="$1" ; shift ; oj t -c "python3 '$FILE'" "[email protected]" ; } (function) and use oj-test-python main.py.

For other questions, use Gitter Join the chat at https://gitter.im/online-judge-tools/community or other SNSs.

Resources

Articles

in Japanese:

Related Tools

conflicted:

not conflicted:

projects depending on kmyk/online-judge-tools:

  1. wrappers:
    • Tatamo/atcoder-cli is a thin wrapper optimized for AtCoder
    • kjnh10/pcm is a tool which internally uses online-judge-tools
    • some people use oj via Visual Studio Code
  2. libraries using this for CI:
  3. others:

Maintainers

License

MIT License

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].