<commit_before><?php
require_once("ganon/ganon.php");

foreach (array('url', 'entry') as $required) {
  if (!isset($_GET[$required])) {
    header('Location: README.md');
    exit();
  }
}
$http_opts = array();
if (isset($_GET['user_agent'])) $http_opts['user_agent'] = $_GET['user_agent'];
$context = stream_context_create(array('http' => $http_opts));
$h = file_get_dom($_GET['url'], true, false, $context);

function authority($url_components) {
    $port = isset($url_components['port']) ? ":".$url_components['port'] : "";
    $pwd = isset($url_components['pass']) ? ":".$url_components['pass'] : "";
    $login = isset($url_components['user']) ? $url_components['user'].$pwd."@" : "";
    return $login.$url_components['host'].$port;
}
function absolute($relative_url) {
    if (empty($relative_url)) return "";
    $r = parse_url($_GET['url']);
    $u = parse_url($relative_url);<commit_msg>Fix README redirect Content-Type<commit_after><?php
require_once("ganon/ganon.php");

foreach (array('url', 'entry') as $required) {
  if (!isset($_GET[$required])) {
    header('Content-Type: text/markdown; charset=UTF-8; variant=GFM');
    header('Location: README.md');
    exit();
  }
}
$http_opts = array();
if (isset($_GET['user_agent'])) $http_opts['user_agent'] = $_GET['user_agent'];
$context = stream_context_create(array('http' => $http_opts));
$h = file_get_dom($_GET['url'], true, false, $context);

function authority($url_components) {
    $port = isset($url_components['port']) ? ":".$url_components['port'] : "";
    $pwd = isset($url_components['pass']) ? ":".$url_components['pass'] : "";
    $login = isset($url_components['user']) ? $url_components['user'].$pwd."@" : "";
    return $login.$url_components['host'].$port;
}
function absolute($relative_url) {
    if (empty($relative_url)) return "";
    $r = parse_url($_GET['url']);
    $u = parse_url($relative_url);
{'fraction_non_alphanumeric': 0.23117709437963946, 'fraction_numerical': 0.0005302226935312832, 'mean_word_length': 6.093984962406015, 'pattern_counts': {'":': 4, '<': 5, '<?xml version=': 0, '>': 5, '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': '4242985', 'n_tokens_mistral': 632, 'n_tokens_neox': 635, 'n_words': 102}