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。
This is a small compiler to demonstrate how compilers work.

This is a small compiler to demonstrate how compilers work. It compiles our own dialect to C, while being written in Python.

Md. Tonoy Akando 2 Jul 19, 2022
Генератор отчетов на Python с использованием библиотеки docx для работы с word-файлами и запросов к сервису

Генератор отчетов на Python с использованием библиотеки docx для работы с word-файлами и запросов к сервису

Semyon Esaev 2 Jun 24, 2022
In this repo i inherit the pos module and added QR code to pos receipt

odoo-pos-inherit In this repo i inherit the pos module and added QR code to pos receipt 1- Create new Odoo Module using command line $ python odoo-bin

5 Apr 09, 2022
Goal: Enable awesome tooling for Bazel users of the C language family.

Hedron's Compile Commands Extractor for Bazel — User Interface What is this project trying to do for me? First, provide Bazel users cross-platform aut

Hedron Vision 290 Dec 26, 2022
A python package to manage the stored receiver-side Strain Green's Tensor (SGT) database of 3D background models and able to generate Green's function and synthetic waveform

A python package to manage the stored receiver-side Strain Green's Tensor (SGT) database of 3D background models and able to generate Green's function and synthetic waveform

Liang Ding 7 Dec 14, 2022
Tools to convert SQLAlchemy models to Pydantic models

Pydantic-SQLAlchemy Tools to generate Pydantic models from SQLAlchemy models. Still experimental. How to use Quick example: from typing import List f

Sebastián Ramírez 893 Dec 29, 2022
The official FOSSCOMM 2021 CTF by [email protected]

FOSSCOMM 2021 CTF Table of Contents General Info FAQ General Info Purpose: This CTF is a collaboration between the FOSSCOMM conference and the Machina 2 Nov 14, 2021

Ingest openldap data into bloodhound

Bloodhound for Linux Ingest a dumped OpenLDAP ldif into neo4j to be visualized in Bloodhound. Usage: ./ldif_to_neo4j.py ./sample.ldif | cypher-shell -

Guillaume Quéré 71 Nov 09, 2022
This code makes the logs provided by Fiddler proxy of the Google Analytics events coming from iOS more readable.

GA-beautifier-iOS This code makes the logs provided by Fiddler proxy of the Google Analytics events coming from iOS more readable. To run it, create a

Rafael Machado 3 Feb 02, 2022
BlackMamba is a multi client C2/post exploitation framework

BlackMamba is a multi client C2/post exploitation framework with some spyware features. Powered by Python 3.8.6 and QT Framework.

Gustavo 873 Dec 29, 2022
Watcher for systemdrun user scopes

Systemctl Memory Watcher Animated watcher for systemdrun user scopes. Usage Launch some process in your GNU-Linux or compatible OS with systemd-run co

Antonio Vanegas 2 Jan 20, 2022
pyForgeCert is a Python equivalent of the original ForgeCert written in C#.

pyForgeCert is a Python equivalent of the original ForgeCert written in C#.

Evi1cg 47 Oct 08, 2022
A webapp for taking fast notes, designed for business, school, and collaboration with groups.

JOTS Journal of the Session A webapp for taking fast notes, designed for business, school, and collaboration with groups.

Zebadiah S. Taylor 2 Jun 10, 2022
Capture screen and download off Roku based devices

rokuview Capture screen and download off Roku based devices Tested on Hisense TV with Roku OS built-in No guarantee this will work with all Roku model

3 May 27, 2021
Checks for Vaccine Availability at your district and notifies you using E-mail, subscribe to our website.

Vaccine Availability Notifier Project Description Checks for Vaccine Availability at your district and notifies you using E-mail every 10 mins. Kindly

Farhan Hai Khan 19 Jun 03, 2021
Hashcrack - A non-object oriented open source, Software for Windows/Linux made in Python 3

Multi Force This project is a non-object oriented open source, Software for Wind

Radiationbolt 3 Jan 02, 2023
A tool that automatically creates fuzzing harnesses based on a library

AutoHarness is a tool that automatically generates fuzzing harnesses for you. This idea stems from a concurrent problem in fuzzing codebases today: large codebases have thousands of functions and pie

261 Jan 04, 2023
Python data loader for Solar Orbiter's (SolO) Energetic Particle Detector (EPD).

Data loader (and downloader) for Solar Orbiter/EPD energetic charged particle sensors EPT, HET, and STEP. Supports level 2 and low latency data provided by ESA's Solar Orbiter Archive.

Jan Gieseler 9 Dec 16, 2022
Repository for my Monika Assistant project

Monika_Assistant Repository for my Monika Assistant project Major changes: Added face tracker Added manual daily log to see how long it takes me to fi

3 Jan 10, 2022
Generic NDJSON importer for hashlookup server

Generic NDJSON importer for hashlookup server Usage usage: hashlookup-json-importer.py [-h] [-v] [-s SOURCE] [-p PARENT] [--parent-meta PARENT_META [P

hashlookup 2 Jan 19, 2022