<commit_before><?php

$db_username  = "root"; // necessario per creare utente "portale"
$db_password  = "";
$db_name      = "portale";

$connection = mysqli_connect("localhost", $db_username, $db_password);

if (mysqli_connect_errno($connection))
  echo "Errore nella connessione a MySQL: " . mysqli_connect_error();
else
  mysqli_query($connection, "set names utf8");

$query = sprintf("CREATE DATABASE IF NOT EXISTS %s", $db_name);
execute($query);

function execute($query)
{
  global $connection;

  $result = mysqli_query($connection, $query);

  if (!$result)
    die("Errore nella query: " . $query);
}

?>
<commit_msg>Updated installer.php<commit_after><?php

$db_username  = "root"; // necessario per creare utente "portale"
$db_password  = "";
$db_name      = "portale";

$connection = mysqli_connect("localhost", $db_username, $db_password);

if (mysqli_connect_errno($connection))
  echo "Errore nella connessione a MySQL: " . mysqli_connect_error();
else
  mysqli_query($connection, "set names utf8");

$query = sprintf("CREATE DATABASE IF NOT EXISTS %s", $db_name);
execute($query);

$query = sprintf("GRANT ALL PRIVILEGES ON %s.* To 'portale'@'localhost' IDENTIFIED BY 'fragole'", $db_name);
execute($query);

function execute($query)
{
  global $connection;

  $result = mysqli_query($connection, $query);

  if (!$result)
    die("Errore nella query: " . $query);
}

?>

{'fraction_non_alphanumeric': 0.15717375630857966, 'fraction_numerical': 0.0014419610670511895, 'mean_word_length': 5.3963133640553, 'pattern_counts': {'":': 0, '<': 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': '6834728', 'n_tokens_mistral': 495, 'n_tokens_neox': 484, 'n_words': 116}