<commit_before><script type="text/x-handlebars">
  {{outlet}}
</script>

<script type="text/x-handlebars" data-template-name="index">
  <div class="hero-unit">
    <div class="inner">
      <h1>{{title}}</h1>
      <p>{{description}}</p>
      <button class="pure-button pure-button-secondary pure-button-large" {{action "play"}} {{bind-attr disabled="isLoading"}}>Play</button>
    </div>
  </div>
</script>

<script type="text/x-handlebars" data-template-name="game">
  <div class="container">
    {{partial "header"}}
    
    {{#if response.variant}}
      <div class="status">
        <span>Lives: {{game.lives}}</span>
        <span>Score: {{game.score}}</span>
      </div>
      
      <pre>
        <code>{{{highlightedSnippet}}}</code>
      </pre>
      
      <div class="answers">
      {{#if correct}}
        <ul class="result">
          <li>
            <h2>Nope! The right answer was {{correct.name}}</h2>
            <a class="pure-button pure-button-error" {{action "next"}}>
              {{#if isLive}}
              Next
              {{else}}
              Game over
              {{/if}}
            </a>
          </li>
        </ul>
      {{else}}
        <ul class="answer-types">
          {{#each option in response.variant.options}}
            <li>
              <button class="pure-button pure-button-secondary" {{action "choose" option.key}} {{bind-attr disabled="isLoading"}}>
                {{option.name}}
              </button>
            </li>
          {{/each}}
        </ul>
      {{/if}}
      </div>
    {{else}}
      <div class="gameover">
        <h3>Your score is {{game.score}}!</h3>
        <a href="/#/" class="pure-button pure-button-secondary">Play again</a>
        <del class="clearfix"></del>
        
        {{#if hasSurvived}}
        <a href="http://theoldreader.com/kittens/" target="_blank">
          <img src="http://theoldreader.com/kittens/500/350/" alt="Kittens!" />
        </a>
        <del class="clearfix"></del>
        <i>(Refresh to see more dope kittens)</i>
        {{/if}}
      </div>
    {{/if}}
  </div>
  
  {{partial "footer"}}
</script>

<script type="text/x-handlebars" data-template-name="stats">
  <div class="container">
    {{partial "header"}}
    
    {{#with model}}
    <h2>Stats</h2>
    <table>
      <tr>
        <td>Games</td>
        <td>{{games}}</td>
      </tr>
      <tr>
        <td>Languages count</td>
        <td>{{variants}}</td>
      </tr>
      <tr>
        <td>Competion rate</td>
        <td>{{completion_rate}}%</td>
      </tr>
      <tr>
        <td>Easiest language</td>
        {{#with easiest}}
          <td>{{name}} ({{value}}% of right guesses)</td>
        {{/with}}
      </tr>
      <tr><commit_msg>Fix stats typo<commit_after><script type="text/x-handlebars">
  {{outlet}}
</script>

<script type="text/x-handlebars" data-template-name="index">
  <div class="hero-unit">
    <div class="inner">
      <h1>{{title}}</h1>
      <p>{{description}}</p>
      <button class="pure-button pure-button-secondary pure-button-large" {{action "play"}} {{bind-attr disabled="isLoading"}}>Play</button>
    </div>
  </div>
</script>

<script type="text/x-handlebars" data-template-name="game">
  <div class="container">
    {{partial "header"}}
    
    {{#if response.variant}}
      <div class="status">
        <span>Lives: {{game.lives}}</span>
        <span>Score: {{game.score}}</span>
      </div>
      
      <pre>
        <code>{{{highlightedSnippet}}}</code>
      </pre>
      
      <div class="answers">
      {{#if correct}}
        <ul class="result">
          <li>
            <h2>Nope! The right answer was {{correct.name}}</h2>
            <a class="pure-button pure-button-error" {{action "next"}}>
              {{#if isLive}}
              Next
              {{else}}
              Game over
              {{/if}}
            </a>
          </li>
        </ul>
      {{else}}
        <ul class="answer-types">
          {{#each option in response.variant.options}}
            <li>
              <button class="pure-button pure-button-secondary" {{action "choose" option.key}} {{bind-attr disabled="isLoading"}}>
                {{option.name}}
              </button>
            </li>
          {{/each}}
        </ul>
      {{/if}}
      </div>
    {{else}}
      <div class="gameover">
        <h3>Your score is {{game.score}}!</h3>
        <a href="/#/" class="pure-button pure-button-secondary">Play again</a>
        <del class="clearfix"></del>
        
        {{#if hasSurvived}}
        <a href="http://theoldreader.com/kittens/" target="_blank">
          <img src="http://theoldreader.com/kittens/500/350/" alt="Kittens!" />
        </a>
        <del class="clearfix"></del>
        <i>(Refresh to see more dope kittens)</i>
        {{/if}}
      </div>
    {{/if}}
  </div>
  
  {{partial "footer"}}
</script>

<script type="text/x-handlebars" data-template-name="stats">
  <div class="container">
    {{partial "header"}}
    
    {{#with model}}
    <h2>Stats</h2>
    <table>
      <tr>
        <td>Games</td>
        <td>{{games}}</td>
      </tr>
      <tr>
        <td>Languages count</td>
        <td>{{variants}}</td>
      </tr>
      <tr>
        <td>Completion rate</td>
        <td>{{completion_rate}}%</td>
      </tr>
      <tr>
        <td>Easiest language</td>
        {{#with easiest}}
          <td>{{name}} ({{value}}% of right guesses)</td>
        {{/with}}
      </tr>
      <tr>
{'fraction_non_alphanumeric': 0.20506236243580336, 'fraction_numerical': 0.005135730007336757, 'mean_word_length': 1.898989898989899, 'pattern_counts': {'":': 0, '<': 181, '<?xml version=': 0, '>': 181, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3251975', 'n_tokens_mistral': 1851, 'n_tokens_neox': 1794, 'n_words': 341}