<commit_before>#!/usr/bin/python3

import unittest

from spline import Spline


class TestBasicSpline(unittest.TestCase):
    def test_baisc(self):
        x = [0, 1, 2, 3]
        y = [7, 3, 5, -2]
        firstderivate = -1
        lastderivate = 0
        spline = Spline(x, y, firstderivate, lastderivate)
        self.assertEqual(spline.lambdas, [1, 0.5, 0.5])
        self.assertEqual(spline.mys, [False, 0.5, 0.5, 1])
        self.assertEqual(spline.ds, [-18.0, 18.0, -27.0, 42.0])
        self.assertEqual(spline.new_lambdas, [0.5, 2.0 / 7, 7.0 / 26])
        #self.assertEqual(spline.new_ds, [-9, 90 / 7.0, -18.0, 1])  # die 1 ist
        #falsch und muss ersetzt werden
        expectedMis = [104 / 3.0, -82 / 3.0, 62 /3.0, -58 / 3.0]
        for i in range(len(expectedMis)):
            self.assertAlmostEqual(expectedMis[i], spline.Mis[i])

if __name__ == "__main__":
    unittest.main()
<commit_msg>Knut is a lazy boy<commit_after>#!/usr/bin/python3

import unittest

from spline import Spline


class TestBasicSpline(unittest.TestCase):
    def test_baisc(self):
        x = [0, 1, 2, 3]
        y = [7, 3, 5, -2]
        firstderivate = -1
        lastderivate = 0
        spline = Spline(x, y, firstderivate, lastderivate)
        self.assertEqual(spline.lambdas, [1, 0.5, 0.5])
        self.assertEqual(spline.mys, [False, 0.5, 0.5, 1])
        self.assertEqual(spline.ds, [-18.0, 18.0, -27.0, 42.0])
        self.assertEqual(spline.new_lambdas, [0.5, 2.0 / 7, 7.0 / 26])
        #self.assertEqual(spline.new_ds, [-9, 90 / 7.0, -18.0, 1])  # die 1 ist
        #falsch und muss ersetzt werden
        # expectedMis = [104 / 3.0, -82 / 3.0, 62 /3.0, -58 / 3.0]
        expectedMis = [-58 / 3.0, 62 / 3, -82 / 3.0, 104 / 3.0]
        for i in range(len(expectedMis)):
            self.assertAlmostEqual(expectedMis[i], spline.Mis[i])

if __name__ == "__main__":
    unittest.main()

{'fraction_non_alphanumeric': 0.16236162361623616, 'fraction_numerical': 0.08118081180811808, 'mean_word_length': 2.2224108658743633, 'pattern_counts': {'":': 2, '<': 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': '6293300', 'n_tokens_mistral': 858, 'n_tokens_neox': 754, 'n_words': 179}