<commit_before>Notify = function(text, callback, close_callback, style) {

  var time = '5000';
  var $container = $('#notifications');
  var icon = '<i class="fa fa-info-circle "></i>';
 
  if (typeof style == "undefined" ) style = 'warning'
  
  var html = $('<div class="alert alert-' + style + '  hide">' + icon +  " " + text + '</div>');
  
  $('<a>',{
	  text: '×',
	  class: 'button close',
	  style: 'padding-left: 10px;',
	  href: '#',
	  click: function(e){
		  e.preventDefault()
		  close_callback && close_callback()
		  NotifyX(html)
	  }
  }).prependTo(html)

  $container.prepend(html)
  html.removeClass('hide').hide().fadeIn('slow')
  
  html.on('click', function () {
	callback && callback()
  	NotifyX(html)
  });

  setTimeout(function () {
    NotifyX($container.children('.alert').first());
  }, time);
}

NotifyX = function(element) {
  if (typeof element !== "undefined" ) {
    element.remove();
  } else {
	  $('#notifications .alert').stop().fadeOut("slow").remove();
  }
}



// Notify("Can't Touch This");
// Notify("Stop! Hammer time", null, null, 'danger');
//
// Notify(
// 	"I told you homeboy (You can't touch this)",
// 	function () { alert("clicked notification")},
// 	function () { alert("clicked x")},
// 	'info'
// );
//
//
// Notify(
// 	"I told you homeboy (You can't touch this)",
// 	function () { alert("clicked notification")},
// 	function () { alert("clicked x")},
// 	'success'
// );<commit_msg>fix selectors<commit_after>Notify = function(text, callback, close_callback, style) {

  var time = '10000';
  var $container = $('#notifications');
  var icon = '<i class="fa fa-info-circle "></i>';
 
  if (typeof style == "undefined" ) style = 'warning'
  
  var html = $('<div class="alert alert-' + style + '  hide">' + icon +  " " + text + '</div>');
  
  $('<a>',{
	  text: '×',
	  class: 'button close',
	  style: 'padding-left: 10px;',
	  href: '#',
	  click: function(e){
		  e.preventDefault()
		  close_callback && close_callback()
		  NotifyX(html)
	  }
  }).prependTo(html)

  $container.prepend(html)
  html.removeClass('hide').hide().fadeIn('slow')
  
  html.on('click', function () {
	callback && callback()
  	NotifyX(html)
  });

  setTimeout(function () {
    NotifyX(html);
  }, time);
}

NotifyX = function(element) {
  if (typeof element !== "undefined" ) {
	element.stop().fadeOut("slow").remove();
  } else {
	  var last = $('#notifications').children('.alert').last()
	  last.stop().fadeOut("slow").remove();
  }
}
{'fraction_non_alphanumeric': 0.2214170692431562, 'fraction_numerical': 0.005233494363929146, 'mean_word_length': 3.413854351687389, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, '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': '151996', 'n_tokens_mistral': 910, 'n_tokens_neox': 848, 'n_words': 184}