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。
MeepoBenchmark - This project aims at providing the scripts, logs, and analytic results for Meepo Blockchain

MeepoBenchmark - This project aims at providing the scripts, logs, and analytic results for Meepo Blockchain

Peilin Zheng 3 Aug 16, 2022
Fast STL (ASCII & Binary) importer for Blender

blender-fast-stl-importer Fast STL (ASCII & Binary) importer for Blender based on https://en.wikipedia.org/wiki/STL_(file_format) Technical notes: flo

Iyad Ahmed 7 Apr 17, 2022
Python Project For Beginner

Basic-Vitrual-AI-Assistant Python Project For Beginner Hey There, I had manipulated Selenium WebDriver to make this assistant. I hope, It will be help

Maruf Billah 13 Dec 12, 2022
scap is a tool for putting code in places and for other purposes

Scap is the deployment script used by Wikimedia Foundation to publish code and configuration on production web servers.

Wikimedia 7 Nov 02, 2022
Poetry workspace plugin for Python monorepos.

poetry-workspace-plugin Poetry workspace plugin for Python monorepos. Inspired by Yarn Workspaces. Adds a new subcommand group, poetry workspace, whic

Jack Smith 74 Jan 01, 2023
Really bad lisp implementation. Fun with pattern matching.

Lisp-py This is a horrible, ugly interpreter for a trivial lisp. Don't use it. It was written as an excuse to mess around with the new pattern matchin

Erik Derohanian 1 Nov 23, 2021
A very simple boarding app with DRF

CRUD project with DRF A very simple boarding app with DRF. About The Project 유저 정보를 갖고 게시판을 다루는 프로젝트 입니다. Version Python: 3.9 DB: PostgreSQL 13 Django

1 Nov 13, 2021
A simple tool made in Python language

Simple tool Uma simples ferramenta feita 100% em linguagem Python 💻 Requisitos: Python3 instalado em seu dispositivo Clonagem e acesso 📳 git clone h

josh washington 4 Dec 07, 2021
Hoopoe - Get notified of important stuff, right away.

Hoopoe - Get notified of important stuff, right away. Report a Bug · Request a Feature . Ask a Question Table of Contents About Getting Started Prereq

Vahid Al 8 Nov 12, 2022
This an Anki add on that automatically converts Notion notes into Anki flash cards. Currently in development!

NotionFlash This is an Anki add on in development that will allow automatically convert your Notion study notes into Anki flash cards. The Anki deck c

Neeraj Patel 10 Oct 07, 2022
A reminder for stand-up roster

roster-reminder A reminder for stand-up roster Run the project Setup database The project use SQLite as database. You can create tables refer to roste

Jason Zhang 5 Oct 28, 2022
A simple calculator that can add, subtract, multiply or divide depending upon the input from the user

Calculator A simple calculator that can add, subtract, multiply or divide depending upon the input from the user. In this example, we should have the

Jayesh Mali 1 Dec 27, 2021
Resizing using nnedi3/znedi3/nnedi3cl with center alignment and correct chroma placement

nnedi3_resample A VapourSynth script for easy resizing using nnedi3/znedi3/nnedi3cl with center alignment and correct chroma placement. Requirements n

Home Of VapourSynth Evolution 12 Sep 08, 2022
一个可以自动生成PTGen,MediaInfo,截图,并且生成发布所需内容的脚本

Differential 差速器 一个可以自动生成PTGen,MediaInfo,截图,并且生成发种所需内容的脚本 为什么叫差速器 差速器是汽车上的一种能使左、右轮胎以不同转速转动的结构。使用同样的动力输入,差速器能够输出不同的转速。就如同这个工具之于PT资源,差速器帮你使用同一份资源,输出不同PT

Lei Shi 96 Dec 15, 2022
TMTC Commander Core

This commander application was first developed by KSat for the SOURCE project to test the on-board software but has evolved into a more generic tool for satellite developers to perform TMTC (Telemetr

robamu 8 Dec 14, 2022
Create standalone, installable R Shiny apps using Electron

WARNING This is still very much a work in progress and nothing can be assumed stable in any way Temp notes: Two types of created installer, based on w

Chase Clark 5 Dec 24, 2021
🦋 hundun is a python library for the exploration of chaos.

hundun hundun is a python library for the exploration of chaos. Please note that this library is in beta phase. Example Import the package's equation

kosh 7 Nov 07, 2022
Some usefull scripts for the Nastran's 145 solution (Flutter Analysis) using the pyNastran package.

nastran-aero-flutter This project is intended to analyse the Supersonic Panel Flutter using the NASTRAN software. The project uses the pyNastran and t

zuckberj 11 Nov 16, 2022
A(Sync) Interface for internal Audible API written in pure Python.

Audible Audible is a Python low-level interface to communicate with the non-publicly Audible API. It enables Python developers to create there own Aud

mkb79 192 Jan 03, 2023
reproduces experiments from

Installation To enable importing of modules, from the parent directory execute: pip install -e . To install requirements: python -m pip install requir

Meta Research 15 Aug 11, 2022