2021华为软件精英挑战赛 程序输出分析器

Overview

AutoGrader

  • 0.2.0更新:加入资源分配溢出检测,如果发生资源溢出会输出溢出发生的位置。

    • 如果通过检测,会显示通过符号image-20210312210156727

    • 如果没有通过检测,会显示警告,并输出溢出发生的位置和操作,比如:image-20210312210310933

  • 0.2.1更新:溢出信息更详细

    • image-20210313114711826
  • 0.2.2更新:可以对java程序输出分析了,详见下述食用方法。

  • 0.2.4更新:由于最后生成的报告需要浏览器来查看,Linux下可能无法打开报告,请将目录下生成的最新一份html和resource文件夹拷贝到Windows下使用浏览器打开html文件浏览。

  • 0.2.5更新:默认python路径会导致一个bug,现在已经修复,感谢Yjh-Rking的反馈。

  • 0.3.0更新

    • 加入迁移次数检测,按照比赛规则每天迁移次数不应超过总虚拟机数量的千分之五。
    • 修改Java程序分析逻辑,现在应该不会再有奇怪的除0了。感谢BlankMan参与测试及提出建议。
    • 图片标题改用英文,避免字体导致的乱码。
    • 新增不同平台的tips。
    • config已改动,使用以前版本的config将导致错误,请使用新版config并遵照食用方法给出的说明填写。
  • 0.3.1更新:新增了两种错误提示,包括服务器部署时试图在不存在的ID上部署和迁移时出现迁移到不存在的ID。

  • 0.3.2更新:修改了一个换行符会导致的bug,新增一种错误提示。

网页不再使用index.html的统一名称,改为当前时间戳,方便保存对比。

1.说明

本程序仅用以分析2021华为软件精英挑战赛的个人程序输出结果,不得用于商业用途,仅做学习交流。

2.食用方法

  1. Clone本项目到本地

  2. 使用你的文本编辑器(记事本、NotePad++、VSCode等)打开目录中的config.json文件,你将看到以下内容:

    image-20210315165924650

    字段意义:

    • language:你所使用的语言,请从[c,c++,python,java]中选择一个填入。
    • pythonInterpreter:如果language为python,请指定python解释器路径,留空则为默认python解释器,建议使用pypy并指定路径而不是Cpython。
    • executable:如果language为c或c++,请给出编译后的可执行文件(exe)的路径。
    • sourceCode:如果language为python,请给出python脚本所在的路径。
    • javaPath:如果language为java,请给出java路径,如果留空则为默认java。请在cmd中键入“java -version”来检查是否存在默认java解释器。
    • buildJARPath:如果language为java,请给出你使用比赛给出的build.sh文件构建出的jar文件路径,也就是bin文件夹中的那个CodeCraft-2021.jar的位置。
    • ioData:输入文件,以列表形式存在,其中每一个字符串为一个输入文件。

如果你是C/C++选手,请在language中填入c++,然后在executable字段中给出编译后的可执行文件所在路径,并修改你的程序接受的输入文件所在的位置,填入到ioData字段中。

如果你是Python选手,请在language中填入python,然后在PythonInterpreter中指定解释器或留空,留空则为默认python解释器。在sourceCode字段填入你的python脚本所在路径,并给出程序接收的输入文件。

如果你是Java选手,请在language中填入java,然后在javaPath中指定java路径或留空,留空则使用默认java解释器。在buildJARPath字段中填入你使用比赛SDK中build.sh生成的jar的位置,一般情况下它位于build.sh同级目录下的bin文件夹中,名为CodeCraft-2021.jar,并给出程序接受的输入文件。

注意:

所有路径应当使用一个/或者\\来避免转义,并遵循JSON格式。

如果使用相对路径,请使用./开头

程序从标准输入输出获取信息,请不要重定向输入输出,仅在ioData字段中给出你想要输入到程序的文件路径即可

程序从标准输入输出获取信息,请不要重定向输入输出,仅在ioData字段中给出你想要输入到程序的文件路径即可

程序从标准输入输出获取信息,请不要重定向输入输出,仅在ioData字段中给出你想要输入到程序的文件路径即可

  1. config编辑完成后,在你clone下来的本文件夹中打开cmd并运行pip install -r requirements.txt来安装autoGrader需要的依赖。

  2. 运行autograder.py,你可以选择使用IDE来运行或者直接在命令行中键入python autograder.py来运行

结果实例

autograder运行结束后将在当前路径生成index.html并自动使用Chrome打开,你将看到类似的页面

image-20210315170424436

3.其他说明

  1. 如果你使用的是Windows,默认情况下程序会使用Chrome打开报告,但如果你没有安装Chrome或者打开失败,请手动使用浏览器打开autograder同级目录下生成的最新html来查看报告,网页以时间戳命名。
  2. 如果你使用的是Linux,html的排版有概率出现问题,如果出现排版和乱码问题,请尝试将html和resource文件夹拷贝到Windows平台查看。
  3. 欢迎提交PR及issue。
