<commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-

# this row must be existent
#cur.execute("insert into person values ('dara', '<NAME>')")

# test PostgreSQL
import psycopg2 as db
from mosql.util import escape
conn = db.connect(database='mosky')

# or MySQL
#import MySQLdb as db
#from mosql.mysql import escape
#from mosql.mysql import fast_escape as escape
#conn = db.connect(user='root', db='mosky')

# --- main ---

cur = conn.cursor()
<commit_msg>auto insert dara<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-

# test PostgreSQL
import psycopg2 as db
from mosql.util import escape
conn = db.connect(database='mosky')

# or MySQL
#import MySQLdb as db
#from mosql.mysql import escape
#from mosql.mysql import fast_escape as escape
#conn = db.connect(user='root', db='mosky')

# -- preparation --

cur = conn.cursor()

cur.execute("select * from person where person_id='dara'")
if cur.rowcount == 0:
    cur.execute("insert into person values ('dara', '<NAME>')")
    cur.commit()

cur.close()

# --- end of preparation ---

# --- main ---

cur = conn.cursor()

{'fraction_non_alphanumeric': 0.16069788797061524, 'fraction_numerical': 0.004591368227731864, 'mean_word_length': 3.8878923766816142, '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': '5963319', 'n_tokens_mistral': 372, 'n_tokens_neox': 364, 'n_words': 111}