game.py 文件源码

python
阅读 39 收藏 0 点赞 0 评论 0

项目:temci 作者: parttimenerd 项目源码 文件源码
def get_html2(self, base_file_name: str, h_level: int):
        base_file_name += "__cat_" + html_escape_property(self.name)
        html = """
            <h{}>{}</h{}>
        """.format(h_level, self.name, h_level)
        if len(self.children) > 1:
            html += self.boxplot_html_for_data("mean score", base_file_name, self.get_x_per_impl(used_rel_mean_property))
            html += self.table_html_for_vals_per_impl(common_columns, base_file_name)
            if len(self.get_input_strs()) > 1:
                html += """
                <h{h}> Mean scores per input</h{h}>
                """.format(h=h_level + 1)
                for input in self.get_input_strs():
                    html += """
                        <h{h}>Mean scores for input {!r}</h{h}>
                        The plot shows the distribution of mean scores per program for each implementation.
                        <p>
                    """.format(input, h=h_level + 2)
                    file_name = base_file_name + "__input_" + html_escape_property(input)
                    html += self.boxplot_html_for_data("mean score", file_name,
                                          self.get_x_per_impl_and_input(used_rel_mean_property, input))
                    html += self.table_html_for_vals_per_impl(common_columns, file_name,
                                                              lambda property: self.get_x_per_impl_and_input(property,                                                                                       input))
        for (i, prog) in enumerate(self.programs):
            html += self.programs[prog].get_html2(base_file_name + "_" + html_escape_property(prog), h_level + 1)
        return html
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号