Skip to main content
Help us improve PyPI by participating in user testing. All experience levels needed!

The judge component of the DMOJ: Modern Online Judge platform

Project description

Python AGPLv3 contest judge backend for the DMOJ site interface. See it in action at dmoj.ca!

image6 A modern online judge and contest platform system, supporting IO-based, interactive, and signature-graded tasks, with runtime data generators and custom output validators.

Supported Platforms and Runtimes

The judge implements secure grading on Linux, Windows, and FreeBSD machines.

  Linux Windows FreeBSD
x64
x86 ¯\_(ツ)_/¯
x32
ARM X

The DMOJ judge does not need a root user to run on Linux machines: it will run just fine under a normal user.

Supported languages include:

  • C++ 0x/11/14/17 (GCC and Clang)
  • C 99/11
  • Java 7/8/9/10
  • Python 2/3
  • PyPy 2/3
  • Pascal
  • Perl
  • Mono C#/F#/VB

The following runtimes are also supported, but only on Windows machines:

  • Visual C++
  • C#
  • F#
  • VB.NET

The judge can also grade in the languages listed below. These languages are less tested and more likely to be buggy.

  • Ada
  • AWK
  • Clozure Common Lisp
  • COBOL
  • D
  • Dart
  • Fortran
  • Forth
  • Go
  • Groovy
  • Haskell
  • INTERCAL
  • Kotlin
  • Lua
  • NASM
  • Nim
  • Objective-C
  • Octave
  • OCaml
  • PHP 5/7
  • Pike
  • Prolog
  • Racket
  • Ruby 2.1
  • Rust
  • Scala
  • Chicken Scheme
  • sed
  • Steel Bank Common Lisp
  • Swift
  • Tcl
  • Turing
  • V8 JavaScript
  • Brain****

Installation

Installing the DMOJ judge creates two executables in your Python’s script directory: dmoj and dmoj-cli.
dmoj is used to connect a judge to a DMOJ site instance, while dmoj-cli provides a command-line interface to a
local judge, useful for testing problems.

For more detailed steps, read the Linux Installation or Windows Installation instructions.

Stable Build

We periodically publish builds on PyPI. This is the easiest way to get started,
but may not contain all the latest features and improvements.
$ pip install dmoj

Bleeding-Edge Build

This is the version of the codebase we run live on dmoj.ca.

$ git clone https://github.com/DMOJ/judge.git
$ cd judge
$ git submodule update --init --recursive
$ pip install -e .

Usage

Running a Judge Server

$ dmoj --help
usage: dmoj [-h] [-p SERVER_PORT] -c CONFIG [-l LOG_FILE]
            [-e ONLY_EXECUTORS | -x EXCLUDE_EXECUTORS] [--no-ansi]
            server_host [judge_name] [judge_key]

Spawns a judge for a submission server.

positional arguments:
  server_host           host to listen for the server
  judge_name            judge name (overrides configuration)
  judge_key             judge key (overrides configuration)

optional arguments:
  -h, --help            show this help message and exit
  -p SERVER_PORT, --server-port SERVER_PORT
                        port to listen for the server
  -c CONFIG, --config CONFIG
                        file to load judge configurations from
  -l LOG_FILE, --log-file LOG_FILE
                        log file to use
  -e ONLY_EXECUTORS, --only-executors ONLY_EXECUTORS
                        only listed executors will be loaded (comma-separated)
  -x EXCLUDE_EXECUTORS, --exclude-executors EXCLUDE_EXECUTORS
                        prevent listed executors from loading (comma-
                        separated)
  --no-ansi             disable ANSI output

Running a CLI Judge

$ dmoj-cli --help
usage: dmoj-cli [-h] -c CONFIG
                [-e ONLY_EXECUTORS | -x EXCLUDE_EXECUTORS]
                [--no-ansi] [--no-ansi-emu]

Spawns a judge for a submission server.

optional arguments:
  -h, --help            show this help message and exit
  -c CONFIG, --config CONFIG
                        file to load judge configurations from
  -e ONLY_EXECUTORS, --only-executors ONLY_EXECUTORS
                        only listed executors will be loaded (comma-separated)
  -x EXCLUDE_EXECUTORS, --exclude-executors EXCLUDE_EXECUTORS
                        prevent listed executors from loading (comma-
                        separated)
  --no-ansi             disable ANSI output
  --no-ansi-emu         disable ANSI emulation on Windows

Documentation

For info on the problem file format and more, read the documentation.

Project details


Release history Release notifications

This version
History Node

1.2.0

History Node

1.1.0

History Node

1.0.5

History Node

1.0.4

History Node

1.0.3

History Node

1.0.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
dmoj-1.2.0.tar.gz (240.1 kB) Copy SHA256 hash SHA256 Source None Apr 22, 2018

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page