<commit_before>function inView(elem) {
	var $elem = $(elem);
	var scrollElem = ((navigator.userAgent.toLowerCase().indexOf('webkit') != -1) ? 'body' : 'html');
	var viewportTop = $(scrollElem).scrollTop();
	var viewportBottom = viewportTop + $(window).height();
	var elemTop = Math.round( $elem.offset().top );
	var elemBottom = elemTop + $elem.height();
	return ((elemTop < viewportBottom) && (elemBottom > viewportTop));
};

// Scrolls to the selected menu item on the page
$(function() {
	$('a').click(function() {
		if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') || location.hostname == this.hostname) {
			var target = $(this.hash);
			target = target.length ? target : $('[name=' + this.hash.slice(1) + ']');
			if (target.length) {
				$('html,body').animate({
					scrollTop: target.offset().top
				}, 1000);
				return false;
			}
		}
	});
});
/* ANIMATE IN VIEW */
$(document).ready(function(){
	/* SCROLLING PAGE ANIMATIONS */
	if(inView($(".name"))){
		$(this).addClass("fadeInDown");
	};
	$(window).scroll(function(){  
		/* CUSTOM SCROLL SPY */
		if(inView($(".home"))){
			$(".homenav").addClass("active");
			$(".aboutnav").removeClass("active");
			$(".programmingnav").removeClass("active");
			$(".interestsnav").removeClass("active");
			$(".contactnav").removeClass("active");
		};
		if(inView($(".about"))){
			$(".homenav").removeClass("active");
			$(".aboutnav").addClass("active");
			$(".programmingnav").removeClass("active");
			$(".interestsnav").removeClass("active");
			$(".contactnav").removeClass("active");
		};
		if(inView($(".icon-ruby"))){
			$(".homenav").removeClass("active");
			$(".aboutnav").removeClass("active");
			$(".programmingnav").addClass("active");
			$(".interestsnav").removeClass("active");
			$(".contactnav").removeClass("active");
		};
		if(inView($(".crossfit"))){
			$(".homenav").removeClass("active");
			$(".aboutnav").removeClass("active");
			$(".programmingnav").removeClass("active");
			$(".interestsnav").addClass("active");
			$(".contactnav").removeClass("active");
		};
		if(inView($(".footerz"))){
			$(".homenav").removeClass("active");
			$(".aboutnav").removeClass("active");			
			$(".programmingnav").removeClass("active");
			$(".interestsnav").removeClass("active");
			$(".contactnav").addClass("active");
		};
		/* Custom Animations *//*
		if(inView($(".about"))){
			$(".about1").removeClass("hidden");
			$(".about1").addClass("fadeInDown");
		};
		if(inView($(".programming"))){
			$(".programming1").removeClass("hidden");
			$(".programming1").addClass("fadeInDown");
		};
		if(inView($(".interests"))){
			$(".interests1").removeClass("hidden");
			$(".interests1").addClass("fadeInDown");
		};
		
		if(inView($(".footerz"))){
			$(".contact1").removeClass("hidden");
			$(".contact2").removeClass("hidden");
			$(".contact1").addClass("fadeInLeft");
			$(".contact2").addClass("fadeInRight");			
		};*/   
		/* BOUNCING SOCIAL BUTTONS *//*
		if(inView($(".footerz"))){
			dance();
        	}; */
	});
});

/*function dance() {
	$(".social1").delay(500).queue(function(){
		$(this).addClass("bounce");
		$(this).dequeue();
	});
	$(".social2").delay(1000).queue(function(){
		$(this).addClass("bounce");
		$(this).dequeue();
	});
	$(".social3").delay(1500).queue(function(){
		$(this).addClass("bounce");
		$(this).dequeue();
	});
}*/

/* NAVBAR HAMBURGER/X ANIMATION */
$(".navbar-toggle").on("click", function () {
	$(this).toggleClass("active");
});

/*---- NAVBAR COLLAPSE ON SCROLL ----*/
$('.navbar-collapse ul li a, .navbar-brand').click(function() {
	$('.navbar-toggle:visible').click();
});

/*---- SQUISHY NAVBAR ----*/
$(window).scroll(function(){
	if ($(".navbar").offset().top > 50) {
  		$(".navbar-fixed-top").addClass("top-nav-collapse");
	}else{
  		$(".navbar-fixed-top").removeClass("top-nav-collapse");
	}
});
<commit_msg>Update script.js<commit_after>function inView(elem) {
	var $elem = $(elem);
	var scrollElem = ((navigator.userAgent.toLowerCase().indexOf('webkit') != -1) ? 'body' : 'html');
	var viewportTop = $(scrollElem).scrollTop();
	var viewportBottom = viewportTop + $(window).height();
	var elemTop = Math.round( $elem.offset().top );
	var elemBottom = elemTop + $elem.height();
	return ((elemTop < viewportBottom) && (elemBottom > viewportTop));
};

