<commit_before>#!/usr/bin/env python


class SinglyLinked(object):
    def __init__(self):
        pass

    def insert(self, val):
        # insert val at beginning of list
        pass

    def pop(self):
        # pops first value from list and returns it
        pass

    def size(self):
        # returns length of list
        pass

    def search(self, val):
        # return node containing 'val' in list, if present (else None)
        pass

    def remove(self, node):
        # remove node from list, wherever it might be
        pass

    def print_(self):
        # print list as python tuple literal
        # (bonus points if you make it appear like "(12, 'sam', 32, 'fred')")
        pass<commit_msg>Create Node class; construct insert method<commit_after>#!/usr/bin/env python


class Node(object):
    def __init__(self, data, nextNode=None):
        self.data = data
        self.nextNode = nextNode


class LinkedList(object):
    def __init__(self, firstNode=None):
        self.firstNode = firstNode

    def insert(self, newNode):
        # insert newNode at beginning of list
        if not self.firstNode:
            self.firstNode = newNode
        else:
            newNode.nextNode = self.firstNode
            self.firstNode = newNode

    def pop(self):
        # pops first value from list and returns it
        pass

    def size(self):
        # returns length of list
        pass

    def search(self, val):
        # return node containing 'val' in list, if present (else None)
        pass

    def remove(self, node):
        # remove node from list, wherever it might be
        pass

    def display(self):
        # print list as python tuple literal
        # (bonus points if you make it appear like "(12, 'sam', 32, 'fred')")
        for node in self:
            print self.firstNode
{'fraction_non_alphanumeric': 0.08301474604041507, 'fraction_numerical': 0.004369197160021846, 'mean_word_length': 2.0381426202321724, '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': '862765', 'n_tokens_mistral': 519, 'n_tokens_neox': 493, 'n_words': 194}