<commit_before>import tempfile
import bloscpack
import pickle
from bisect import bisect
import os
import pandas as pd


def escape(text):
    return str(text)


class Castra(object):
    def __init__(self, columns, dtypes, index_dtype, path=None):
        if path is None:
            path = tempfile.mkdtemp(prefix='castra')
            self._explicitly_given_path = False
        else:
            self._explicitly_given_path = True

        self.path = path
        self.columns = list(columns)
        self.dtypes = dtypes
        self.index_dtype = index_dtype

        self.partition_list = list()

    def ensure_static_meta(self, dumps=pickle.dumps):
        for name in ['columns', 'dtypes', 'index_dtype']:
            with open(self.dirname('meta', name), 'w') as f:
                f.write(dumps(getattr(self, name)))<commit_msg>adding hyphen to tmp directory<commit_after>import tempfile
import bloscpack
import pickle
from bisect import bisect
import os
import pandas as pd


def escape(text):
    return str(text)


class Castra(object):
    def __init__(self, columns, dtypes, index_dtype, path=None):
        if path is None:
            path = tempfile.mkdtemp(prefix='castra-')
            self._explicitly_given_path = False
        else:
            self._explicitly_given_path = True

        self.path = path
        self.columns = list(columns)
        self.dtypes = dtypes
        self.index_dtype = index_dtype

        self.partition_list = list()

    def ensure_static_meta(self, dumps=pickle.dumps):
        for name in ['columns', 'dtypes', 'index_dtype']:
            with open(self.dirname('meta', name), 'w') as f:
                f.write(dumps(getattr(self, name)))
{'fraction_non_alphanumeric': 0.09823529411764706, 'fraction_numerical': 0.0, 'mean_word_length': 2.6346153846153846, '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': '3045169', 'n_tokens_mistral': 527, 'n_tokens_neox': 516, 'n_words': 135}