<commit_before>from __future__ import print_function, division
from sys import argv, stderr

def run_gui():
    '''Start the event loop to calucate spectra interactively'''
    # Import Qt functions.  Do so here to handle errors better
    try:
        from PyQt4.QtGui import QApplication
    except ImportError:
        print("Cannot find PyQt4", file=stderr)
        print("You must install this to run the GUI", file=stderr)
        return 1
    # Start the actual event loop
    app = QApplication(argv)

    # For good measure, try to find PyQwt5 now as a check
    try:
        import PyQt4.Qwt5
    except ImportError:
        print("Cannot find PyQwt5", file=stderr)
        print("You must install this to run the GUI", file=stderr)
        return 1

    # Create the GUI window
    from mainwindow import MainWindow
    window = MainWindow()
    window.show()
    window.raise_()
    return app.exec_()<commit_msg>Added code to make pyinstaller find PyQt<commit_after>from __future__ import print_function, division
from sys import argv, stderr

def run_gui():
    '''Start the event loop to calucate spectra interactively'''
    # Import Qt functions.  Do so here to handle errors better
    try:
        from PyQt4 import QtCore, QtGui, Qt
        from PyQt4.QtGui import QApplication
    except ImportError:
        print("Cannot find PyQt4", file=stderr)
        print("You must install this to run the GUI", file=stderr)
        return 1
    # Start the actual event loop
    app = QApplication(argv)

    # For good measure, try to find PyQwt5 now as a check
    try:
        from PyQt4 import Qwt5
    except ImportError:
        print("Cannot find PyQwt5", file=stderr)
        print("You must install this to run the GUI", file=stderr)
        return 1

    # Create the GUI window
    from mainwindow import MainWindow
    window = MainWindow()
    window.show()
    window.raise_()
    return app.exec_()
{'fraction_non_alphanumeric': 0.0680166147455867, 'fraction_numerical': 0.008826583592938734, 'mean_word_length': 2.793307086614173, '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': '4958713', 'n_tokens_mistral': 546, 'n_tokens_neox': 531, 'n_words': 221}