<commit_before>"""The Hash Table module."""


class HashTable(object):
    """Implementation of a hash table."""

    def __init__(self, size, hash_type=None):
        """Initializes the hash table based on Key Word arg."""
        self.hash_type = hash_type
        self.size = size
        self.hash_table = [[] for i in range(size)]

    def get(self, key):
        """Return the value stored with the given key."""
        hash_key = self._hash(key) % self.size
        return self.hash_table[hash_key]

    def set(self, key):
        """Store the given val using the given key."""
        if type(key) is not str:
            raise TypeError("Hashes need to be in string format.")
        hash_key = self._hash(key) % self.size
        self.hash_table[hash_key].append(key)

    def _hash(self, key):
        """Hash the key provided."""<commit_msg>hash table basics<commit_after>"""The Hash Table module."""


class HashTable(object):
    """Implementation of a hash table."""

    def __init__(self, size, hash_type=None):
        """Initializes the hash table based on Key Word arg."""
        self.hash_type = hash_type
        self.size = size
        self.hash_table = [[] for i in range(size)]

    def get(self, key):
        """Return the value stored with the given key."""
        hash_key = self._hash(key) % self.size
        return self.hash_table[hash_key]

    def set(self, key, val):
        """Store the given val using the given key."""
        if type(key) is not str:
            raise TypeError("Hashes need to be in string format.")
        hash_key = self._hash(key) % self.size
        self.hash_table[hash_key].append(val)

    def _hash(self, key):
        """Hash the key provided."""
{'fraction_non_alphanumeric': 0.12507271669575334, 'fraction_numerical': 0.0, 'mean_word_length': 2.5245901639344264, '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': '1410262', 'n_tokens_mistral': 504, 'n_tokens_neox': 492, 'n_words': 170}