Git Product home page Git Product logo

grader's Introduction

Grader to API

Grader to run a c++ program against some test cases parallelly using OpenMP library and sends the verdict to your API using http GET data.

Usage

1.)compile the grader.cpp and get an out file

g++ grader.cpp -fopenmp -lcurl -o grader.out
git status

2.)Keep All the input test cases in the problems/input/<porblem_id> folder with file name as 1.in,2.in and so on

  problems
          |->16   
              |->input
                       |->1.in
                          2.in
                          3.in
                          .
                          .
     16 here is the problem_id

3.)Keep All the output of the test cases in the problems/output/<problem_id> folder with file name as 1.out,2.out and so on

   problems
          |->16       
              |->output
                       |->1.in
                          2.in
                          3.in
                          .
                          .
                          
    16 here is the problem_id

4.)Run the grader using ./grader.out and passing following command line arguments.

       <out_file>         :- provide the location to the .out file on which test cases are to be run.
       <problem_id>       :- problem_id of the question.
       <no_of_test_cases> : Number of test cases in the problem input folder
       <output_folder>    :path to the folder where the output of the given code will be stored.(not the problem output folder).
       <submission_id>    :unique_id of this submission
       <verdict_api_link> :Base url of the server where the GET data has to be send
       
       Example usage:  ./grader.out solution.out 16 10 output/sikander441/ jh3jjk123hjk12b3hj http://127.0.0.1:3000/submit/verdict

API call

It return the following arguments using GET method to the provided link

  Argument_name                  Possible Values
  
  verdict                         AC,WA,RE,TLE
  run_time                        runtime in seconds.
  tno                             test_no
  submission_id                   submission_id

Example

Grader Ouput:

Grader output

NodeJs Api output

node_output

NodeJs Sample Code

node_output

grader's People

Contributors

sikander441 avatar

Watchers

 avatar  avatar

Forkers

aaryannn-04

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.