<commit_before>import unittest
import psycopg2

conn = psycopg2.connect("dbname='travis_ci_test' user='postgres' host='localhost'")

# createdb_query = """
# CREATE USER MIMIC;
# CREATE DATABASE MIMIC OWNER MIMIC;
# \c MIMIC;
# CREATE SCHEMA MIMICIII;
# ALTER SCHEMA MIMICIII OWNER TO MIMIC;
# """

# createdb = pd.read_sql_query(createdb_query,conn)

# test_query = """
# SELECT 'hello world'
# """

# testq = pd.read_sql_query(test_query,conn)

# Here's our "unit".
def isodd(n):
    return n % 2 == 1

# Load build scripts
def executescripts(filename):
    # Open and read the file as a single buffer
    fd = open(filename, 'r')
    sqlFile = fd.read()
    fd.close()

    # all SQL commands (split on ';')
    sqlcommands = sqlFile.split(';')

    # Execute every command from the input file
    for command in sqlcommands:
        # This will skip and report errors
        # For example, if the tables do not yet exist, this will skip over
        # the DROP TABLE commands
        try:
            c.execute(command)<commit_msg>test db<commit_after>import unittest
import psycopg2

conn = psycopg2.connect("dbname='travis_ci_test' user='postgres' host='localhost'")

# createdb_query = """
# CREATE USER MIMIC;
# CREATE DATABASE MIMIC OWNER MIMIC;
# \c MIMIC;
# CREATE SCHEMA MIMICIII;
# ALTER SCHEMA MIMICIII OWNER TO MIMIC;
# """

# createdb = pd.read_sql_query(createdb_query,conn)

test_query = """
SELECT 'hello world';
"""

testq = pd.read_sql_query(test_query,conn)

# Here's our "unit".
def isodd(n):
    return n % 2 == 1

# Load build scripts
def executescripts(filename):
    # Open and read the file as a single buffer
    fd = open(filename, 'r')
    sqlFile = fd.read()
    fd.close()

    # all SQL commands (split on ';')
    sqlcommands = sqlFile.split(';')

    # Execute every command from the input file
    for command in sqlcommands:
        # This will skip and report errors
        # For example, if the tables do not yet exist, this will skip over
        # the DROP TABLE commands
        try:
            c.execute(command)
{'fraction_non_alphanumeric': 0.11024769305488101, 'fraction_numerical': 0.003885381253035454, 'mean_word_length': 3.309623430962343, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2110244', 'n_tokens_mistral': 721, 'n_tokens_neox': 696, 'n_words': 216}