<commit_before>#! /usr/bin/python3

import sys
from PyQt4 import QtGui, QtCore

class MainWindow(QtGui.QWidget):

    def __init__(self):
        super(MainWindow, self).__init__()

        self.initUI()

    def initUI(self):
        QtGui.QToolTip.setFont(QtGui.QFont('SansSerif', 10))

        button = QtGui.QPushButton("Quit", self)
        button.clicked.connect(QtCore.QCoreApplication.instance().quit)
        button.setToolTip("Quit Program")
        button.resize(button.sizeHint())
        button.move(50, 50)

        self.setGeometry(300, 300, 250, 150)
        self.setWindowTitle("A Noob's Window")

        self.show()

    def closeEvent(self, event):
        reply = QtGui.QMessageBox.question(self, "Message", "Are you sure you wish to quit?",
                                           QtGui.QMessageBox.Yes | QtGui.QMessageBox.No, QtGui.QMessageBox.No)

        if reply == QtGui.QMessageBox.Yes:
            print("Bye")
            event.accept()
        else:
            event.ignore()

def main():
    app = QtGui.QApplication(sys.argv)
    window = MainWindow()<commit_msg>Updated the PyQt test<commit_after>#! /usr/bin/python3

import sys
from PyQt4 import QtGui

class MainWindow(QtGui.QMainWindow):

    def __init__(self):
        super(MainWindow, self).__init__()

        self.initUI()
        
    def initUI(self):
        exitAction = QtGui.QAction(QtGui.QIcon("exit.png"), "&Exit", self)
        exitAction.setShortcut("Ctrl + Q")
        exitAction.setStatusTip("Exit Application")
        exitAction.triggered.connect(QtGui.qApp.quit)

        self.statusBar().showMessage("Ready")

        menubar = self.menuBar()
        fileMenu = menubar.addMenu("&File")
        fileMenu.addAction(exitAction)

        self.setWindowTitle("A Noob's Window")
        self.resize(300, 150)
        self.center()
        self.show()

    def center(self):
        qr = self.frameGeometry()
        cp = QtGui.QDesktopWidget().availableGeometry().center()
        qr.moveCenter(cp)
        self.move(qr.topLeft())

def main():
    app = QtGui.QApplication(sys.argv)
    window = MainWindow()
{'fraction_non_alphanumeric': 0.1275992438563327, 'fraction_numerical': 0.013232514177693762, 'mean_word_length': 2.481907894736842, '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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6592566', 'n_tokens_mistral': 699, 'n_tokens_neox': 653, 'n_words': 121}