<commit_before>%h3 Statistics

- stats = JSON.load(File.read(File.join(Rails.root, "public/stats.json")))

%table.details
  %tr
    %th Blocks
    - b = stats['blocks']
    %td #{b['main']} (#{b['side']} side, #{b['orphan']} orphan, #{b['total']} total)

  %tr
    %th Transactions
    %td #{stats['txs']} (#{stats['txins']} inputs, #{stats['txouts']} outputs)

  %tr
    %th Addresses
    %td
      #{stats['addrs']}
      - if Bitcoin.namecoin?
        (#{stats['names']} Names)

  %tr
    %th Blockchain Size
    %td= number_to_human_size b['size']

  %tr
    %th Total Coins
    %td= format_amount stats['coins']

  %tr
    %th Last Update
    %td= format_time stats['time']

%br/

%h3 Block Reward

%table.details

  %tr
    %th Current Reward
    %td= format_amount calculate_reward(STORE.get_depth)

  %tr
    %th Next Halving
    %td
      - drop = Bitcoin::Validation::REWARD_DROP
      in #{blocks = drop - (STORE.get_depth % drop)} blocks -
      - seconds = blocks * 10 * 60
      = (Time.now + seconds).strftime("%Y-%m-%d %H:%M")
      - if seconds < 2592000
        %br/
        (#{(Time.at(seconds) - 1.day).utc.strftime("%d days, %H hours, %M minutes")})

%br/

%h3 Time Since Last Block

= image_tag "/node_tslb_testnet3-day.png"
= image_tag "/node_tslb_testnet3-week.png"

%br/

%h3 Connections

= image_tag "/node_connections_testnet3-day.png"
= image_tag "/node_connections_testnet3-week.png"<commit_msg>fix stats images<commit_after>%h3 Statistics

- stats = JSON.load(File.read(File.join(Rails.root, "public/stats.json")))

%table.details
  %tr
    %th Blocks
    - b = stats['blocks']
    %td #{b['main']} (#{b['side']} side, #{b['orphan']} orphan, #{b['total']} total)

  %tr
    %th Transactions
    %td #{stats['txs']} (#{stats['txins']} inputs, #{stats['txouts']} outputs)

  %tr
    %th Addresses
    %td
      #{stats['addrs']}
      - if Bitcoin.namecoin?
        (#{stats['names']} Names)

  %tr
    %th Blockchain Size
    %td= number_to_human_size b['size']

  %tr
    %th Total Coins
    %td= format_amount stats['coins']

  %tr
    %th Last Update
    %td= format_time stats['time']

%br/

%h3 Block Reward

%table.details

  %tr
    %th Current Reward
    %td= format_amount calculate_reward(STORE.get_depth)

  %tr
    %th Next Halving
    %td
      - drop = Bitcoin::Validation::REWARD_DROP
      in #{blocks = drop - (STORE.get_depth % drop)} blocks -
      - seconds = blocks * 10 * 60
      = (Time.now + seconds).strftime("%Y-%m-%d %H:%M")
      - if seconds < 2592000
        %br/
        (#{(Time.at(seconds) - 1.day).utc.strftime("%d days, %H hours, %M minutes")})

%br/

%h3 Time Since Last Block

= image_tag "/node_tslb_#{Bitcoin.network_name}-day.png"
= image_tag "/node_tslb_#{Bitcoin.network_name}-week.png"

%h3 Connections To Bitcoin Network

= image_tag "/node_connections_#{Bitcoin.network_name}-day.png"
= image_tag "/node_connections_#{Bitcoin.network_name}-week.png"
{'fraction_non_alphanumeric': 0.17373461012311903, 'fraction_numerical': 0.012311901504787962, 'mean_word_length': 3.102384291725105, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '499487', 'n_tokens_mistral': 1143, 'n_tokens_neox': 1098, 'n_words': 239}