<commit_before>import psycopg2
import sys

from connect import connect_to_db

# add new temperature and date from arguments in command line
# filename counts as first arg
args = sys.argv
date_to_edit = args[1] # second arg
new_date = args[2] #third arg

# adding items to data
data = (date_to_edit, new_date)

# connect to database
conn = connect_to_db()
cur = conn.cursor()

# SQL for inserting values into db
SQL = "INSERT INTO BBT_CHART (DATE, TEMP) VALUES (%s, %s);"

# execute SQL command plus data
cur.execute(SQL, data)

print "Date changed"
conn.commit()
conn.close()<commit_msg>updated sql command<commit_after>import psycopg2
import sys

from connect import connect_to_db

# add new temperature and date from arguments in command line
# filename counts as first arg
args = sys.argv
date_to_edit = args[1] # second arg
new_date = args[2] #third arg

# adding items to data
data = (new_date, date_to_edit)

# connect to database
conn = connect_to_db()
cur = conn.cursor()

# SQL for inserting values into db
SQL = "UPDATE BBT_CHART SET DATE VALUES (%s) WHERE DATE VALUES (%s)"

# execute SQL command plus data
cur.execute(SQL, data)

print "Date changed"
conn.commit()
conn.close()
{'fraction_non_alphanumeric': 0.08830950378469302, 'fraction_numerical': 0.005046257359125316, 'mean_word_length': 4.862068965517241, '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': '6219530', 'n_tokens_mistral': 386, 'n_tokens_neox': 377, 'n_words': 151}