<commit_before># -*- coding: utf-8 -*-

import os
from PyQt4 import uic, QtGui, QtCore
from epipy.ui.controller.event import Event

dir_name = os.path.dirname
folder_path = os.path.join(dir_name(__file__), '')
icon_path = os.path.join(dir_name(dir_name(dir_name(__file__))), 'resources/pictures/')
InfoGroupBoxUI, InfoGroupBoxBase = uic.loadUiType(os.path.join(folder_path, "infogroupbox.ui"))


class InfoGroupBox(InfoGroupBoxBase, InfoGroupBoxUI):
    def __init__(self, controller):
        InfoGroupBoxBase.__init__(self)
        self.setupUi(self)

        self.controller = controller
        self.controller.attach(self)

        self.save_btn = QtGui.QPushButton()
        self.save_icon = QtGui.QIcon(icon_path + 'save.png')
        self.save_btn.setIcon(self.save_icon)
        self.top_layout.addWidget(self.save_btn)

        self.spacer = QtGui.QSpacerItem(0, 0, QtGui.QSizePolicy.Expanding)
        self.top_layout.addItem(self.spacer)

        self.clear_btn = QtGui.QPushButton()
        self.clear_icon = QtGui.QIcon(icon_path + 'clear.png')
        self.clear_btn.clicked.connect(self.info_plain_text_edit.clear)
        self.clear_btn.setIcon(self.clear_icon)
        self.top_layout.addWidget(self.clear_btn)

    def update(self, event):
        if event == Event.LOG:
            model = self.controller.get_model()
            self.info_plain_text_edit.appendPlainText(str(model))<commit_msg>remove 'save' button<commit_after># -*- coding: utf-8 -*-

import os
from PyQt4 import uic, QtGui, QtCore
from epipy.ui.controller.event import Event

dir_name = os.path.dirname
folder_path = os.path.join(dir_name(__file__), '')
icon_path = os.path.join(dir_name(dir_name(dir_name(__file__))), 'resources/pictures/')
InfoGroupBoxUI, InfoGroupBoxBase = uic.loadUiType(os.path.join(folder_path, "infogroupbox.ui"))


class InfoGroupBox(InfoGroupBoxBase, InfoGroupBoxUI):
    def __init__(self, controller):
        InfoGroupBoxBase.__init__(self)
        self.setupUi(self)

        self.controller = controller
        self.controller.attach(self)

        self.spacer = QtGui.QSpacerItem(0, 0, QtGui.QSizePolicy.Expanding)
        self.top_layout.addItem(self.spacer)

        self.clear_btn = QtGui.QPushButton()
        self.clear_icon = QtGui.QIcon(icon_path + 'clear.png')
        self.clear_btn.clicked.connect(self.info_plain_text_edit.clear)
        self.clear_btn.setIcon(self.clear_icon)
        self.top_layout.addWidget(self.clear_btn)

    def update(self, event):
        if event == Event.LOG:
            model = self.controller.get_model()
            self.info_plain_text_edit.appendPlainText(str(model))
{'fraction_non_alphanumeric': 0.11836115326251896, 'fraction_numerical': 0.0030349013657056147, 'mean_word_length': 3.5544041450777204, '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': '7460597', 'n_tokens_mistral': 902, 'n_tokens_neox': 884, 'n_words': 126}