<commit_before>import sqlite3
class DbOperation(object):
    DIR = 'dbtest/'
    FILE_NAME = 'hydroponics.db'

    def __init__(self):
        self.con = sqlite3.Connection(DbOperation.DIR + DbOperation.FILE_NAME)
        c = self.con.cursor()
        c.execute("""CREATE TABLE IF NOT EXISTS temp(date int, temp_c real, PRIMARY KEY(date))""")

    def selectRecord(self, limit, offset):
        c = self.con.cursor()
        c.execute("SELECT * FROM temp LIMIT ? OFFSET ?", (limit, offset))
        date_list = []
        temp_list = []
        for date, temp in c.fetchall():
            date_list.append(date)
            temp_list.append(temp)
        return {'temperature':temp_list, 'period':date_list}
<commit_msg>select文修正<commit_after>import sqlite3
class DbOperation(object):
    DIR = 'dbtest/'
    FILE_NAME = 'hydroponics.db'

    def __init__(self):
        self.con = sqlite3.Connection(DbOperation.DIR + DbOperation.FILE_NAME)
        c = self.con.cursor()
        c.execute("""CREATE TABLE IF NOT EXISTS temp(date int, temp_c real, PRIMARY KEY(date))""")

    def selectRecord(self, limit, offset):
        c = self.con.cursor()
        c.execute("SELECT * FROM temp ORDER BY date DESC LIMIT ? OFFSET ?", (limit, offset))
        date_list = []
        temp_list = []
        for date, temp in c.fetchall():
            date_list.append(date)
            temp_list.append(temp)
        return {'temperature':temp_list, 'period':date_list}

{'fraction_non_alphanumeric': 0.12783505154639174, 'fraction_numerical': 0.0027491408934707906, 'mean_word_length': 2.7237851662404093, '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': '4570233', 'n_tokens_mistral': 468, 'n_tokens_neox': 449, 'n_words': 106}