<commit_before><html>
	<head>
	    <meta charset="utf-8">
	    <meta http-equiv="X-UA-Compatible" content="IE=edge">
	    <meta name="viewport" content="width=device-width, initial-scale=1">
	    <meta name="description" content="basic web app for my web tools">
	    <meta name="author" content="idcrosby">
		<title>Maelstrom</title>

		<!-- Bootstrap core CSS -->
    	<link href="/resources/css/bootstrap.min.css" rel="stylesheet">

    	<!-- Bootstrap theme -->
    	<link href="/resources/css/bootstrap-theme.min.css" rel="stylesheet">
	</head>

	<body onload="init()">
		<!-- Facebook SDK for login integration -->
		<script>
  			window.fbAsyncInit = function() {
    			FB.init({
     			 appId      : '1619643278302813',
      			xfbml      : true,
      			version    : 'v2.4'
    			});
  			};

  			(function(d, s, id){
     			var js, fjs = d.getElementsByTagName(s)[0];
     			if (d.getElementById(id)) {return;}
     			js = d.createElement(s); js.id = id;
     			js.src = "//connect.facebook.net/en_US/sdk.js";
     			fjs.parentNode.insertBefore(js, fjs);
   			}(document, 'script', 'facebook-jssdk'));
		</script>
		<div class="container">
			<div class="jumbotron">
				<div class="panel panel-primary" id="SendMail">
					<div class="panel-heading">
						<h3 class="panel-title">Into the Maelstrom...</h3>
					</div>
					<div class="panel-body" method="get">
						<div id="responseDiv" class="collapse">
							<h3><span id="responseStatus" onClick="hideThis(this)"></span></h3>
						</div>
						<form>
							<div class="form-group">
							<label for="passwordInput">Password</label>
							<input id="passwordInput" type="password" class="form-control" name="password">
							</div>
						</form>
						<form id="emailForm" role="from">
							<div class="form-group">
								<label for="from">From</label>
								<input id="from" type="email" class="form-control" name="from" placeholder="<EMAIL>">
							</div>
							<div class="form-group">
								<label for="to">To</label>
								<input id="to" type="email" class="form-control" name="to" placeholder="<EMAIL>">
							</div>
							<div class="form-group">
								<label for="subject">Subject</label>
								<input id="subject" type="text" name="subject" class="form-control">
							</div>
							<div id="text" class="form-group">
								<label for="emailText">Message</label>
								<textarea class="form-control" rows="10" id="emailText" name="text"></textarea>
							</div>
							<button type="button" id="sendMailBtn" class="btn btn-primary" onClick="sendMail(this.form)">Send</button>
						</form>
						<!-- Facebook Like/Share Buttons
						<div
						  class="fb-like"
						  data-share="true"
						  data-width="450"
						  data-show-faces="true">
						</div>
						-->
					</div>
				</div> <!-- /panel -->
				<div class="panel panel-primary" id="StatusPanel">
					<div class="panel-heading">
						<h3 class="panel-title">Servers Status</h3>
					</div>
					<div class="panel-body" method="get">
						<button type="button" id="getStatusBtn" class="btn btn-primary" onClick="getStatus()">Get Status</button>
						<a class="btn" role="button" data-toggle="collapse" href="#statusDiv" aria-expanded="false" aria-controls="statusDiv" onClick="hideStatus()" id="hideLink"></a>
						<!-- <button type="button" id="hideStatusBtn" class="btn" onClick="hideStatus()">Hide</button> -->
						<div id="statusDiv" class="collapse">
							<table class="table table-striped" id="statusTable">
								<thead>
									<tr>
										<th>Mail Server</th>
										<th>Available</th>
									</tr>
								</thead>
								<tbody>
								</tbody>
							</table>
						</div>
					</div>
				</div> <!-- /panel -->
			</div> <!-- /jumbotron -->
		</div> <!-- /container -->

		<script type="text/javascript">
			function init() {
				console.log("loaded");
			}

			function sendMail(form) {
				console.log("Sending mail...");

				var params = "password=" + $('#passwordInput').val();

				var data = {};
  				for (var i = 0, ii = form.length; i < ii; ++i) {
    				var input = form[i];
    				if (input.name == "to") {
    					var tos = input.value.split(",");
    					data[input.name] = tos;
    				} else if (input.name) {
      					data[input.name] = input.value;
    				}
  				}
				var jsonData = JSON.stringify(data);
				var xhr = new XMLHttpRequest();
				xhr.open("POST", "/messages/" + "?" + params, true);
				xhr.setRequestHeader('Content-Type', 'application/json; charset=UTF-8');
				xhr.send(jsonData);
				xhr.onloadend = function() {
					console.log("Done. Status: " + xhr.status);
					$('#responseDiv').collapse('show');

					var status = xhr.status;
					var responseMessage = "";
					if (status > 199 && status < 300) {
						$('#responseStatus').removeClass("label label-danger");
						$('#responseStatus').addClass("label label-success");
						$('#responseStatus').removeClass("label label-warning")
						responseMessage = "Message Sent Successfully.";
					} else if (status > 499) {
						$('#responseStatus').addClass("label label-danger");
						$('#responseStatus').removeClass("label label-success");
						$('#responseStatus').removeClass("label label-warning")
						responseMessage = "Server Error Trying to send Message. " + status + " : " + xhr.responseText;
					} else {
						$('#responseStatus').removeClass("label label-danger");
						$('#responseStatus').removeClass("label label-success");
						$('#responseStatus').addClass("label label-warning")
						responseMessage = "Error Sending Message. " + status + " : " + xhr.responseText;
					}
					$('#responseStatus').html(responseMessage);
				}
			}

			function hideThis(el) {
				console.log('hide this');
				var statusId = el.parentNode.parentNode.id;
				var toHide = document.getElementById(statusId);
				$('#' + statusId).collapse('hide');
			}

			function getStatus() {
				console.log('get status');
				$.get("/status", function(data) {
					var jsonData = JSON.parse(data);
					var rowCount = 1;
					var table = document.getElementById("statusTable");
					while (table.rows.length > 1) {

						table.deleteRow(1);
					}
					for (var key in jsonData) {<commit_msg>last fix<commit_after><html>
	<head>
	    <meta charset="utf-8">
	    <meta http-equiv="X-UA-Compatible" content="IE=edge">
	    <meta name="viewport" content="width=device-width, initial-scale=1">
	    <meta name="description" content="basic web app for my web tools">
	    <meta name="author" content="idcrosby">
		<title>Maelstrom</title>

		<!-- Bootstrap core CSS -->
    	<link href="/resources/css/bootstrap.min.css" rel="stylesheet">

    	<!-- Bootstrap theme -->
    	<link href="/resources/css/bootstrap-theme.min.css" rel="stylesheet">
	</head>

	<body onload="init()">
		<!-- Facebook SDK for login integration -->
		<script>
  			window.fbAsyncInit = function() {
    			FB.init({
     			 appId      : '1619643278302813',
      			xfbml      : true,
      			version    : 'v2.4'
    			});
  			};

  			(function(d, s, id){
     			var js, fjs = d.getElementsByTagName(s)[0];
     			if (d.getElementById(id)) {return;}
     			js = d.createElement(s); js.id = id;
     			js.src = "//connect.facebook.net/en_US/sdk.js";
     			fjs.parentNode.insertBefore(js, fjs);
   			}(document, 'script', 'facebook-jssdk'));
		</script>
		<div class="container">
			<div class="jumbotron">
				<div class="panel panel-primary" id="SendMail">
					<div class="panel-heading">
						<h3 class="panel-title">Into the Maelstrom...</h3>
					</div>
					<div class="panel-body" method="get">
						<div id="responseDiv" class="collapse">
							<h3><span id="responseStatus" onClick="hideThis(this)"></span></h3>
						</div>
						<form>
							<div class="form-group">
							<label for="passwordInput">Password</label>
							<input id="passwordInput" type="password" class="form-control" name="password">
							</div>
						</form>
						<form id="emailForm" role="from">
							<div class="form-group">
								<label for="from">From</label>
								<input id="from" type="email" class="form-control" name="from" placeholder="<EMAIL>">
							</div>
							<div class="form-group">
								<label for="to">To</label>
								<input id="to" type="email" class="form-control" name="to" placeholder="<EMAIL>">
							</div>
							<div class="form-group">
								<label for="subject">Subject</label>
								<input id="subject" type="text" name="subject" class="form-control">
							</div>
							<div id="text" class="form-group">
								<label for="emailText">Message</label>
								<textarea class="form-control" rows="10" id="emailText" name="text"></textarea>
							</div>
							<button type="button" id="sendMailBtn" class="btn btn-primary" onClick="sendMail(this.form)">Send</button>
						</form>
						<!-- Facebook Like/Share Buttons
						<div
						  class="fb-like"
						  data-share="true"
						  data-width="450"
						  data-show-faces="true">
						</div>
						-->
					</div>
				</div> <!-- /panel -->
				<div class="panel panel-primary" id="StatusPanel">
					<div class="panel-heading">
						<h3 class="panel-title">Servers Status</h3>
					</div>
					<div class="panel-body" method="get">
						<button type="button" id="getStatusBtn" class="btn btn-primary" onClick="getStatus()">Get Status</button>
						<a class="btn" role="button" data-toggle="collapse" href="#statusDiv" aria-expanded="false" aria-controls="statusDiv" onClick="hideStatus()" id="hideLink"></a>
						<!-- <button type="button" id="hideStatusBtn" class="btn" onClick="hideStatus()">Hide</button> -->
						<div id="statusDiv" class="collapse">
							<table class="table table-striped" id="statusTable">
								<thead>
									<tr>
										<th>Mail Server</th>
										<th>Available</th>
									</tr>
								</thead>
								<tbody>
								</tbody>
							</table>
						</div>
					</div>
				</div> <!-- /panel -->
			</div> <!-- /jumbotron -->
		</div> <!-- /container -->

		<script type="text/javascript">
			function init() {
				console.log("loaded");
			}

			function sendMail(form) {
				console.log("Sending mail...");

				var params = "password=" + $('#passwordInput').val();

				var data = {};
  				for (var i = 0, ii = form.length; i < ii; ++i) {
    				var input = form[i];
    				if (input.name == "to") {
    					var tos = input.value.split(",");
    					data[input.name] = tos;
    				} else if (input.name) {
      					data[input.name] = input.value;
    				}
  				}
				var jsonData = JSON.stringify(data);
				var xhr = new XMLHttpRequest();
				xhr.open("POST", "/messages/" + "?" + params, true);
				xhr.setRequestHeader('Content-Type', 'application/json; charset=UTF-8');
				xhr.send(jsonData);
				xhr.onloadend = function() {
					console.log("Done. Status: " + xhr.status);
					$('#responseDiv').collapse('show');

					var status = xhr.status;
					var responseMessage = "";
					if (status > 199 && status < 300) {
						$('#responseStatus').removeClass("label label-danger");
						$('#responseStatus').removeClass("label label-warning");
						$('#responseStatus').addClass("label label-success");
						responseMessage = "Message Sent Successfully.";
					} else if (status > 499) {
						$('#responseStatus').removeClass("label label-success");
						$('#responseStatus').removeClass("label label-warning");
						$('#responseStatus').addClass("label label-danger");
						responseMessage = "Server Error Trying to send Message. " + status + " : " + xhr.responseText;
					} else {
						$('#responseStatus').removeClass("label label-danger");
						$('#responseStatus').removeClass("label label-success");
						$('#responseStatus').addClass("label label-warning");
						responseMessage = "Error Sending Message. " + status + " : " + xhr.responseText;
					}
					$('#responseStatus').html(responseMessage);
				}
			}

			function hideThis(el) {
				console.log('hide this');
				var statusId = el.parentNode.parentNode.id;
				var toHide = document.getElementById(statusId);
				$('#' + statusId).collapse('hide');
			}

			function getStatus() {
				console.log('get status');
				$.get("/status", function(data) {
					var jsonData = JSON.parse(data);
					var rowCount = 1;
					var table = document.getElementById("statusTable");
					while (table.rows.length > 1) {

						table.deleteRow(1);
					}
					for (var key in jsonData) {
{'fraction_non_alphanumeric': 0.18819455628925752, 'fraction_numerical': 0.00740860041874698, 'mean_word_length': 2.758777239709443, 'pattern_counts': {'":': 0, '<': 221, '<?xml version=': 0, '>': 223, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7117758', 'n_tokens_mistral': 5190, 'n_tokens_neox': 3903, 'n_words': 771}