Install JetBrains Toolbox

ansible-role-jetbrains-toolbox Install JetBrains Toolbox Example Playbook This example is taken from molecule/default/converge.yml and is tested on ea

Antoine Mace 2 Feb 04, 2022
Python MapReduce library written in Cython.

Python MapReduce library written in Cython. Visit us in #hadoopy on freenode. See the link below for documentation and tutorials.

Brandyn White 243 Sep 16, 2022
pybicyclewheel calulates the required spoke length for bicycle wheels

pybicyclewheel pybicyclewheel calulates the required spoke length for bicycle wheels. (under construcion) - homepage further readings wikipedia bicyc

karl 0 Aug 24, 2022
Python’s bokeh, holoviews, matplotlib, plotly, seaborn package-based visualizations about COVID statistics eventually hosted as a web app on Heroku

COVID-Watch-NYC-Python-Visualization-App Python’s bokeh, holoviews, matplotlib, plotly, seaborn package-based visualizations about COVID statistics ev

Aarif Munwar Jahan 1 Jan 04, 2022
Unfinished Python library based on ndspy, for Zelda: Phantom Hourglass and Spirit Tracks.

zed An unfinished library and toolset by me, for viewing and editing files from The Legend of Zelda: Phantom Hourglass and The Legend of Zelda: Spirit

4 Oct 13, 2022
Reso is a low-level circuit design language and simulator, inspired by things like Redstone, Conway's Game of Life, and Wireworld.

Reso Reso is a low-level circuit design language and simulator, inspired by things like Redstone, Conway's Game of Life, and Wireworld. What is Reso?

Lynn 287 Nov 26, 2022
tg-nearby Trilateration of nearby Telegram users as described in my corresponding article.

tg-nearby Trilateration of nearby Telegram users as described in my corresponding article. Setup If you want to toy with the code in this repository

Maximilian Jugl 75 Dec 26, 2022
Library for RadiaCode-101

RadiaCode Библиотека для работы с дозиметром RadiaCode-101, находится в разработке - API не стабилен и возможны изменения. Пример использования (backe

Maxim Andreev 56 Nov 29, 2022
This repo houses the qhub frontend moving forward.

This repo houses the qhub frontend moving forward. This effort will house a backend written in fastAPI, and a fronend in Vue, with additional components.

Quansight 1 Feb 10, 2021
Removes all archived super productivity tasks. Just run the python script.

delete-archived-sp-tasks.py Removes all archived super productivity tasks. Just run the python script. This is helpful to do a cleanup every 3-6 month

Ben Herbst 1 Jan 09, 2022
simple password manager.

simple password manager.

1 Nov 18, 2021
A tool to help plan vacations with friends and family

Vacationer In Development A tool to help plan vacations with friends and family Deployment Requirements: NPM Docker Docker-Compose Deployment Instruct

JK 2 Oct 05, 2021
A program made in PYTHON🐍 that automatically performs data insertions into a POSTGRES database 🐘 , using as base a .CSV file 📁 , useful in mass data insertions

A program made in PYTHON🐍 that automatically performs data insertions into a POSTGRES database 🐘 , using as base a .CSV file 📁 , useful in mass data insertions.

Davi Galdino 1 Oct 17, 2022
A module to prevent invites and joins to Matrix rooms by checking the involved server(s)' domain.

Synapse Domain Rule Checker A module to prevent invites and joins to Matrix rooms by checking the involved server(s)' domain. Installation From the vi

matrix.org 4 Oct 24, 2022
Gerador do Arquivo Magnético Sintegra em Python

pysintegra é uma lib simples com o objetivo de facilitar a geração do arquivo SINTEGRA seguindo o Convênio ICMS 57/95. Com o surgimento do SPED, muito

Felipe Correa 5 Apr 07, 2022
A simple program to recolour simple png icon-like pictures with just one colour + transparent or white background. Resulting images all have transparent background and a new colour.

A simple program to recolour simple png icon-like pictures with just one colour + transparent or white background. Resulting images all have transparent background and a new colour.

Anna Tůmová 0 Jan 30, 2022
It converts ING BANK account historic into a csv file you can import in HomeBank application.

ing2homebank It converts your ING Bank account historic csv file into another csv file you can import in HomeBank application

1 Feb 14, 2022
API Rate Limit Decorator

ratelimit APIs are a very common way to interact with web services. As the need to consume data grows, so does the number of API calls necessary to re

Tomas Basham 574 Dec 26, 2022
MuMMI Core is the underlying infrastructure and generalizable component of the MuMMI framework

MuMMI Core is the underlying infrastructure and generalizable component of the MuMMI framework, which facilitates the coordination of massively parallel multiscale simulations.

4 Aug 17, 2022
A numbers check python package

A numbers check python package

Fayas Noushad 3 Nov 28, 2021