<commit_before><!doctype html>
<html>
	<head>
		<title>Pyth Compiler/Executor</title>
		<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css">
		<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
		<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"></script>
		<link rel="shortcut icon" href="/favicon2.ico">
		<style type="text/css">
			.bottom-row {
				float: right;
			}
			#code {
				margin-bottom: 25px;
				margin-top: 15px;
			}
			#input {
				margin-bottom: 5px;
			}
			pre.scroll {
				max-height: 20%;
				overflow: auto;
			}
			#table-container {
				overflow: auto;
			}
			.full {
				width: 100%;
			}
			.Char {
				width: 15%;
			}
			.Arity {
				width: 10%;
			}
			.Starts {
				width: 10%;
			}
			.Mnemonic {
				width: 25%;
			}
			.Details {
				width: 40%;
				overflow: auto;
			}
			.search-bar {
				margin-top: 25px;
				margin-bottom: 15px;
				padding-left: 0px;
				margin-left: 0px;
			}
			#search-type-menu a {
				cursor: pointer;
			}
			#output-container {
				display: none;
			}
			#output {
				max-height: 200px;
				overflow: auto;
			}
			#code, #input, #output {
				font-family: monospace;
			}
		</style>
	</head>
	<body>
		<div class="container">
			<h3><a href="https://github.com/isaacg1/pyth">Pyth</a> Compiler/Executor</h3>
			<br>
			<div class="row">
				<div class="col-md-5">
					<div id="output-container">
						Output:
						<pre class="scroll" id="output"></pre>
					</div>
					<button id="run-button" class="btn btn-primary">Run Program! (Ctrl-Enter)</button>
					<textarea id="code" placeholder="Code" class="form-control" rows="7">{{ code }}</textarea>
					<textarea id="input" placeholder="Input" class="form-control" rows="7">{{ input }}</textarea>
					<br>
					<div class='bottom-row'>
						Debug on?: <input id="debug" type="checkbox" {% if debug %} checked {% endif %}>
					</div><br><br>
					<div class='bottom-row'>
						<button class='btn btn-primary' onclick='permalink()'>Permalink</button>
					</div>
					<br>
					<p>Code length: <span id="length">0</span></p>
					<p>Compiler last updated: {{formatted_time}} UTC</p>
				</div>

				<div class="col-md-1"></div>

				<div class="col-md-6 docs">
					<h4>Pyth Character Reference</h4>
					<div class="search-bar input-group">
						<input id="query" class="form-control" placeholder="Search">
						<div class="input-group-btn">
							<button type="button" class="btn btn-default dropwdown-toggle" data-toggle="dropdown" aria-expanded="false">
								<span id="search-type-name"></span> <span class="caret"></span>
							</button>
							<ul id="search-type-menu" class="dropdown-menu dropdown-menu-right" role="menu"></ul>
						</div>
					</div>
					<div id="table-container">
						<table id="docs-table" class="scroll full table table-hover table-condensed"></table>
					</div>
				</div>

			</div>
		</div>
		<script>
			function permalink() {
				params={code: $('#code').val()}
				if ($('#input').val()) params.input=$('#input').val()
				if (!$('#debug').is(':checked')) params.debug=0
				document.location="?"+$.param(params)
			}

			function submit_code() {
				$.post('/submit', {
					code: $('#code').val(),
					input: $('#input').val(),
					debug: $('#debug').is(':checked')? 1 : 0
					},
					function(data) {
						$('#output').text(data);
						$('#output-container').show()
				});
			}
			$(function() {
				$('#run-button').click(submit_code);
<commit_msg>Fixed permalink debug interaction.<commit_after><!doctype html>
<html>
	<head>
		<title>Pyth Compiler/Executor</title>
		<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css">
		<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
		<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"></script>
		<link rel="shortcut icon" href="/favicon2.ico">
		<style type="text/css">
			.bottom-row {
				float: right;
			}
			#code {
				margin-bottom: 25px;
				margin-top: 15px;
			}
			#input {
				margin-bottom: 5px;
			}
			pre.scroll {
				max-height: 20%;
				overflow: auto;
			}
			#table-container {
				overflow: auto;
			}
			.full {
				width: 100%;
			}
			.Char {
				width: 15%;
			}
			.Arity {
				width: 10%;
			}
			.Starts {
				width: 10%;
			}
			.Mnemonic {
				width: 25%;
			}
			.Details {
				width: 40%;
				overflow: auto;
			}
			.search-bar {
				margin-top: 25px;
				margin-bottom: 15px;
				padding-left: 0px;
				margin-left: 0px;
			}
			#search-type-menu a {
				cursor: pointer;
			}
			#output-container {
				display: none;
			}
			#output {
				max-height: 200px;
				overflow: auto;
			}
			#code, #input, #output {
				font-family: monospace;
			}
		</style>
	</head>
	<body>
		<div class="container">
			<h3><a href="https://github.com/isaacg1/pyth">Pyth</a> Compiler/Executor</h3>
			<br>
			<div class="row">
				<div class="col-md-5">
					<div id="output-container">
						Output:
						<pre class="scroll" id="output"></pre>
					</div>
					<button id="run-button" class="btn btn-primary">Run Program! (Ctrl-Enter)</button>
					<textarea id="code" placeholder="Code" class="form-control" rows="7">{{ code }}</textarea>
					<textarea id="input" placeholder="Input" class="form-control" rows="7">{{ input }}</textarea>
					<br>
					<div class='bottom-row'>
						Debug on?: <input id="debug" type="checkbox" {% if debug %} checked {% endif %}>
					</div><br><br>
					<div class='bottom-row'>
						<button class='btn btn-primary' onclick='permalink()'>Permalink</button>
					</div>
					<br>
					<p>Code length: <span id="length">0</span></p>
					<p>Compiler last updated: {{formatted_time}} UTC</p>
				</div>

				<div class="col-md-1"></div>

				<div class="col-md-6 docs">
					<h4>Pyth Character Reference</h4>
					<div class="search-bar input-group">
						<input id="query" class="form-control" placeholder="Search">
						<div class="input-group-btn">
							<button type="button" class="btn btn-default dropwdown-toggle" data-toggle="dropdown" aria-expanded="false">
								<span id="search-type-name"></span> <span class="caret"></span>
							</button>
							<ul id="search-type-menu" class="dropdown-menu dropdown-menu-right" role="menu"></ul>
						</div>
					</div>
					<div id="table-container">
						<table id="docs-table" class="scroll full table table-hover table-condensed"></table>
					</div>
				</div>

			</div>
		</div>
		<script>
			function permalink() {
				params={code: $('#code').val()}
				if ($('#input').val()) params.input=$('#input').val()
				if (!$('#debug').is(':checked')) params.debug=0
				if ($('#debug').is(':checked')) params.debug=1
				document.location="?"+$.param(params)
			}

			function submit_code() {
				$.post('/submit', {
					code: $('#code').val(),
					input: $('#input').val(),
					debug: $('#debug').is(':checked')? 1 : 0
					},
					function(data) {
						$('#output').text(data);
						$('#output-container').show()
				});
			}
			$(function() {
				$('#run-button').click(submit_code);

{'fraction_non_alphanumeric': 0.20772879464285715, 'fraction_numerical': 0.014927455357142858, 'mean_word_length': 2.829594017094017, 'pattern_counts': {'":': 0, '<': 157, '<?xml version=': 0, '>': 157, 'https://': 8, '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': '7334746', 'n_tokens_mistral': 3346, 'n_tokens_neox': 2514, 'n_words': 470}