dmoj的裁判组件:现代在线裁判平台
dmoj的Python项目详细描述
dmoj判断
pythonAGPLv3对DMOJ site接口的后端进行判断。在dmoj.ca查看它的运行情况!
A modern online judge and contest platform system, supporting IO-based, interactive, and signature-graded tasks, with runtime data generators and custom output validators. |
支持的平台和运行时
法官在linux、windows和freebsd机器上实现安全分级。
Linux | Windows | FreeBSD | |
---|---|---|---|
x64 | ✔ | ✔ | ✔ |
x86 | ✔ | ✔ | ¯\_(ツ)_/¯ |
x32 | ✔ | — | — |
ARM | ✔ | — | ❌ |
dmoj判断不需要根用户在linux机器上运行:它在普通用户下运行得很好。
支持的语言包括:
- C 99/11
- Java 7/8/9/10
- Python2/3
- 皮比2/3
- 帕斯卡
- Perl
- 单声道c/f/vb
以下运行时也受支持,但仅限于Windows计算机:
- C
- f
- vb.net
法官也可以用下列语言评分。这些语言测试较少,而且更容易出错。
- 阿达
- awk
- clozure common lisp
- COBOL
- d
- 省道
- Fortran
- 向前
- 前进
- Groovy
- 哈斯克尔
- 内部
- 科特林
- lua
- NASM
- 尼姆
- 目标C
- 倍频程
- ocaml
- 菲律宾比索5/7
- 派克
- 序言
- 球拍
- 红宝石2.1
- 生锈
- 斯卡拉
- 鸡肉计划
- sed
- 钢铁银行通用语言
- 斯威夫特
- TCL
- 图灵
- v8 javascript
- 大脑****
安装
安装dmoj judge将在python的脚本目录中创建两个可执行文件:dmoj
和dmoj-cli
。
dmoj
用于将判断连接到dmoj站点实例,而dmoj-cli
提供命令行接口到
本地法官,对测试问题有用。
有关更详细的步骤,请阅读Linux Installation或Windows Installation说明。
稳定体形
我们定期发布构建on PyPI。这是最简单的开始, 但可能不包含所有最新的功能和改进。
$ pip install dmoj
出血边缘形成
这是我们在dmoj.ca上实时运行的代码库版本。
$ git clone https://github.com/DMOJ/judge.git
$ cd judge
$ git submodule update --init --recursive
$ pip install -e .
用法
运行判断服务器
$ dmoj --help
usage: dmoj [-h] [-p SERVER_PORT] -c CONFIG [-l LOG_FILE] [--no-watchdog]
[-a API_PORT] [-A API_HOST] [-s] [-k] [-T TRUSTED_CERTIFICATES]
[-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 connect 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 connect for the server
-c CONFIG, --config CONFIG
file to load judge configurations from
-l LOG_FILE, --log-file LOG_FILE
log file to use
--no-watchdog disable use of watchdog on problem directories
-a API_PORT, --api-port API_PORT
port to listen for the judge API (do not expose to
public, security is left as an exercise for the
reverse proxy)
-A API_HOST, --api-host API_HOST
IPv4 address to listen for judge API
-s, --secure connect to server via TLS
-k, --no-certificate-check
do not check TLS certificate
-T TRUSTED_CERTIFICATES, --trusted-certificates TRUSTED_CERTIFICATES
use trusted certificate file instead of system
-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
运行cli法官
$ 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
文档
有关问题文件格式等信息,read the documentation.