Coder Social home page Coder Social logo

kyuridenamida / online-judge-tools Goto Github PK

View Code? Open in Web Editor NEW

This project forked from online-judge-tools/oj

2.0 2.0 0.0 750 KB

Tools for online judge services. Downloading sample cases, Testing/Submitting your code, and various utilities.

License: MIT License

Python 100.00%

online-judge-tools's Introduction

Online Judge Tools

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

Tools for online judge services. Downloading sample cases, Testing/Submitting your code, and various utilities.

Screencast

screencast

Features

  • Download sample cases
    • AtCoder
    • yukicoder
    • Anarchy Golf
    • Codeforces
    • HackerRank
    • Aizu Online Judge
    • CS Academy
    • PKU JudgeOnline
    • Kattis
    • Toph (Problem Archive)
  • Download system test cases
    • yukicoder
    • Aizu Online Judge
  • Login
    • AtCoder
    • yukicoder (via github.com or session token)
    • Codeforces
    • HackerRank
    • Topcoder
    • Toph
  • Submit your solution
    • AtCoder
    • yukicoder
    • Codeforces
    • HackerRank
    • Topcoder (Marathon Match)
    • Toph (Problem Archive)
  • 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
  • Print the code statistics used in Anarchy Golf

How to install

from PyPI: https://pypi.python.org/pypi/online-judge-tools

$ pip3 install online-judge-tools

or

$ pip3 install requests
$ pip3 install lxml
$ 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

It requires Python 3.5 or later now

How to use

$ oj [download,login] URL
$ oj submit URL FILE [-l LANGUAGE]
$ oj test [-c COMMAND] [TEST...]

For details, see --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 cannot install this tool on my Windows machine. How should I do?
    • Use Windows Subsystem for Linux (WSL). If your Windows is too and WSL is not supported, you can use virtual machines, MinGW or Cygwin, but you should buy a new machine.
  • Are there features to manage templates or snippets?
  • I usually make one directory per one contest (or, site). Is there a support for this style?
    • Yes. You can use --directory (-d) option. However, I recommend to make one directory per one problem.
  • Can I specify problems by their IDs or names, instead of URLs?
    • No. I have tried it once, but it is actually not so convenient and only increases the maintenance cost.
  • I don't want to give my password to this program.
    • You can use this giving only your session tokens. Please see here.

For other questions, use Gitter or other SNSs.

Related Tools

conflicted:

not conflicted:

License

MIT License

online-judge-tools's People

Contributors

kmyk avatar fukatani avatar pachicobue avatar hjr265 avatar gitter-badger avatar hachi-88 avatar kjnh10 avatar uta8a avatar

Stargazers

 avatar AkihroTajiam avatar

Watchers

Kazuma Mikami avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.