<commit_before>$(function(){
  $.support.cors = true;

  function roundCurr(num) {
    return Math.round(num * 1000) / 1000;
  }

  var base = 'http://0.0.0.0:3737/'
  
  $('.submit').click(function(){
    
    var data = {
      amount: $('.amt').val()
    };

    console.log(data);
    $.ajax({
      type: "POST",
      url: base + 'quote',
      data: data,
      dataType: 'json',
      crossDomain: true
    }).done(function(result){
      $('.buy span').empty();
      $('.sell span').empty();

      $('.buy .q').append(' '+roundCurr(result.buy.valBTC)+' BTC / '+
        roundCurr(result.buy.valUSD)+' USD');
      $('.buy .x').append(' '+roundCurr(result.buy.rate)+' USD => 1 BTC');
      $('.buy .d').append(roundCurr(result.buy.depth));

      $('.sell .q').append(' '+roundCurr(result.sell.valBTC)+' BTC / '+
        roundCurr(result.sell.valUSD)+' USD');
      $('.sell .x').append(' '+roundCurr(result.sell.rate)+' USD => 1 BTC');
      $('.sell .d').append(roundCurr(result.sell.depth));
    })
  })

});<commit_msg>Bugfix<commit_after>$(function(){
  $.support.cors = true;

  function roundCurr(num) {
    return Math.round(num * 1000) / 1000;
  }

  var base = 'http://benlyaunzon.com:3737/'
  
  $('.submit').click(function(){
    
    var data = {
      amount: $('.amt').val()
    };

    console.log(data);
    $.ajax({
      type: "POST",
      url: base + 'quote',
      data: data,
      dataType: 'json',
      crossDomain: true
    }).done(function(result){
      $('.buy span').empty();
      $('.sell span').empty();

      $('.buy .q').append(' '+roundCurr(result.buy.valBTC)+' BTC / '+
        roundCurr(result.buy.valUSD)+' USD');
      $('.buy .x').append(' '+roundCurr(result.buy.rate)+' USD => 1 BTC');
      $('.buy .d').append(roundCurr(result.buy.depth));

      $('.sell .q').append(' '+roundCurr(result.sell.valBTC)+' BTC / '+
        roundCurr(result.sell.valUSD)+' USD');
      $('.sell .x').append(' '+roundCurr(result.sell.rate)+' USD => 1 BTC');
      $('.sell .d').append(roundCurr(result.sell.depth));
    }).fail(function (jqXHR, textStatus, errorThrown) { console.log(textStatus); })
  })

});
{'fraction_non_alphanumeric': 0.24113805970149255, 'fraction_numerical': 0.014925373134328358, 'mean_word_length': 2.6294416243654823, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 1, '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': '2447153', 'n_tokens_mistral': 848, 'n_tokens_neox': 755, 'n_words': 131}