<commit_before><?php

namespace Presentation\Framework\Demo;

function create_env_file()
{
    echo PHP_EOL, 'Creating .env file... ';
    $dir = __DIR__;
    `cp $dir/.env.example $dir/.env`;
    echo 'Done.', PHP_EOL;
}



function db_seed()
{
    echo PHP_EOL, 'Seeding db... ';

    $pdo = db_connection();
    $sql = file_get_contents(FIXTURES_DIR . '/db.sql');
    foreach(explode(';', $sql) as $query) {
        if (!trim($query)) {
            continue;
        }
        // don't drop & create db for sqlite
        if (is_sqlite() && (
                strpos($query, 'DATABASE') !== false
                || strpos($query, 'USE ') !== false
            )) {
            continue;
        }
        try {
            $stmt = $pdo->prepare($query);
            $stmt->execute();
        } catch (\Exception $e) {
            echo $e;
            echo PHP_EOL, 'Query: ', $query;
            die();<commit_msg>install fixed<commit_after><?php

namespace Presentation\Framework\Demo;

function create_env_file()
{
    echo PHP_EOL, 'Creating .env file... ';
    $dir = __DIR__;
    `cp "$dir/.env.example" "$dir"`;
    echo 'Done.', PHP_EOL;
}



function db_seed()
{
    echo PHP_EOL, 'Seeding db... ';

    $pdo = db_connection();
    $sql = file_get_contents(FIXTURES_DIR . '/db.sql');
    foreach(explode(';', $sql) as $query) {
        if (!trim($query)) {
            continue;
        }
        // don't drop & create db for sqlite
        if (is_sqlite() && (
                strpos($query, 'DATABASE') !== false
                || strpos($query, 'USE ') !== false
            )) {
            continue;
        }
        try {
            $stmt = $pdo->prepare($query);
            $stmt->execute();
        } catch (\Exception $e) {
            echo $e;
            echo PHP_EOL, 'Query: ', $query;
            die();
{'fraction_non_alphanumeric': 0.16693944353518822, 'fraction_numerical': 0.0, 'mean_word_length': 1.7210682492581602, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '2083102', 'n_tokens_mistral': 605, 'n_tokens_neox': 586, 'n_words': 130}