<commit_before>#miner-pool
  %table(cellpadding="0" cellspacing="0")
    %thead
      %th Host
      %th Rate(5s)
      %th Rate(avg)
      %th Devices

    %tbody
      - @miner_pool.miners.each_with_index do |miner, index|
        - @summary[:ghs_5s] << miner.summary[:ghs_5s]
        - @summary[:ghs_avg] << miner.summary[:ghs_av]

        %tr(onclick="document.location='#{miner_url(index)}';")
          %td
            = link_to miner.host + ':' + miner.port.to_s, miner_url(index)
          %td.text-center= formatHashrate(miner.summary[:ghs_5s] * 1e9)
          %td.text-center= formatHashrate(miner.summary[:ghs_av] * 1e9)
          %td
            %table(cellpadding="0" cellspacing="0")
              %thead
                %th Name
                %th Status
                %th Elapsed
                %th C
                %th F
                %th Error
              %tbody
                - miner.devs.each_with_index do |device, index|
                  - @summary[:error_rate]  << device[:'device_hardware%']
                  - @summary[:temperature] << device[:temperature]
                  - @summary[:uptime]      << device[:device_elapsed]

                  %tr.text-center
                    %td= device[:name] + index.to_s
                    %td= device[:status]
                    %td= time_ago_in_words(Time.now - device[:device_elapsed])
                    %td= raw(device[:temperature].to_s + '&deg;')
                    %td= raw(toF(device[:temperature]).to_s + '&deg;')
                    %td= device[:'device_hardware%'].to_s + '%'

                  - if chain_stats = get_chain_stats_for(miner, device[:name]+index.to_s)
                    - 1.upto(4) do |i|
                      - status = chain_stats.send(:[], :"chain_acs#{i}") rescue nil
                      - next if status.empty?

                      %tr.text-center
                        %td= "ACS#{(i - 1).to_s}"
                        %td(colspan="4")= raw(status.gsub('x', '<span class="red bold">x</span>'))
                        %td= ((1.0 - (status.count('o').to_f / status.gsub(' ','').length.to_f)) * 100).to_s + '%'<commit_msg>adding rejected %<commit_after>#miner-pool
  %table(cellpadding="0" cellspacing="0")
    %thead
      %th Host
      %th Rate(5s)
      %th Rate(avg)
      %th Devices

    %tbody
      - @miner_pool.miners.each_with_index do |miner, index|
        - @summary[:ghs_5s] << miner.summary[:ghs_5s]
        - @summary[:ghs_avg] << miner.summary[:ghs_av]

        %tr(onclick="document.location='#{miner_url(index)}';")
          %td
            = link_to miner.host + ':' + miner.port.to_s, miner_url(index)
          %td.text-center= formatHashrate(miner.summary[:ghs_5s] * 1e9)
          %td.text-center= formatHashrate(miner.summary[:ghs_av] * 1e9)
          %td
            %table(cellpadding="0" cellspacing="0")
              %thead
                %th Name
                %th Status
                %th Elapsed
                %th C
                %th F
                %th Rejected
                %th Error
              %tbody
                - miner.devs.each_with_index do |device, index|
                  - @summary[:error_rate]  << device[:'device_hardware%']
                  - @summary[:temperature] << device[:temperature]
                  - @summary[:uptime]      << device[:device_elapsed]

                  %tr.text-center
                    %td= device[:name] + index.to_s
                    %td= device[:status]
                    %td= time_ago_in_words(Time.now - device[:device_elapsed])
                    %td= raw(device[:temperature].to_s + '&deg;')
                    %td= raw(toF(device[:temperature]).to_s + '&deg;')
                    %td= device[:'device_rejected%'].to_s + '%'
                    %td= device[:'device_hardware%'].to_s + '%'

                  - if chain_stats = get_chain_stats_for(miner, device[:name]+index.to_s)
                    - 1.upto(4) do |i|
                      - status = chain_stats.send(:[], :"chain_acs#{i}") rescue nil
                      - next if status.empty?

                      %tr.text-center
                        %td= "ACS#{(i - 1).to_s}"
                        %td(colspan="5")= raw(status.gsub('x', '<span class="red bold">x</span>'))
                        %td= ((1.0 - (status.count('o').to_f / status.gsub(' ','').length.to_f)) * 100).to_s + '%'
{'fraction_non_alphanumeric': 0.15463447961739923, 'fraction_numerical': 0.009565019357777272, 'mean_word_length': 1.532871972318339, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 7, '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': '1871471', 'n_tokens_mistral': 1454, 'n_tokens_neox': 1376, 'n_words': 220}