<commit_before><?php

// toolserver.org/~mazder/replicate-sequences/?2010-01-01T10:00:00Z
if(isset($_SERVER["QUERY_STRING"]) && preg_match('/([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})/', $_SERVER["QUERY_STRING"], $match))
{
	$original = array_shift($match);
	$timestamp = vsprintf('%04u-%02u-%02u %02u:%02u:%02u', $match);
}
elseif(isset($_REQUEST['Y']) && isset($_REQUEST['m']) && isset($_REQUEST['d']) && isset($_REQUEST['H']) && isset($_REQUEST['i']) && isset($_REQUEST['s']))
{
	$timestamp = sprintf('%04u-%02u-%02u %02u:%02u:%02u', $_REQUEST['Y'], $_REQUEST['m'], $_REQUEST['d'], $_REQUEST['H'], $_REQUEST['i'], $_REQUEST['s']);
}
else
{
header('Content-Type: text/html; encoding=utf-8');
echo '<?xml version="1.0" encoding="utf-8" ?>';
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
	"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de">
	<head>
		<title>replicate-sequences</title>
		
		<style type="text/css">
		form label { width: 80px; display: block; float: left; }
		form input { display: block; }
		form input[type=radio] { float: left; }
		</style>
	</head>
	<body>
		<h1>replicate-sequences</h1>
		
		<form action="#"><div>
			<fieldset>
				<legend>Timestamp</legend>
				
				<label for="Y">Year: </label>
				<input type="text" id="Y" name="Y" value="<?=date('Y')?>" size="2" />
				
				<label for="Y">Month: </label>
				<input type="text" id="m" name="m" value="<?=date('m')?>" size="2" />
				
				<label for="Y">Day: </label>
				<input type="text" id="d" name="d" value="<?=date('d')-1?>" size="2" />
				
				<label for="Y">Hour: </label>
				<input type="text" id="H" name="H" value="08" size="2" />
				
				<label for="Y">Minute: </label>
				<input type="text" id="i" name="i" value="00" size="2" />
				
				<label for="Y">Second: </label>
				<input type="text" id="s" name="s" value="00" size="2" />
			</fieldset>
			
			<fieldset>
				<legend>Stream</legend>
				<input type="radio" id="stream-minute" name="stream" value="minute" checked />
				<label for="stream-minute">Minutely</label><commit_msg>use current date, not yesterday 8oo<commit_after><?php

// toolserver.org/~mazder/replicate-sequences/?2010-01-01T10:00:00Z
if(isset($_SERVER["QUERY_STRING"]) && preg_match('/([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})/', $_SERVER["QUERY_STRING"], $match))
{
	$original = array_shift($match);
	$timestamp = vsprintf('%04u-%02u-%02u %02u:%02u:%02u', $match);
}
elseif(isset($_REQUEST['Y']) && isset($_REQUEST['m']) && isset($_REQUEST['d']) && isset($_REQUEST['H']) && isset($_REQUEST['i']) && isset($_REQUEST['s']))
{
	$timestamp = sprintf('%04u-%02u-%02u %02u:%02u:%02u', $_REQUEST['Y'], $_REQUEST['m'], $_REQUEST['d'], $_REQUEST['H'], $_REQUEST['i'], $_REQUEST['s']);
}
else
{
header('Content-Type: text/html; encoding=utf-8');
echo '<?xml version="1.0" encoding="utf-8" ?>';
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
	"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de">
	<head>
		<title>replicate-sequences</title>
		
		<style type="text/css">
		form label { width: 80px; display: block; float: left; }
		form input { display: block; }
		form input[type=radio] { float: left; }
		</style>
	</head>
	<body>
		<h1>replicate-sequences</h1>
		
		<form action="#"><div>
			<fieldset>
				<legend>Timestamp</legend>
				
				<label for="Y">Year: </label>
				<input type="text" id="Y" name="Y" value="<?=date('Y')?>" size="2" />
				
				<label for="Y">Month: </label>
				<input type="text" id="m" name="m" value="<?=date('m')?>" size="2" />
				
				<label for="Y">Day: </label>
				<input type="text" id="d" name="d" value="<?=date('d')?>" size="2" />
				
				<label for="Y">Hour: </label>
				<input type="text" id="H" name="H" value="<?=date('H')?>" size="2" />
				
				<label for="Y">Minute: </label>
				<input type="text" id="i" name="i" value="<?=date('i')?>" size="2" />
				
				<label for="Y">Second: </label>
				<input type="text" id="s" name="s" value="<?=date('s')?>" size="2" />
			</fieldset>
			
			<fieldset>
				<legend>Stream</legend>
				<input type="radio" id="stream-minute" name="stream" value="minute" checked />
				<label for="stream-minute">Minutely</label>
{'fraction_non_alphanumeric': 0.2776223776223776, 'fraction_numerical': 0.04055944055944056, 'mean_word_length': 4.565499351491569, 'pattern_counts': {'":': 0, '<': 98, '<?xml version=': 2, '>': 98, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 6}, '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': '1582248', 'n_tokens_mistral': 1938, 'n_tokens_neox': 1674, 'n_words': 280}