<commit_before>'''
Created on Sep 1, 2012

@author: pp
'''


def _cmprow(idxarr, row1, row2):
    for idx in idxarr:
        c = cmp(row1[idx], row2[idx])
        if c:
            return c
    return 0


class Table(object):
    def __init__(self, schema, idx, colnames, pkey=None, skeys=None):
        self._schema = schema
        self._idx = idx

    @property
    def schema(self):
        pass

    @property
    def pkey(self):
        pass

    @property
    def skeys(self):
        pass

    @property
    def name(self):
        pass

    @property
    def idx(self):
        pass

    def catch_fkey(self):
        pass

    def sortrows(self):
        pass
<commit_msg>fill codes for table<commit_after>'''
Created on Sep 1, 2012

@author: pp
'''
from .common import col_uniname


def _cmprow(idxarr, row1, row2):
    for idx in idxarr:
        c = cmp(row1[idx], row2[idx])
        if c:
            return c
    return 0


class Table(object):
    def __init__(self, schema, idx, col_uninames, pkey=None, skeys=None):
        self._schema = schema
        self._idx = idx


        self._cols = list((schema.col_by_uniname[col_uniname].idx, col_uniname, schema.col_by_uniname[col_uniname]) for col_uniname in col_uninames)
        cols = []
        for col_uniname in col_uninames:
            col = schema.col_by_uniname[col_uniname]
            cols.append(col)
        cols = sorted(cols, key=col.idx)

    @property
    def schema(self):
        pass

    @property
    def pkey(self):
        pass

    @property
    def skeys(self):
        pass

    @property
    def name(self):
        pass

    @property
    def idx(self):
        pass

    def feed_rows(self, rows):
        pass

    def catch_fkey(self):
        pass

    def sort_rows(self, rows):
#        sort_idxarr = list(for row in rows)
        pass

{'fraction_non_alphanumeric': 0.09907457811649428, 'fraction_numerical': 0.010887316276537834, 'mean_word_length': 1.993485342019544, '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': '7006966', 'n_tokens_mistral': 650, 'n_tokens_neox': 613, 'n_words': 164}