<commit_before>$(function(){

  var paused = false;
  var interval = 1;
  var haveTweet = false;
  var latestTweet;

  //bring in tweets
  var socket = io.connect(window.location.host);
  socket.on('new tweet', function (tweet) {
  	latestTweet = tweet;
  	haveTweet = true;
  });

  //show tweets
  // var myFunction = function(){
  //   clearInterval(interval);
  //   length = 1000 * interval;
  //   interval = setInterval(myFunction, counter);
  // }
  // var interval = setInterval(myFunction, counter);

  setInterval(function() {
  	if (paused == false && haveTweet == true)
  	{
  	  var tweet = latestTweet;
  	  $('.tweets').prepend('<div class="tweet" id="'+tweet.id+'"></div>');
      $('#'+tweet.id).append('<img class="profile-image" src="'+tweet.profile_image+'">')
                     .append('<h2>'+tweet.user+'</h2>')
                     .append('<p>'+tweet.text+'</p>');
      haveTweet = false;
  	}
  }, 1000*interval);

  //pause button handling
  $('a[rel=pause]').on('click', function(){
  	if (paused == false)
  	{
  	  paused = true;
      $(this).html('<i class="fa fa-play"></i>');
  	}
  	else
  	{
      paused = false;
      $(this).html('<i class="fa fa-pause"></i>')
  	}
  	
  });
});

//google analytics stuff
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');

ga('create', 'UA-36670106-4', 'auto');
ga('send', 'pageview');<commit_msg>Slow down the tweets a little<commit_after>$(function(){

  var paused = false;
  var length = 2;
  var haveTweet = false;
  var latestTweet;

  //bring in tweets
  var socket = io.connect(window.location.host);
  socket.on('new tweet', function (tweet) {
  	latestTweet = tweet;
  	haveTweet = true;
  });

  //show tweets
  var showTweet = function(){
  	if (paused == false && haveTweet == true)
  	{
  	  var tweet = latestTweet;
  	  $('.tweets').prepend('<div class="tweet" id="'+tweet.id+'"></div>');
      $('#'+tweet.id).append('<img class="profile-image" src="'+tweet.profile_image+'">')
                     .append('<h2>'+tweet.user+'</h2>')
                     .append('<p>'+tweet.text+'</p>');
      haveTweet = false;
  	}

  	//reset the interval in case it changed
    clearInterval(interval);
    interval = setInterval(showTweet, length*1000);
  }
  var interval = setInterval(showTweet, length*1000);

  //pause button handling
  $('a[rel=pause]').on('click', function(){
  	if (paused == false)
  	{
  	  paused = true;
      $(this).html('<i class="fa fa-play"></i>');
  	}
  	else
  	{
      paused = false;
      $(this).html('<i class="fa fa-pause"></i>')
  	}
  	
  });
});

//google analytics stuff
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');

ga('create', 'UA-36670106-4', 'auto');
ga('send', 'pageview');
{'fraction_non_alphanumeric': 0.22469135802469137, 'fraction_numerical': 0.014197530864197531, 'mean_word_length': 3.4580467675378266, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 25, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '6781127', 'n_tokens_mistral': 1258, 'n_tokens_neox': 1213, 'n_words': 194}