<commit_before>
<link rel="stylesheet" href="/style/live.css">

<div id="page_header">
  <div id="container_logo">
    <img src="/img/logo_large.png" alt="" />
  </div>
</div>

<div class="container">
  <div class="row">
    <div class="six columns">
<input
      <p>
        League Page
      </p>
      <div id="results">
      </div>
    </div>
  </div>
</div>


<script>

var url = '/league/myleagues/<%=session[:league_name]%>/teams';
console.log(url);
var teamjson;

$.ajax({
  url: url,
  type: 'GET',
  dataType: 'json'
})
.done(function(data) {
  console.log("success");
  teamjson = data;
  console.log(data);
  $('#results').append('Batters');
  for (var i = 1; i < 10 ; i++) {
    var pid = "player" + i + "_id";
    var $player = $("<div>", {class: "playerContainer", id: "player" + i});
    var $name = $("<div>", {class: "playerName"});
    $name.text("Batter " + i + ": " + teamjson.team1[i-1]);
    $player.append($name);
    $('#results').append($player);
  }
  $('#results').append('PITCHERS');
  for (var i = 10; i < 17 ; i++) {
    var pid = "player" + i + "_id";
    var $player = $("<div>", {class: "playerContainer", id: "player" + i});
    var $name = $("<div>", {class: "playerName"});
    $name.text("Pitcher " + i + ": " + teamjson.team1[i-1]);
    $player.append($name);
    $('#results').append($player);
  }
  $('#results').append('Batters');
  for (var i = 1; i < 10 ; i++) {
    var pid = "player" + i + "_id";
    var $player = $("<div>", {class: "playerContainer", id: "player" + i});
    var $name = $("<div>", {class: "playerName"});
    $name.text("Batter " + i + ": " + teamjson.team2[i-1]);
    $player.append($name);
    $('#results').append($player);
  }
  $('#results').append('PITCHERS');
  for (var i = 10; i < 17 ; i++) {
    var pid = "player" + i + "_id";
    var $player = $("<div>", {class: "playerContainer", id: "player" + i});
    var $name = $("<div>", {class: "playerName"});
    $name.text("Pitcher " + i + ": " + teamjson.team2[i-1]);
    $player.append($name);
    $('#results').append($player);
  }


})
.fail(function() {
  console.log("error");
})
.always(function() {
  console.log("complete");
});

console.log(teamjson);


</script>
<commit_msg>cleaned up display views<commit_after>
<link rel="stylesheet" href="/style/live.css">

<div id="page_header">
  <div id="container_logo">
    <img src="/img/logo_large.png" alt="" />
  </div>
</div>

<div class="container">
  <div class="row">
    <div class="six columns">
<input
      <p>
        League Page
      </p>
      <div id="results">
      </div>
    </div>
  </div>
</div>


<script>

var url = '/league/myleagues/<%=session[:league_name]%>/teams';
console.log(url);
var teamjson;

$.ajax({
  url: url,
  type: 'GET',
  dataType: 'json'
})
.done(function(data) {
  console.log("success");
  teamjson = data;
  console.log(data);
  $('#results').append('Batters');
  for (var i = 1; i < 10 ; i++) {
    var pid = "player" + i + "_id";
    var $player = $("<div>", {class: "playerContainer", id: "player" + i});
    var $name = $("<div>", {class: "playerName"});
    $name.text("Batter " + i + ": " + teamjson.team1[i-1]);
    $player.append($name);
    $('#results').append($player);
  }
  $('#results').append('PITCHERS');
  for (var i = 10; i < 17 ; i++) {
    var pid = "player" + i + "_id";
    var $player = $("<div>", {class: "playerContainer", id: "player" + i});
    var $name = $("<div>", {class: "playerName"});
    $name.text("Pitcher " + (i-9) + ": " + teamjson.team1[i-1]);
    $player.append($name);
    $('#results').append($player);
  }
  $('#results').append('Batters');
  for (var i = 1; i < 10 ; i++) {
    var pid = "player" + i + "_id";
    var $player = $("<div>", {class: "playerContainer", id: "player" + i});
    var $name = $("<div>", {class: "playerName"});
    $name.text("Batter " + i + ": " + teamjson.team2[i-1]);
    $player.append($name);
    $('#results').append($player);
  }
  $('#results').append('PITCHERS');
  for (var i = 10; i < 17 ; i++) {
    var pid = "player" + i + "_id";
    var $player = $("<div>", {class: "playerContainer", id: "player" + i});
    var $name = $("<div>", {class: "playerName"});
    $name.text("Pitcher " + (i-9) + ": " + teamjson.team2[i-1]);
    $player.append($name);
    $('#results').append($player);
  }


})
.fail(function() {
  console.log("error");
})
.always(function() {
  console.log("complete");
});

console.log(teamjson);


</script>

{'fraction_non_alphanumeric': 0.26053639846743293, 'fraction_numerical': 0.010367365336939374, 'mean_word_length': 3.3255360623781676, 'pattern_counts': {'":': 8, '<': 67, '<?xml version=': 0, '>': 57, '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': '3360141', 'n_tokens_mistral': 1693, 'n_tokens_neox': 1652, 'n_words': 363}