<commit_before># -*- coding=utf-8 -*-
"""Hold sample code for number of classic data structures implemented in Python."""


class Node(object):
    """A class inheriting object that holds a value and pointer."""

    def __init__(self, value=None, pointer=None):
        """Build a Node object with specified value and pointer."""
        if pointer is None or isinstance(pointer, Node):
            self.pointer = pointer
        else:
            raise TypeError("Pointer must point to a node object")
        self.value = value


class LinkedList(object):
    """A class wrapper with Node linking methods."""

    tail = None

    def __init__(self, initial_values=[]):
        """Build a LinkedList of specified Nodes out of non-list values."""
        if not isinstance(initial_values, list):
            initial_values = [initial_values]
        for item in initial_values:
            self.tail = Node(item, self.tail)

    def insert(self, val):
        """Insert value into Linked Node list."""
        if self.tail:
            cursor = self.tail
            while cursor.pointer:
                cursor = cursor.pointer
            cursor.pointer = Node(val, None)
        else:
            self.tail = Node(val, None)
<commit_msg>Removed default value for Node<commit_after># -*- coding=utf-8 -*-
"""Hold sample code for number of classic data structures implemented in Python."""


class Node(object):
    """A class inheriting object that holds a value and pointer."""

    def __init__(self, value, pointer=None):
        """Build a Node object with specified value and pointer."""
        if pointer is None or isinstance(pointer, Node):
            self.pointer = pointer
        else:
            raise TypeError("Pointer must point to a node object")
        self.value = value


class LinkedList(object):
    """A class wrapper with Node linking methods."""

    tail = None

    def __init__(self, initial_values=[]):
        """Build a LinkedList of specified Nodes out of non-list values."""
        if not isinstance(initial_values, list):
            initial_values = [initial_values]
        for item in initial_values:
            self.tail = Node(item, self.tail)

    def insert(self, val):
        """Insert value into Linked Node list."""
        if self.tail:
            cursor = self.tail
            while cursor.pointer:
                cursor = cursor.pointer
            cursor.pointer = Node(val, None)
        else:
            self.tail = Node(val, None)

{'fraction_non_alphanumeric': 0.10056089743589744, 'fraction_numerical': 0.0008012820512820513, 'mean_word_length': 2.289855072463768, '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': '5173010', 'n_tokens_mistral': 632, 'n_tokens_neox': 613, 'n_words': 244}