Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/prdpx7/cmdjudge
A simple command line code judge
https://github.com/prdpx7/cmdjudge
bash-script competitive-programming pypi test-automation
Last synced: about 1 month ago
JSON representation
A simple command line code judge
- Host: GitHub
- URL: https://github.com/prdpx7/cmdjudge
- Owner: prdpx7
- License: mit
- Created: 2016-09-27T18:55:34.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2020-07-31T09:45:50.000Z (over 4 years ago)
- Last Synced: 2024-04-27T22:05:42.989Z (7 months ago)
- Topics: bash-script, competitive-programming, pypi, test-automation
- Language: Shell
- Size: 66.4 KB
- Stars: 4
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# cmdjudge
A Command Line Code Judge to evaluate programs for a given input & output text files with time constraint[![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/prdpx7/cmdjudge/master/LICENSE)
[![PyPI version](https://badge.fury.io/py/cmdjudge.svg)](https://badge.fury.io/py/cmdjudge)
[![Code Health](https://landscape.io/github/prdpx7/cmdjudge/master/landscape.svg?style=flat)](https://landscape.io/github/prdpx7/cmdjudge/master)## Installation
* from PyPI
```
pip install cmdjudge
```
* with curl
```
bash -c "$(curl -fsSL https://raw.githubusercontent.com/prdpx7/cmdjudge/master/install.sh)"
```## Usage
```
$ cmdjudge --help
Usage: [-h] [-t TIME-LIMIT ] [-s SOURCE-CODE ] [-i INPUT-FILE] [-c CORRECT-OUTPUT-FILE ]Optional Arguments:
-h , --help : show this help message and exit
-t TIME-LIMIT , --time-limit TIME-LIMIT : max time-limit required for source code to execute[Default time-limit(if didn't specified in arg) is 1-sec]
-s SOURCE-CODE, --source-code SOURCE-CODE : valid path for c/cpp/py/java source code
-i INPUT-FILE, --input-file INPUT-FILE : input testcase file required
-c CORRECT-OUTPUT-FILE, --correct-output-file CORRECT-OUTPUT-FILE : correct output file, which will be judged with user output file
```
* Here's a sample [script](https://gist.github.com/prdpx7/48e4b5c795da34e29351e58029076223) to generate results by using `cmdjudge`.## Demo
```
$ cmdjudge -s A.cpp -i inp.txt -c correctout.txt
Accepted
$ cmdjudge --source-code A.java --input-file inp.txt --correct-output-file correctout.txt --time-limit 0.34
Time Limit Execced
```
![demo](https://i.imgur.com/inUpV2O.gif)