Skip to content

This is a project to complete live during a programming class, where some assignments are to solve issues. This project mocks a system from standard programming competitions (I/O checks, and AC,WA,MLE,TLE,RTE verdicts)

Notifications You must be signed in to change notification settings

shaikh916/GraderMock

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Grader

This project is a basic mock version of a testing system like DMOJ or Leetcode.

  • Given a problem from the system, you can submit a code, and it will test it throughout a set of testcases.
    • Compare the expected output with your code's output and give you and verdict.

DEMO

Verdicts

  • AC: Accepted, your code passed all testcases.
  • TLE: Time limit excedeed, your code took too long to run in at least one testcase.
  • MLE: Memory limit excedeed, your code took too much memory.
  • RTE: Run Time Error, some Exception ocurred during the execution.
  • CE: Compilation Error, your code has a syntax error.

Instructions on how to replicate

Installation

Clone the repository, create the virtual environment and install requirements.

git clone https://github.com/aniervs/GraderMock
cd GraderMock
python3 -m venv venv
source ./venv/bin/activate
pip install -r requirements.txt

Run

Navigate to the project's root folder and just run the following in your terminal

streamlit run ./src/app.py

Specifications

Problem structure

Inside the folder assets/, there is the folder problems/ that contains all problems.

Each problem is defined by a folder with its name (for e.g., problems/alice_bob/) that contains the following structure

❯ tree alice_bob
alice_bob
├── description.md
├── metadata.json
└── testcases
    ├── input1.txt
    ├── input2.txt
    ├── output1.txt
    └── output2.txt
  • The description.md file contains the description in Markdown.
  • The metadata.json file contains the memory limit (in MegaBytes) and the time limit (in miliseconds):
{
  "memory_limit": 256,
  "time_limit": 1000
}
  • The testcases/ folder contains the input and output testcases. For each testcase, a file input<ID>.txt and a file output<ID>.txt.

About

This is a project to complete live during a programming class, where some assignments are to solve issues. This project mocks a system from standard programming competitions (I/O checks, and AC,WA,MLE,TLE,RTE verdicts)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 99.9%
  • Python 0.1%