<commit_before>
(function(){
	function AutoEmbed() {
	}

	AutoEmbed.prototype.extractFromURL = function( str ) {
		var ret = {};

		// Query String and URL
		ret.query = '';
		ret.args = {};
		if ( str.indexOf('?') !== -1 ) {
			var url_split = str.split('?');
			ret.url = url_split[0];

			ret.query = url_split[1];
			var query_string_raw_args = ret.query.split('&');

			query_string_raw_args.forEach(function(val,idx,arr) {
				var part = val.split('=');
					if ( part.length > 1 )
						ret.args[part[0]] = part[1];
					else
						ret.args[part[0]] = true;
				});
		}
		else {
			ret.url = str;
		}

        // if its not already an external link with a protocol and it has a dot in it
        // then make it an extrenal link becuase not internal links have dots
        if ( ret.url.indexOf('//') == -1 && ret.url.indexOf('.') != -1 /*&&
            (ret.url.indexOf('/') == -1 || ret.url.indexOf('.') < ret.url.indexOf('/')) */) {
            ret.url = 'https://' + ret.url;
        }

		// If it has a '//', it has a protocol and a domain
		if ( ret.url.indexOf('//') !== -1 ) {
			var url_body = ret.url.split('//');
			ret.protocol = url_body[0].slice(0,-1).toLowerCase();

			ret.parts = url_body[1].split('/');
			ret.domain = ret.parts.shift().toLowerCase();
		}
		else {
			ret.parts = ret.url.split('/');
            ret.domain = ret.parts.shift().toLowerCase();
		}

		ret.path = ret.parts.length ? '/'+ret.parts.join('/') : '';

		return ret;
	}

	AutoEmbed.prototype.makeYouTube = function( video_id ) {
		return '<div class="embed-video"><div><iframe '+
			'src="https://www.youtube.com/embed/'+
			video_id+
			'?rel=0" frameborder="0" allowfullscreen></iframe></div></div>';
	}

	AutoEmbed.prototype.makeSVGIcon = function( name, args ) {
		var svg_class = "svg-icon icon-"+name;
		if ( args ) {
			if ( args['class'] ) {
				svg_class += ' '+args['class'];
			}
		}
		return '<svg class="'+svg_class+'"><use xlink:href="#icon-'+name+'"></use></svg>';<commit_msg>Changed local links with # to redirect to anchor<commit_after>
(function(){
	function AutoEmbed() {
	}

	AutoEmbed.prototype.extractFromURL = function( str ) {
		var ret = {};

		// Query String and URL
		ret.query = '';
		ret.args = {};
		if ( str.indexOf('?') !== -1 ) {
			var url_split = str.split('?');
			ret.url = url_split[0];

			ret.query = url_split[1];
			var query_string_raw_args = ret.query.split('&');

			query_string_raw_args.forEach(function(val,idx,arr) {
				var part = val.split('=');
					if ( part.length > 1 )
						ret.args[part[0]] = part[1];
					else
						ret.args[part[0]] = true;
				});
		}
		else {
			ret.url = str;
		}

    // if its not already an external link with a protocol and it has a dot in it
    // then make it an extrenal link becuase not internal links have dots
    if ( ret.url.indexOf('//') == -1 && ret.url.indexOf('.') != -1 /*&&
        (ret.url.indexOf('/') == -1 || ret.url.indexOf('.') < ret.url.indexOf('/')) */) {
        ret.url = 'https://' + ret.url;
    }

    if ( ret.url.indexOf('#') != -1 && ret.url.indexOf('#/') == -1 && ret.url.indexOf('//') == -1) {
        ret.url = ret.url.replace("#", "#/");
    }

		// If it has a '//', it has a protocol and a domain
		if ( ret.url.indexOf('//') !== -1 ) {
			var url_body = ret.url.split('//');
			ret.protocol = url_body[0].slice(0,-1).toLowerCase();

			ret.parts = url_body[1].split('/');
			ret.domain = ret.parts.shift().toLowerCase();
		}
		else {
			ret.parts = ret.url.split('/');
      ret.domain = ret.parts.shift().toLowerCase();
		}

		ret.path = ret.parts.length ? '/'+ret.parts.join('/') : '';

		return ret;
	}

	AutoEmbed.prototype.makeYouTube = function( video_id ) {
		return '<div class="embed-video"><div><iframe '+
			'src="https://www.youtube.com/embed/'+
			video_id+
			'?rel=0" frameborder="0" allowfullscreen></iframe></div></div>';
	}

	AutoEmbed.prototype.makeSVGIcon = function( name, args ) {
		var svg_class = "svg-icon icon-"+name;
		if ( args ) {
			if ( args['class'] ) {
				svg_class += ' '+args['class'];
			}
		}
		return '<svg class="'+svg_class+'"><use xlink:href="#icon-'+name+'"></use></svg>';
{'fraction_non_alphanumeric': 0.21706550640560793, 'fraction_numerical': 0.008943678994440415, 'mean_word_length': 2.691347011596789, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 25, 'https://': 4, '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': '3611638', 'n_tokens_mistral': 1657, 'n_tokens_neox': 1473, 'n_words': 307}