<commit_before><?php
//
// Function returns a mysql connection
//
function dbConnect() {
  $c =  mysqli_connect('localhost', 'reportuser', 'password', '<PASSWORD>');
  return $c;
}


//
// Function allows user to perform an INSERT
//
function manualReport($hostname, $status, $timestamp) {
  $sqlconn = dbConnect();
  $sql = "INSERT INTO reports (hostname,status,timestamp) VALUES ($hostname,$status,$timestamp)";

  // Execute query and then close connection
  $result = mysqli_query($sqlconn,$sql);
  $sqlconn->close();
}




//
// Function returns true if sql is valid
//
//function checkSql($sql) {
//  $sqlconn = dbConnect();
//
  // Execute query
//  $result = mysqli_query($sqlconn,$sql);
//  $sqlconn->close();
//<commit_msg>add timezone<commit_after><?php
//
// Function returns a mysql connection
//
function dbConnect() {
  $c =  mysqli_connect('localhost', 'reportuser', 'password', '<PASSWORD>');
  date_default_timezone_set('America/Detroit');
  return $c;
}


//
// Function allows user to perform an INSERT
//
function manualReport($hostname, $status, $timestamp) {
  $sqlconn = dbConnect();
  $sql = "INSERT INTO reports (hostname,status,timestamp) VALUES ($hostname,$status,$timestamp)";

  // Execute query and then close connection
  $result = mysqli_query($sqlconn,$sql);
  $sqlconn->close();
}




//
// Function returns true if sql is valid
//
//function checkSql($sql) {
//  $sqlconn = dbConnect();
//
  // Execute query
//  $result = mysqli_query($sqlconn,$sql);
//  $sqlconn->close();
//
{'fraction_non_alphanumeric': 0.17580964970257765, 'fraction_numerical': 0.0, 'mean_word_length': 3.9802631578947367, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, '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': '4201519', 'n_tokens_mistral': 491, 'n_tokens_neox': 476, 'n_words': 122}