GithubHelp home page GithubHelp logo

nctu_oryx's Introduction

NCTU_Oryx

The competition codebook for team NCTU_Oryx, along with the codebook tester and generator.

Environment Requirements

  • LaTeX along with PDFLaTeX
  • python3

Usage: Codebook Generator

In C/C++ code(and plain text files), the control sequence start with ---codebook can be used to mark the range of code you want to use. They are conformed into C-style comments:

#include <stdio.h>
#DEFINE SOMEOTHERSTUFF
/*---codebook desc
Here can insert raw \LaTeX paragraph/math syntax here, the generator will copy this block of comment verbatim into codebook
*/
//---codebook start
printf("Here would be the code"); 
//---codebook end
int main() {
	printf("Some test code can be placed here, and wiill be ignored by the generator");
}

Then in spec.py you can specify what snippet to include(in the python Dict sections):

graph = {
    'Cut Vertex and BCC':'Graph/CutBCC.cpp'
}

sections = {
    'Graph':graph,
}

Finally, use python3 codebook.py gen [-v] to generate pdf version of codebook(You may modify template.tex if you want), the -v argument will show the output message from pdflatex.

Usage: Codebook tester

First place your test data in a seperate directory under tests. The filename of input data should have .in extension, the filename of correct output data should have .out extension, and they must have same filename.

Then in the corresponding code to test, you may put(one or more) control sequence in the comment too:

//---codebook test=Math/extgcd

After that issue python3 codebook.py test [all], you will see the verdict of each specified testsuite. The all argument will test all the snnipet in the working directory, even when they are not in spec.py. Codebook Test

nctu_oryx's People

Contributors

austin880625 avatar

Stargazers

marmot0814 avatar

Watchers

James Cloos avatar  avatar

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.