<commit_before>var posts = [];
var postLimit = 20;
var offset = 0;
var busy = false;
var scrollThrottle = null;
var ajaxTimeout = null;

var baseURL = 'https://hacker-news.firebaseio.com/v0';
var topPostsRequest = $.ajax(baseURL + '/topstories.json');

/**
 * Grabs more items from the top 100 list, with the given offset.
 */
function getMoreItems(topPosts, offset) {
   topPosts = topPosts.slice(offset, offset + postLimit);

   topPosts.forEach(function(post) {
      var postData = $.ajax(baseURL + '/item/' + post + '.json');

      postData.done(function(data) {
         $('#content').append(entryFormat(data));
      });
   });

   this.offset += 20;
   if (offset > 100) {
      $('#scroll_text').hide();
      $(window).unbind('scroll');
   }
   busy = false;
}

/**
 * Throws all parts of an item div into an array and then joins it with spaces.
 */
function entryFormat(data) {
   var link = '<a class="lead" target="_blank" href="' + data.url + '" >' + data.title + '</a>';
   var comments = data.kids ? data.kids.length : 0;
   var entryArgs = [
      '<div class="item">',
      link,
      '<p>',
      data.score,
      'points',
      ' by ' + data.by,
      '| ' + comments,
      'comments',
      '</p>',
      '</div>'
   ];

   return entryArgs.join(' ');
};
<commit_msg>Remove scroll down notice when no more items to show<commit_after>var posts = [];
var postLimit = 20;
var offset = 0;
var busy = false;
var scrollThrottle = null;
var ajaxTimeout = null;

var baseURL = 'https://hacker-news.firebaseio.com/v0';
var topPostsRequest = $.ajax(baseURL + '/topstories.json');

/**
 * Grabs more items from the top 100 list, with the given offset.
 */
function getMoreItems(topPosts, offset) {
   topPosts = topPosts.slice(offset, offset + postLimit);

   topPosts.forEach(function(post) {
      var postData = $.ajax(baseURL + '/item/' + post + '.json');

      postData.done(function(data) {
         $('#content').append(entryFormat(data));
      });
   });

   this.offset += 20;
   if (this.offset >= 100) {
      $('#scroll_text').hide();
      $(window).unbind('scroll');
   }
   busy = false;
}

/**
 * Throws all parts of an item div into an array and then joins it with spaces.
 */
function entryFormat(data) {
   var link = '<a class="lead" target="_blank" href="' + data.url + '" >' + data.title + '</a>';
   var comments = data.kids ? data.kids.length : 0;
   var entryArgs = [
      '<div class="item">',
      link,
      '<p>',
      data.score,
      'points',
      ' by ' + data.by,
      '| ' + comments,
      'comments',
      '</p>',
      '</div>'
   ];

   return entryArgs.join(' ');
};

{'fraction_non_alphanumeric': 0.1777440182301557, 'fraction_numerical': 0.009874667679453095, 'mean_word_length': 2.7361702127659573, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 17, 'https://': 2, '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': '5542008', 'n_tokens_mistral': 902, 'n_tokens_neox': 867, 'n_words': 227}