<commit_before><?php
// Google Analytics DomainHash Generator
// <NAME> ( @thyng )
// Based on original Urchin's domain hash generation routine
// 2k14

function utf8_char_code_at($str, $index) {
    $char = mb_substr($str, $index, 1, 'UTF-8');

    if (mb_check_encoding($char, 'UTF-8')) {
        $ret = mb_convert_encoding($char, 'UTF-32BE', 'UTF-8');
        return hexdec(bin2hex($ret));
    } else {
        return null;
    }
}<commit_msg>License<commit_after><?php
/**
* ga_domain_hash.php v1.0.0 - 2014-01-07
* https://github.com/thyngster/ga_domain_hash.php
* (c) 2014 <NAME> ( @thyng )
* license: www.opensource.org/licenses/mit-license.php
*
* Based on original Urchin's domain hash generation routine
*
*/

function utf8_char_code_at($str, $index) {
    $char = mb_substr($str, $index, 1, 'UTF-8');

    if (mb_check_encoding($char, 'UTF-8')) {
        $ret = mb_convert_encoding($char, 'UTF-32BE', 'UTF-8');
        return hexdec(bin2hex($ret));
    } else {
        return null;
    }
}
{'fraction_non_alphanumeric': 0.17182817182817184, 'fraction_numerical': 0.03396603396603397, 'mean_word_length': 3.3947368421052633, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, 'https://': 1, 'lorem ipsum': 0, 'www.': 1, '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': '7204136', 'n_tokens_mistral': 386, 'n_tokens_neox': 362, 'n_words': 75}