// Scrolls to the selected menu item on the page
$(function() {
	$('a').click(function() {
		if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') || location.hostname == this.hostname) {
			var target = $(this.hash);
			target = target.length ? target : $('[name=' + this.hash.slice(1) + ']');
			if (target.length) {
				$('html,body').animate({
					scrollTop: target.offset().top
				}, 1000);
				return false;
			}
		}
	});
});
/* ANIMATE IN VIEW */
$(document).ready(function(){
	/* SCROLLING PAGE ANIMATIONS */
	if(inView($(".name"))){
		$('.name').addClass("fadeInDown");
	};
	$(window).scroll(function(){  
		/* CUSTOM SCROLL SPY */
		if(inView($(".home"))){
			$(".homenav").addClass("active");
			$(".aboutnav").removeClass("active");
			$(".programmingnav").removeClass("active");
			$(".interestsnav").removeClass("active");
			$(".contactnav").removeClass("active");
		};
		if(inView($(".about"))){
			$(".homenav").removeClass("active");
			$(".aboutnav").addClass("active");
			$(".programmingnav").removeClass("active");
			$(".interestsnav").removeClass("active");
			$(".contactnav").removeClass("active");
		};
		if(inView($(".icon-ruby"))){
			$(".homenav").removeClass("active");
			$(".aboutnav").removeClass("active");
			$(".programmingnav").addClass("active");
			$(".interestsnav").removeClass("active");
			$(".contactnav").removeClass("active");
		};
		if(inView($(".crossfit"))){
			$(".homenav").removeClass("active");
			$(".aboutnav").removeClass("active");
			$(".programmingnav").removeClass("active");
			$(".interestsnav").addClass("active");
			$(".contactnav").removeClass("active");
		};
		if(inView($(".footerz"))){
			$(".homenav").removeClass("active");
			$(".aboutnav").removeClass("active");			
			$(".programmingnav").removeClass("active");
			$(".interestsnav").removeClass("active");
			$(".contactnav").addClass("active");
		};
		/* Custom Animations *//*
		if(inView($(".about"))){
			$(".about1").removeClass("hidden");
			$(".about1").addClass("fadeInDown");
		};
		if(inView($(".programming"))){
			$(".programming1").removeClass("hidden");
			$(".programming1").addClass("fadeInDown");
		};
		if(inView($(".interests"))){
			$(".interests1").removeClass("hidden");
			$(".interests1").addClass("fadeInDown");
		};
		
		if(inView($(".footerz"))){
			$(".contact1").removeClass("hidden");
			$(".contact2").removeClass("hidden");
			$(".contact1").addClass("fadeInLeft");
			$(".contact2").addClass("fadeInRight");			
		};*/   
		/* BOUNCING SOCIAL BUTTONS *//*
		if(inView($(".footerz"))){
			dance();
        	}; */
	});
});

/*function dance() {
	$(".social1").delay(500).queue(function(){
		$(this).addClass("bounce");
		$(this).dequeue();
	});
	$(".social2").delay(1000).queue(function(){
		$(this).addClass("bounce");
		$(this).dequeue();
	});
	$(".social3").delay(1500).queue(function(){
		$(this).addClass("bounce");
		$(this).dequeue();
	});
}*/

/* NAVBAR HAMBURGER/X ANIMATION */
$(".navbar-toggle").on("click", function () {
	$(this).toggleClass("active");
});

/*---- NAVBAR COLLAPSE ON SCROLL ----*/
$('.navbar-collapse ul li a, .navbar-brand').click(function() {
	$('.navbar-toggle:visible').click();
});

/*---- SQUISHY NAVBAR ----*/
$(window).scroll(function(){
	if ($(".navbar").offset().top > 50) {
  		$(".navbar-fixed-top").addClass("top-nav-collapse");
	}else{
  		$(".navbar-fixed-top").removeClass("top-nav-collapse");
	}
});

{'fraction_non_alphanumeric': 0.2778065183652354, 'fraction_numerical': 0.008277289187790998, 'mean_word_length': 4.445774647887324, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '2528153', 'n_tokens_mistral': 2877, 'n_tokens_neox': 2576, 'n_words': 327}