<commit_before>"""
testscript.py
-------------

This is a test script for decu.

"""

from decu import Script, experiment, figure, run_parallel
import logging
import numpy as np
import matplotlib.pyplot as plt


class TestSript(Script):

    @experiment(exp_param='param')
    def exp(self, data, param):
        """Compute x**param for each data point."""
        logging.info('Working hard for {}..'.format(param))
        return np.array([np.power(x, param) for x in data])

    @figure()
    def plot_results(self, data, result):
        """Plot results of experiment."""
        plt.figure()
        for param in result.keys():
            plt.plot(data, result[param])

    def main(self):
        """Run some experiments and make some figures."""
        data = np.arange(5)<commit_msg>[fix] typo<commit_after>"""
testscript.py
-------------

This is a test script for decu.

"""

from decu import Script, experiment, figure, run_parallel
import logging
import numpy as np
import matplotlib.pyplot as plt


class TestScript(Script):

    @experiment(exp_param='param')
    def exp(self, data, param):
        """Compute x**param for each data point."""
        logging.info('Working hard for {}..'.format(param))
        return np.array([np.power(x, param) for x in data])

    @figure()
    def plot_results(self, data, result):
        """Plot results of experiment."""
        plt.figure()
        for param in result.keys():
            plt.plot(data, result[param])

    def main(self):
        """Run some experiments and make some figures."""
        data = np.arange(5)
{'fraction_non_alphanumeric': 0.1452020202020202, 'fraction_numerical': 0.0012626262626262627, 'mean_word_length': 2.720657276995305, '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': '5505419', 'n_tokens_mistral': 466, 'n_tokens_neox': 455, 'n_words': 154}