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

import os
import kivy
kivy.require('1.9.0')
import pandas as pd
if __name__ == '__main__':
    import sys
    import os
    sys.path.append('{}/code/persimmon'.format(os.path.expanduser('~')))
from persimmon import backend
from functools import partial
from kivy.app import App
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.floatlayout import FloatLayout
from kivy.uix.popup import Popup
from kivy.properties import ObjectProperty, StringProperty

from sklearn.svm import SVC
from sklearn.model_selection import LeaveOneOut


class TestApp(App):
    def __init__(self, *args, **kwargs):
        super(TestApp, self).__init__(*args, **kwargs)
        self.train_file = None
        self.estimator = None
        self.cv = None
        self.predict_file = None

    def validate(self):
        result = backend.perform(pd.read_csv(self.train_file, header=0),
                                 self.estimator, self.cv)
        return '{:.3f}% (+/-{:.3f}%)'.format(result.mean() * 100,
                                             result.std() * 100)<commit_msg>Super even more super now<commit_after>#!/usr/bin/env python3

import os
import kivy
kivy.require('1.9.0')
import pandas as pd
if __name__ == '__main__':
    import sys
    import os
    sys.path.append('{}/code/persimmon'.format(os.path.expanduser('~')))
from persimmon import backend
from functools import partial
from kivy.app import App
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.floatlayout import FloatLayout
from kivy.uix.popup import Popup
from kivy.properties import ObjectProperty, StringProperty

from sklearn.svm import SVC
from sklearn.model_selection import LeaveOneOut


class TestApp(App):
    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)
        self.train_file = None
        self.estimator = None
        self.cv = None
        self.predict_file = None

    def validate(self):
        result = backend.perform(pd.read_csv(self.train_file, header=0),
                                 self.estimator, self.cv)
        return '{:.3f}% (+/-{:.3f}%)'.format(result.mean() * 100,
                                             result.std() * 100)
{'fraction_non_alphanumeric': 0.1136260751471254, 'fraction_numerical': 0.011770031688546853, 'mean_word_length': 2.758503401360544, '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': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7211558', 'n_tokens_mistral': 714, 'n_tokens_neox': 684, 'n_words': 174}