<commit_before><!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Complex Curves</title>
<link rel="shortcut icon" href="favicon.ico" />
<script type="text/javascript" src="lib/jquery/jquery.min.js"></script>
<link rel="stylesheet" type="text/css" href="lib/semantic-ui/semantic.min.css" />
<script type="text/javascript" src="lib/semantic-ui/semantic.min.js"></script>
<script type="text/javascript" src="build/ComplexCurves.js"></script>
<style type="text/css">
.ui.cards.results {
	border: none;
	border-radius: unset;
	box-shadow: unset;
	display: flex;
}
.ui.cards.results > .card {
	display: flex;
	padding: 0;
}
.ui.cards.results > .card > .content{
	margin: 0 !important;
}
.ui.cards.results > .card > .image{
	width: unset;
	height: unset;
}
.ui.embed[class*="1:1"] {
    position: relative;
    background-color: #002b36 !important;
    margin: 0;
    width: 100%;
    height: 0;
    padding-bottom: 100%;
}
canvas {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
}
</style>
<script type="text/javascript">
document.addEventListener("DOMContentLoaded", function() {
    var allowHiddenResults = false;
    var canvas = document.querySelector("canvas");
	var examples;
    var req = new XMLHttpRequest();
    req.open("GET", "examples.json");
    req.responseType = "json";
    req.onload = function() {
        examples = req.response;
		$('.ui.search').search({
            duration: 0,
            transition: false,
			maxResults: 50,
			minCharacters: 0,
			searchFields: ['title'],
			searchFullText: true,
			source: examples,
            onResultsOpen: function () {
                $('#ComplexCurves').hide();
                allowHiddenResults = false;
            },
			onResultsClose: function () {
                if(!allowHiddenResults)
                    $('.ui.search').search('show results');
			},
            onSelect: function (example) {
                if(canvas.singularityExplorer)
                    canvas.singularityExplorer.unregisterEventHandlers();
                var piOver180 = Math.PI / 180;
                var lat = 75 * piOver180;
                var lon = 30 * piOver180;
                if(example.cached) {
                    canvas.singularityExplorer =
                        ComplexCurves.fromFile(canvas,
                            'http://complexcurves.org/models/' + example.id +
                            '.bin', lat, lon);
                } else {
                    canvas.singularityExplorer =
                        ComplexCurves.fromEquation(canvas,
                            example.equation ||
                            $('.ui.search').search('get value'),
                            example.depth || 12, lat, lon);
                }
                $('#ComplexCurves').show();
				allowHiddenResults = true;
            },
            templates: {
				message: function(message, type) {
					var
						html = ''
					;
                    var value = $('.ui.search').search('get value');
                    try {
                        PolynomialParser.parse(value);
                        html = $('.ui.search').search('generate results', {
                            "results": [{
                                "id": "Custom",
                                "cached": false,
                                "title": "Custom equation",
                                "equation": value,
                                "description": value
                            }]
                        });
                        $('.ui.search').search('add results', html);
                        return;<commit_msg>Rename singularityExplorer to complexCurves in index.html<commit_after><!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Complex Curves</title>
<link rel="shortcut icon" href="favicon.ico" />
<script type="text/javascript" src="lib/jquery/jquery.min.js"></script>
<link rel="stylesheet" type="text/css" href="lib/semantic-ui/semantic.min.css" />
<script type="text/javascript" src="lib/semantic-ui/semantic.min.js"></script>
<script type="text/javascript" src="build/ComplexCurves.js"></script>
<style type="text/css">
.ui.cards.results {
	border: none;
	border-radius: unset;
	box-shadow: unset;
	display: flex;
}
.ui.cards.results > .card {
	display: flex;
	padding: 0;
}
.ui.cards.results > .card > .content{
	margin: 0 !important;
}
.ui.cards.results > .card > .image{
	width: unset;
	height: unset;
}
.ui.embed[class*="1:1"] {
    position: relative;
    background-color: #002b36 !important;
    margin: 0;
    width: 100%;
    height: 0;
    padding-bottom: 100%;
}
canvas {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
}
</style>
<script type="text/javascript">
document.addEventListener("DOMContentLoaded", function() {
    var allowHiddenResults = false;
    var canvas = document.querySelector("canvas");
	var examples;
    var req = new XMLHttpRequest();
    req.open("GET", "examples.json");
    req.responseType = "json";
    req.onload = function() {
        examples = req.response;
		$('.ui.search').search({
            duration: 0,
            transition: false,
			maxResults: 50,
			minCharacters: 0,
			searchFields: ['title'],
			searchFullText: true,
			source: examples,
            onResultsOpen: function () {
                $('#ComplexCurves').hide();
                allowHiddenResults = false;
            },
			onResultsClose: function () {
                if(!allowHiddenResults)
                    $('.ui.search').search('show results');
			},
            onSelect: function (example) {
                if(canvas.complexCurves)
                    canvas.complexCurves.unregisterEventHandlers();
                var piOver180 = Math.PI / 180;
                var lat = 75 * piOver180;
                var lon = 30 * piOver180;
                if(example.cached) {
                    canvas.complexCurves =
                        ComplexCurves.fromFile(canvas,
                            'http://complexcurves.org/models/' + example.id +
                            '.bin', lat, lon);
                } else {
                    canvas.complexCurves = ComplexCurves.fromEquation(canvas,
                        example.equation ||
                        $('.ui.search').search('get value'),
                        example.depth || 12, lat, lon);
                }
                $('#ComplexCurves').show();
				allowHiddenResults = true;
            },
            templates: {
				message: function(message, type) {
					var
						html = ''
					;
                    var value = $('.ui.search').search('get value');
                    try {
                        PolynomialParser.parse(value);
                        html = $('.ui.search').search('generate results', {
                            "results": [{
                                "id": "Custom",
                                "cached": false,
                                "title": "Custom equation",
                                "equation": value,
                                "description": value
                            }]
                        });
                        $('.ui.search').search('add results', html);
                        return;
{'fraction_non_alphanumeric': 0.13898817706901292, 'fraction_numerical': 0.013197690404179268, 'mean_word_length': 1.6235124413992066, 'pattern_counts': {'":': 12, '<': 37, '<?xml version=': 0, '>': 47, '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': '4345669', 'n_tokens_mistral': 2154, 'n_tokens_neox': 1932, 'n_words': 402}