<commit_before><div id="price-chart-container" class="chart-container">
  <h3>Last 48h trade data</h3>
  <div id="price-chart" class="chart" style="margin:auto;margin-top:2em;width:400px;height:300px"></div>
</div>

<h1>Welcome to bitcoin-central.net!</h1>
<div class="question" style="text-align:justify">
  <h2>What is Bitcoin?</h2>
  <p>
    Bitcoin is a peer-to-peer digital currency. Peer-to-peer means that there is no central authority to issue new money or keep track of transactions. Instead, these tasks are managed collectively by the nodes of the network. Advantages:
  <ul>
    <li>
      Bitcoins can be sent easily through the Internet, without having to trust middlemen.
    </li>
    <li>
      Transactions are designed to be irreversible.
    </li>
    <li>
      Be safe from instability caused by fractional reserve banking and central banks. The limited inflation of the Bitcoin system’s money supply is distributed evenly (by CPU power) throughout the network, not monopolized by banks.
    </li>
  </ul>
  More detailed explanations can be found at <strong><%= link_to "bitcoin.org", "http://bitcoin.org" %></strong>.
</p>
</div>

<script type="text/javascript">
  var graph = new Proto.Chart(
  $('price-chart'),   
  [
    {
      data: [
        <%=
          trades = []
          
          with_exclusive_scope do
            trades = Trade.
              with_currency(:lrusd).
              where("created_at >= ?", DateTime.now.advance(:hours => -48)).
              all.
              map { |t| "[#{t.created_at.to_i}, #{t.ppc}]"}
          end

          trades << "[#{DateTime.now.to_i}, #{Trade.with_currency(:lrusd).last.ppc}]" unless Trade.with_currency(:lrusd).count.zero?

          trades.join(",")
        %>
      ],
      label: "LRUSD",
      color: "#068300"
    },
    {
      data: [
        <%=
          with_exclusive_scope do
            trades = Trade.
              with_currency(:lreur).
              where("created_at >= ?", DateTime.now.advance(:hours => -48)).
              all.
              map { |t| "[#{t.created_at.to_i}, #{t.ppc}]"}
          end

          trades << "[#{DateTime.now.to_i}, #{Trade.with_currency(:lreur).last.ppc}]" unless Trade.with_currency(:lreur).count.zero?

          trades.join(",")
        %>
      ],
      label: "LREUR",
      color:"#0E00C1"
    },
    {
      data: [
        <%=
          with_exclusive_scope do
            trades = Trade.
              with_currency(:eur).
              where("created_at >= ?", DateTime.now.advance(:hours => -48)).
              all.
              map { |t| "[#{t.created_at.to_i}, #{t.ppc}]"}
          end

          trades << "[#{DateTime.now.to_i}, #{Trade.with_currency(:eur).last.ppc}]" unless Trade.with_currency(:eur).count.zero?

          trades.join(",")
        %>
      ],
      label: "EUR",
      color:"#AFAAF3"
    }
  ],
  {
    xaxis: {
      mode: "time",
      max: <%= DateTime.now.to_i %>,
      min: <%= DateTime.now.advance(:hours => -48).to_i %><commit_msg>Capistrano makes things way too easy for my own good<commit_after><div id="price-chart-container" class="chart-container">
  <h3>Last 48h trade data</h3>
  <div id="price-chart" class="chart" style="margin:auto;margin-top:2em;width:400px;height:300px"></div>
</div>

<h1>Welcome to bitcoin-central.net!</h1>
<div class="question" style="text-align:justify">
  <h2>What is Bitcoin?</h2>
  <p>
    Bitcoin is a peer-to-peer digital currency. Peer-to-peer means that there is no central authority to issue new money or keep track of transactions. Instead, these tasks are managed collectively by the nodes of the network. Advantages:
  <ul>
    <li>
      Bitcoins can be sent easily through the Internet, without having to trust middlemen.
    </li>
    <li>
      Transactions are designed to be irreversible.
    </li>
    <li>
      Be safe from instability caused by fractional reserve banking and central banks. The limited inflation of the Bitcoin system’s money supply is distributed evenly (by CPU power) throughout the network, not monopolized by banks.
    </li>
  </ul>
  More detailed explanations can be found at <strong><%= link_to "bitcoin.org", "http://bitcoin.org" %></strong>.
</p>
</div>

<script type="text/javascript">
  var graph = new Proto.Chart(
  $('price-chart'),   
  [
    {
      data: [
        <%=
          trades = []
          
          Trade.with_exclusive_scope do
            trades = Trade.
              with_currency(:lrusd).
              where("created_at >= ?", DateTime.now.advance(:hours => -48)).
              all.
              map { |t| "[#{t.created_at.to_i}, #{t.ppc}]"}
          end

          trades << "[#{DateTime.now.to_i}, #{Trade.with_currency(:lrusd).last.ppc}]" unless Trade.with_currency(:lrusd).count.zero?

          trades.join(",")
        %>
      ],
      label: "LRUSD",
      color: "#068300"
    },
    {
      data: [
        <%=
          Trade.with_exclusive_scope do
            trades = Trade.
              with_currency(:lreur).
              where("created_at >= ?", DateTime.now.advance(:hours => -48)).
              all.
              map { |t| "[#{t.created_at.to_i}, #{t.ppc}]"}
          end

          trades << "[#{DateTime.now.to_i}, #{Trade.with_currency(:lreur).last.ppc}]" unless Trade.with_currency(:lreur).count.zero?

          trades.join(",")
        %>
      ],
      label: "LREUR",
      color:"#0E00C1"
    },
    {
      data: [
        <%=
          Trade.with_exclusive_scope do
            trades = Trade.
              with_currency(:eur).
              where("created_at >= ?", DateTime.now.advance(:hours => -48)).
              all.
              map { |t| "[#{t.created_at.to_i}, #{t.ppc}]"}
          end

          trades << "[#{DateTime.now.to_i}, #{Trade.with_currency(:eur).last.ppc}]" unless Trade.with_currency(:eur).count.zero?

          trades.join(",")
        %>
      ],
      label: "EUR",
      color:"#AFAAF3"
    }
  ],
  {
    xaxis: {
      mode: "time",
      max: <%= DateTime.now.to_i %>,
      min: <%= DateTime.now.advance(:hours => -48).to_i %>
{'fraction_non_alphanumeric': 0.15658304640104936, 'fraction_numerical': 0.011149368748975241, 'mean_word_length': 2.145951521402785, 'pattern_counts': {'":': 0, '<': 77, '<?xml version=': 0, '>': 79, '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': '2219374', 'n_tokens_mistral': 2039, 'n_tokens_neox': 1964, 'n_words': 453}