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。
PORTSCANNING-IN-PYTHON - A python threaded portscanner to scan websites and ipaddresses

PORTSCANNING-IN-PYTHON This is a python threaded portscanner to scan websites an

1 Feb 16, 2022
Covid-ml-predictors - COVID predictions using AI.

COVID Predictions This repo contains ML models to be trained on COVID-19 data from the UK, sourced off of Kaggle here. This uses many different ML mod

1 Jan 09, 2022
Izy - Python functions and classes that make python even easier than it is

izy Python functions and classes that make it even easier! You will wonder why t

5 Jul 04, 2022
Sabe is a python framework written for easy web server setup.

Sabe is a python framework written for easy web server setup. Sabe, kolay web sunucusu kurulumu için yazılmış bir python çerçevesidir. Öğrenmesi kola

2 Jan 01, 2022
Covid 19 status. Flask application. CovidAPI. Heroku.

Covid 19 In this project we see total count of people who got this virus and total death. How does it works Written in Python. Web app, Flask. package

AmirHossein Mohammadi 12 Jan 16, 2022
Oppia is an online learning tool that enables anyone to easily create and share interactive activities

Oppia is an online learning tool that enables anyone to easily create and share interactive activities (called 'explorations'). These activities simulate a one-on-one conversation with a tutor, makin

Oppia 4.7k Dec 29, 2022
Opendrop - An open Apple AirDrop implementation written in Python

OpenDrop: an Open Source AirDrop Implementation OpenDrop is a command-line tool that allows sharing files between devices directly over Wi-Fi. Its uni

Secure Mobile Networking Lab 7.5k Jan 03, 2023
Active Transport Analytics Model: A new strategic transport modelling and data visualization framework

{ATAM} Active Transport Analytics Model Active Transport Analytics Model (“ATAM”

ATAM Analytics 2 Dec 21, 2022
Eros is an expiremental programming language built using simple Python code.

Eros is an expiremental programming language built using simple Python code. Featuring an easy syntax and unique features like type slicing, the language remains an expirement that grows in down time

zxro 2 Nov 21, 2021
Wunderland desktop wallpaper and Microsoft Teams background.

Wunderland Professional Impress your colleagues, friends and family with this edition of the "Wunderland" wallpaper. With the nostalgic feel of the or

3 Dec 14, 2022
Path of Exile Vendor Recipe Tracker (Chaos/Regal orb)

Path of Exile Vendor Trade Tracker Are you tired of manually keeping track of collected and missing items for farming Chaos or Regal Orbs in PoE? Me t

1 Nov 09, 2021
WinBoost: Boost your windows system.

Winboost runs a complete checkup of your entire system locating junk files, speed-reducing issues and causes of any system or application glitches or crashes. Through a lot of research and testing, w

Smit Parmar 4 Oct 01, 2021
Fofa asset consolidation script

资产收集+C段整理二合一 基于fofa资产搜索引擎进行资产收集,快速检索目标条件下的IP,URL以及标题,适用于资产较多时对模糊资产的快速检索,新增C段整理功能,整理出

白泽Sec安全实验室 36 Dec 01, 2022
Manually Install Python 2.7 pip without any problem !

Python2.7_install_pip Manually Install Python 2.7 pip without any problem ! Download installPip.py to your system and Run the code using this Command

Ali Jafari 1 Dec 09, 2021
A beacon generator using Cobalt Strike and a variety of tools.

Beaconator is an aggressor script for Cobalt Strike used to generate either staged or stageless shellcode and packing the generated shellcode using your tool of choice.

Capt. Meelo 441 Dec 17, 2022
A pet facts python api

Pet-Facts-API A pet facts python api Project Links API :- https://pet-facts-api.vercel.app Docs :- https://fayasnoushad.github.io/Pet-Facts-API

Fayas Noushad 3 Dec 18, 2021
Check a discord message and give it a percentage of scamminess

scamChecker Check a discord message and give it a percentage of scamminess Run the bot, and run the command !scamCheck and it will return a percentage

3 Sep 22, 2022
Data-driven Computer Science UoB

COMS20011_2021 Data-driven Computer Science UoB Staff Laurence Aitchison [ 6 May 16, 2022

Processamento da Informação - Disciplina UFABC

Processamento da Informacao Disciplina UFABC, Linguagem de Programação Python - 2021.2 Objetivos Apresentar os fundamentos sobre manipulação e tratame

Melissa Junqueira de Barros Lins 1 Jun 12, 2022
BOHB tune library template (included example)

BOHB-template 실행 방법 python main.py 2021-10-10 기준 tf keras 버전 (tunecallback 방식) 완료 tf gradienttape 버전 (train_iteration 방식) 완료 pytorch 버전은 구현 준비중 방법 소개

Seungwoo Han 5 Mar 24, 2022