<commit_before><?php
/**
 * Proxy data to Splunk HEC
 */

// The next constants should be replaced by your Splunk HEC properties
define('HEC', 'https://localhost:8088/services/collector/event'); 
define('TOKEN', '<PASSWORD>');

$data = file_get_contents('php://input');

// post data to Splunk HEC
$ch = curl_init(HEC);
curl_setopt_array($ch, array(
    CURLOPT_POST => 1,
    CURLOPT_HTTPHEADER  => array('Authorization: Splunk ' . TOKEN),
    CURLOPT_RETURNTRANSFER  => true,
    CURLOPT_POSTFIELDS => $data,
    CURLOPT_VERBOSE => 1,
    CURLOPT_SSL_VERIFYPEER => 0,
    CURLOPT_SSL_VERIFYHOST => 0
));
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?><commit_msg>Update dejavu.php<commit_after><?php
/**
 * Proxy data to Splunk HEC
 */

// The next constants should be replaced by your Splunk HEC properties. 
// See http://docs.splunk.com/Documentation/Splunk/latest/Data/UsetheHTTPEventCollector for details.
define('HEC', 'https://localhost:8088/services/collector/event'); 
define('TOKEN', '<PASSWORD>');

$data = file_get_contents('php://input');

// post data to Splunk HEC
$ch = curl_init(HEC);
curl_setopt_array($ch, array(
    CURLOPT_POST => 1,
    CURLOPT_HTTPHEADER  => array('Authorization: Splunk ' . TOKEN),
    CURLOPT_RETURNTRANSFER  => true,
    CURLOPT_POSTFIELDS => $data,
    CURLOPT_VERBOSE => 1,
    CURLOPT_SSL_VERIFYPEER => 0,
    CURLOPT_SSL_VERIFYHOST => 0
));
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>
{'fraction_non_alphanumeric': 0.1504424778761062, 'fraction_numerical': 0.010891763104152484, 'mean_word_length': 4.568181818181818, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 21, 'https://': 2, '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': '5777012', 'n_tokens_mistral': 569, 'n_tokens_neox': 535, 'n_words': 111}