<commit_before>from tkinter import Tk, Button, TOP
from common import myformat, clear_list, get_without

# TODO
# Add custom converts. User have to specify which columns he wants to convert and CONST to add.


class Convert(Tk):

    def __init__(self, textfield, data):
        Tk.__init__(self)
        self.master = data
        self.textField = textfield
        self.txt = self.textField.get_text()
        self.title("Convert")
        self.geometry("150x150")
        self.master.windows.append(self)
        self.B1, self.B2, self.B3, self.B4, self.B5 = None, None, None, None, None
        self._create()

    def _create(self):
        self.B1 = Button(self, text="From hipparcos", command=self._do_bhip)
        self.B1.pack(side=TOP)
        self.B2 = Button(self, text="From Integral", command=self._do_bint)
        self.B2.pack(side=TOP)
        self.B3 = Button(self, text="From nsvs", command=self._do_bnsvs)
        self.B3.pack(side=TOP)
        self.B4 = Button(self, text="From asas", command=self._do_asas)
        self.B4.pack(side=TOP)
        self.B5 = Button(self, text="From munipac", command=self._do_munipac)
        self.B5.pack(side=TOP)
        self.B6 = Button(self, text="From kepler", command=self._do_kepler)
        self.B6.pack(side=TOP)

    def _do_kepler(self):
        self.textField.clear()
        self.textField.insert_text(kepler(self.txt))
        self.destroy()

    def _do_bhip(self):
        self.textField.clear()
        self.textField.insert_text(hipparcos(self.txt))
        self.destroy()

    def _do_bint(self):
        self.textField.clear()
        self.textField.insert_text(integral(self.txt))
        self.destroy()

    def _do_bnsvs(self):<commit_msg>freeze bug repair<commit_after>from tkinter import Toplevel, Button, TOP
from common import myformat, clear_list, get_without
from threading import Thread

# TODO
# Add custom converts. User have to specify which columns he wants to convert and CONST to add.


class Convert(Toplevel):

    def __init__(self, textfield, data):
        Toplevel.__init__(self, data)
        self.master = data
        self.textField = textfield
        self.txt = self.textField.get_text()
        self.title("Convert")
        self.geometry("150x150")
        self.master.windows.append(self)
        self.B1, self.B2, self.B3, self.B4, self.B5 = None, None, None, None, None
        self._create()

    def _create(self):
        self.B1 = Button(self, text="From hipparcos", command=self._do_bhip)
        self.B1.pack(side=TOP)
        self.B2 = Button(self, text="From Integral", command=self._do_bint)
        self.B2.pack(side=TOP)
        self.B3 = Button(self, text="From nsvs", command=self._do_bnsvs)
        self.B3.pack(side=TOP)
        self.B4 = Button(self, text="From asas", command=self._do_asas)
        self.B4.pack(side=TOP)
        self.B5 = Button(self, text="From munipac", command=self._do_munipac)
        self.B5.pack(side=TOP)
        self.B6 = Button(self, text="From kepler", command=self._do_kepler)
        self.B6.pack(side=TOP)

    def _do_kepler(self):
        def _worker(textfield, data):
            data = kepler(data)
            textfield.clear()
            textfield.insert_text(data)
        self.textField.clear()
        self.textField.insert_text("CALCULATING, PLEASE WAIT!")
        Thread(target=_worker, args=(self.textField, self.txt)).start()
        self.destroy()

    def _do_bhip(self):
        self.textField.clear()
        self.textField.insert_text(hipparcos(self.txt))
        self.destroy()

    def _do_bint(self):
        self.textField.clear()
        self.textField.insert_text(integral(self.txt))
        self.destroy()

    def _do_bnsvs(self):
{'fraction_non_alphanumeric': 0.12446120689655173, 'fraction_numerical': 0.012392241379310345, 'mean_word_length': 2.746720484359233, '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': '2093281', 'n_tokens_mistral': 1275, 'n_tokens_neox': 1244, 'n_words': 242}