<commit_before># -*- coding: utf-8 -*-
u"""
    tablib.core
    ~~~~~~~~~~~

    This module implements the central Tablib objects.

    :copyright: (c) 2011 by <NAME>.
    :license: MIT, see LICENSE for more details.
"""

from copy import copy
from operator import itemgetter

from tablib import formats
import collections
from itertools import izip
from itertools import imap

try:
    from collections import OrderedDict
except ImportError:
    from tablib.packages.ordereddict import OrderedDict


__title__ = u'tablib'
__version__ = u'0.9.4'
__build__ = 0x000904
__author__ = u'<NAME>'
__license__ = u'MIT'
__copyright__ = u'Copyright 2011 <NAME>'
__docformat__ = u'restructuredtext'


class Row(object):
    u"""Internal Row object. Mainly used for filtering."""

    __slots__ = [u'tuple', u'_row', u'tags']

    def __init__(self, row=list(), tags=list()):
        self._row = list(row)
        self.tags = list(tags)

    def __iter__(self):
        return (col for col in self._row)

    def __len__(self):
        return len(self._row)

    def __repr__(self):
        return repr(self._row)

    def __getslice__(self, i, j):
        return self._row[i,j]

    def __getitem__(self, i):
        return self._row[i]

    def __setitem__(self, i, value):
        self._row[i] = value

    def __delitem__(self, i):
        del self._row[i]

    def __getstate__(self):
        return {slot: [getattr(self, slot) for slot in self.__slots__]}

    def __setstate__(self, state):
        for (k, v) in list(state.items()): setattr(self, k, v)

    def append(self, value):
        self._row.append(value)

    def insert(self, index, value):<commit_msg>Fix pickling/unpickling of Dataset instances.<commit_after># -*- coding: utf-8 -*-
u"""
    tablib.core
    ~~~~~~~~~~~

    This module implements the central Tablib objects.

    :copyright: (c) 2011 by <NAME>.
    :license: MIT, see LICENSE for more details.
"""

from copy import copy
from operator import itemgetter

from tablib import formats
import collections
from itertools import izip
from itertools import imap

try:
    from collections import OrderedDict
except ImportError:
    from tablib.packages.ordereddict import OrderedDict


__title__ = u'tablib'
__version__ = u'0.9.4'
__build__ = 0x000904
__author__ = u'<NAME>'
__license__ = u'MIT'
__copyright__ = u'Copyright 2011 <NAME>'
__docformat__ = u'restructuredtext'


class Row(object):
    u"""Internal Row object. Mainly used for filtering."""

    __slots__ = [ u'_row', u'tags']

    def __init__(self, row=list(), tags=list()):
        self._row = list(row)
        self.tags = list(tags)

    def __iter__(self):
        return (col for col in self._row)

    def __len__(self):
        return len(self._row)

    def __repr__(self):
        return repr(self._row)

    def __getslice__(self, i, j):
        return self._row[i,j]

    def __getitem__(self, i):
        return self._row[i]

    def __setitem__(self, i, value):
        self._row[i] = value

    def __delitem__(self, i):
        del self._row[i]

    def __getstate__(self):

        slots = dict()

        for slot in self.__slots__:
            attribute = getattr(self, slot)
            slots[slot] = attribute

        return slots

    def __setstate__(self, state):
        for (k, v) in list(state.items()): setattr(self, k, v)

    def append(self, value):
        self._row.append(value)

    def insert(self, index, value):
{'fraction_non_alphanumeric': 0.11939429237041352, 'fraction_numerical': 0.0110658124635993, 'mean_word_length': 2.957373271889401, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '7010972', 'n_tokens_mistral': 1155, 'n_tokens_neox': 1095, 'n_words': 329}