<commit_before>import bcrypt
import hashlib
import json
import subprocess
import tempfile


class Polycule(object):
    def __init__(self, db=None, id=None, graph=None, view_pass=None,
                 edit_pass=None, graph_hash=None):
        self._db = db
        self.id = id
        self.graph = graph
        self.view_pass = view_pass
        self.edit_pass = edit_pass
        self.graph_hash = graph_hash

    @classmethod
    def get(cls, db, graph_hash, password, force=False):
        if len(graph_hash) < 7:
            return None
        graph_hash = graph_hash + '_' * (40 - len(graph_hash))
        result = db.execute('select * from polycules where hash like ?', [
            graph_hash
        ])
        graph = result.fetchall()
        if len(graph) != 1:
            return None
        graph = graph[0]
        polycule = Polycule(
            db=db,
            id=graph[0],<commit_msg>select specific columns in get() to make sure ordering is correct<commit_after>import bcrypt
import hashlib
import json
import subprocess
import tempfile


class Polycule(object):
    def __init__(self, db=None, id=None, graph=None, view_pass=None,
                 edit_pass=None, graph_hash=None):
        self._db = db
        self.id = id
        self.graph = graph
        self.view_pass = view_pass
        self.edit_pass = edit_pass
        self.graph_hash = graph_hash

    @classmethod
    def get(cls, db, graph_hash, password, force=False):
        if len(graph_hash) < 7:
            return None
        graph_hash = graph_hash + '_' * (40 - len(graph_hash))
        result = db.execute('select id,graph,view_pass,delete_pass,hash from polycules where hash like ?', [
            graph_hash
        ])
        graph = result.fetchall()
        if len(graph) != 1:
            return None
        graph = graph[0]
        polycule = Polycule(
            db=db,
            id=graph[0],
{'fraction_non_alphanumeric': 0.09381551362683438, 'fraction_numerical': 0.006289308176100629, 'mean_word_length': 2.1040650406504064, 'pattern_counts': {'":': 0, '<': 5, '<?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': '3759724', 'n_tokens_mistral': 574, 'n_tokens_neox': 563, 'n_words': 148}