Oiutils is a collection of portable command-line tools for programming contest aid, program-based contest hosting and teaching support. We tried to keep every tool minimum, do one thing and do it well, and we encourage users pipelining these tools together to achieve their goals.
Oiutils is designed to support grading system for Olympiad in Informatics in Jiangsu, as well as Online Judge backend at Nanjing University.
- oi-compile: compile a source code into binary. This script automatically tries to compile a single source file into an executable using right compiler according to its file extension.
- oi-sandbox: run any command with specified time and memory limit. Memory consumption and time usage are returned.
- oi-fc: an enhanced version of cmp/diff that allow user to specify simple "fc scripts" to compare output files (e.g., comparing floats within certain error tolerance).
- oi-judge: a simple script that (1) create a temporary directory, (2) put test input and executable in this directory, (3) run the executable with time and memory limit, and (4) calls an evaluation script to return judge results.
- oi-contest: synthesize a Makefile for a specified contest recipie and programmer's submissions. Everything (including dependency) is managed by the Makefile: the source compilation task, test runs for each test case, and ranklist generation. A few interesting features:
- The Makefile is incremental such that an entire ACM-ICPC contest can be hosted using this procedure by repeatedly invoking
oi contest-run
when new submissions are arrived. - Redjuging is greatly simplified: modifying a test data yields all test runs depending on it to be re-executed, and invoking
make
manages the rejudge automatically. - Judging reports can be generated for each individual contestant, which are useful in a formal OI contest.
- oi-remote: a simple wrapper for ssh/scp for uploading, downloading, or execute remote commands. Useful for distributing files and collecting submissions.
- oi-sched: invokes a SAT solver to solve for each contestant's placement.
- oi-vis
Install using the following command:
python setup.py install
There are a few dependences: pyyaml, psutil.
oi-fc
is implemented by Zihan Xu.
- Collecting/distributing files (send & receive)
- Scheduling a contest, e.g., Seat arrangements (oi sched)