<commit_before>if (typeof (Stars) === 'undefined') {Stars = {}};

Stars.Scene = (function($) {
  var initPaging = function() {
    $('a[data-remote]').live('ajax:beforeSend', function(e, xhr, status) {
      xhr.setRequestHeader("page", $(this).data("page"));
    });

    $('a[data-remote]').live('ajax:complete', function(e, xhr, status) {
      if (xhr.responseText.trim().length > 0) {
        html = $(xhr.responseText);
        if ($(this).data("replace-id")) {
          replaceId = $(this).data("replace-id");
          $('#' + replaceId).replaceWith(html);
        } else {
          id = $(this).data("append-id");
          $('#' + id).append(html);
          var newPage = parseInt($(this).data("page")) + 1;
          $(this).data("page", newPage);
        }
      } else {
        $(this).hide();
      }
    });

    $('form[data-remote]').live('ajax:complete', function(e, xhr, status) {
      if ($(this).data("replace-id")) {
        replaceId = $(this).data("replace-id");
        $('#' + replaceId).replaceWith(xhr.responseText);
      }
    });
  };

  var initStarChooser = function() {
    $("#star_chooser").dialog({width: 640, autoOpen: false, closeText: ''});<commit_msg>Prevent unintentional double form submission<commit_after>if (typeof (Stars) === 'undefined') {Stars = {}};

Stars.Scene = (function($) {
  var initPaging = function() {
    $('a[data-remote]').live('ajax:beforeSend', function(e, xhr, status) {
      xhr.setRequestHeader("page", $(this).data("page"));
    });

    $('a[data-remote]').live('ajax:complete', function(e, xhr, status) {
      if (xhr.responseText.trim().length > 0) {
        html = $(xhr.responseText);
        if ($(this).data("replace-id")) {
          replaceId = $(this).data("replace-id");
          $('#' + replaceId).replaceWith(html);
        } else {
          id = $(this).data("append-id");
          $('#' + id).append(html);
          var newPage = parseInt($(this).data("page")) + 1;
          $(this).data("page", newPage);
        }
      } else {
        $(this).hide();
      }
    });

    $('form[data-remote]').live('ajax:beforeSend', function(e, xhr, status) {
      $(this).find("input").attr('disabled', 'disabled');
    });

    $('form[data-remote]').live('ajax:complete', function(e, xhr, status) {
      if ($(this).data("replace-id")) {
        replaceId = $(this).data("replace-id");
        $('#' + replaceId).replaceWith(xhr.responseText);
      }
    });
  };

  var initStarChooser = function() {
    $("#star_chooser").dialog({width: 640, autoOpen: false, closeText: ''});
{'fraction_non_alphanumeric': 0.23151750972762647, 'fraction_numerical': 0.0038910505836575876, 'mean_word_length': 2.837313432835821, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '1059485', 'n_tokens_mistral': 852, 'n_tokens_neox': 837, 'n_words': 128}