<commit_before>{% extends "competition/competition_base_sidebar.html" %}
{% load competition_tags %}
{% load hermes_tags %}

{% block title %}
  Games
{% endblock %}

{% block competition_content %}
  <h2><strong>Game {% firstof game.game_id game.id %}</strong></h2>
  <table class="table table-hover">
    <tbody>
      <tr>
        <th>Game #</th>
        {# firstof will ALWAYS mark content as "safe", but since game.id and game.game_id #}
        {# are both integers, it's not an issue here. #}
        <td>{% firstof game.game_id game.id %}</td>
      </tr>

      <tr>
        <th>Completed</th>
        <td>
          {% with time=game.data.completed|iso_to_datetime %}
            {{ time|default:"--" }}
            {% if time %}
              ({{ time|timesince }} ago)
            {% endif %}
          {% endwith %}
        </td>
      </tr>

      {% with scores=game.scores.select_related.all|dictsortreversed:"score" %}
      <tr>
        <th>Opponents</th>
          <td>{% include "competition/game/_opponent_list.html" %}</td>
      </tr>
      <tr>
        <th>Result</th>
        {% include "competition/game/_result_display.html" %}
      </tr>
      {% endwith %}
      <tr>
        <th>Submission Name</th>
        <td>
          <ul class="list-unstyled" style="margin-bottom:0;">
            {% for score in team_scores %}
              <li>
                <span class="label label-info">{{ score.data.version }}</span>
              </li>
            {% endfor %}
          </ul>
        </td>
      </tr>
      <tr>
        <th>Game Log</th>
        <td>
          <form method="get" action="{{ game.data.gamelog_url }}"
                style="margin-bottom: 0;">
            <button class="btn btn-primary">
              <i class="fa fa-download"></i> Download
            </button>
          </form>
        </td>
      </tr>
      <tr>
        <th>Visualize</th>
        <td>
          <a href="{% if 'Chess' in competition.name %}http://r99acm.device.mst.edu:3080/chesser?log={% else %}http://vis.megaminerai.com/#/?logUrl={% endif %}{{ game.data.gamelog_url }}" class="btn btn-primary" target="_blank">
            <i class="fa fa-play-circle"></i>
          </a>
        </td>
      </tr>
      <tr>
        <th>Build Output</th>
        <td>
          {% for score in team_scores %}
            <form method="get" action="{{ score.data.output_url }}"
                  style="margin-bottom: 0;">
              <button class="btn btn-primary">
                <i class="fa fa-download"></i> Download
              </button>
            </form>
          {% endfor %}
        </td>
      </tr>
    </tbody>
  </table>
{% endblock %}
<commit_msg>Update chess vis URL<commit_after>{% extends "competition/competition_base_sidebar.html" %}
{% load competition_tags %}
{% load hermes_tags %}

{% block title %}
  Games
{% endblock %}

{% block competition_content %}
  <h2><strong>Game {% firstof game.game_id game.id %}</strong></h2>
  <table class="table table-hover">
    <tbody>
      <tr>
        <th>Game #</th>
        {# firstof will ALWAYS mark content as "safe", but since game.id and game.game_id #}
        {# are both integers, it's not an issue here. #}
        <td>{% firstof game.game_id game.id %}</td>
      </tr>

      <tr>
        <th>Completed</th>
        <td>
          {% with time=game.data.completed|iso_to_datetime %}
            {{ time|default:"--" }}
            {% if time %}
              ({{ time|timesince }} ago)
            {% endif %}
          {% endwith %}
        </td>
      </tr>

      {% with scores=game.scores.select_related.all|dictsortreversed:"score" %}
      <tr>
        <th>Opponents</th>
          <td>{% include "competition/game/_opponent_list.html" %}</td>
      </tr>
      <tr>
        <th>Result</th>
        {% include "competition/game/_result_display.html" %}
      </tr>
      {% endwith %}
      <tr>
        <th>Submission Name</th>
        <td>
          <ul class="list-unstyled" style="margin-bottom:0;">
            {% for score in team_scores %}
              <li>
                <span class="label label-info">{{ score.data.version }}</span>
              </li>
            {% endfor %}
          </ul>
        </td>
      </tr>
      <tr>
        <th>Game Log</th>
        <td>
          <form method="get" action="{{ game.data.gamelog_url }}"
                style="margin-bottom: 0;">
            <button class="btn btn-primary">
              <i class="fa fa-download"></i> Download
            </button>
          </form>
        </td>
      </tr>
      <tr>
        <th>Visualize</th>
        <td>
          <a href="{% if 'Chess' in competition.name %}http://r99acm.device.mst.edu:5400?log={% else %}http://vis.megaminerai.com/#/?logUrl={% endif %}{{ game.data.gamelog_url }}" class="btn btn-primary" target="_blank">
            <i class="fa fa-play-circle"></i>
          </a>
        </td>
      </tr>
      <tr>
        <th>Build Output</th>
        <td>
          {% for score in team_scores %}
            <form method="get" action="{{ score.data.output_url }}"
                  style="margin-bottom: 0;">
              <button class="btn btn-primary">
                <i class="fa fa-download"></i> Download
              </button>
            </form>
          {% endfor %}
        </td>
      </tr>
    </tbody>
  </table>
{% endblock %}

{'fraction_non_alphanumeric': 0.17633886919201344, 'fraction_numerical': 0.004105243515581265, 'mean_word_length': 1.6733167082294265, 'pattern_counts': {'":': 0, '<': 155, '<?xml version=': 0, '>': 155, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3134759', 'n_tokens_mistral': 1826, 'n_tokens_neox': 1685, 'n_words': 353}