<commit_before>from PyQt4 import QtGui, QtCore, QtDBus
import sys
import os
from multiprocessing import Process

class Lyrics(QtGui.QWidget):
    def __init__(self):
        super(Lyrics, self).__init__()
        self.initUI()

    def initUI(self):
        self.resize(900, 150)
        self.text = u"OSD Lyrics for Musicbox"
        self.setWindowTitle("Lyrics")
        self.show()

    @QtCore.pyqtSlot(str)
    def refresh_lyrics(self, text):
        self.text = text
        self.repaint()

    def paintEvent(self, event):
        qp = QtGui.QPainter()
        qp.begin(self)
        self.drawText(event, qp)
        qp.end()

    def drawText(self, event, qp):
        qp.setPen(QtGui.QColor(0, 0, 0))
        qp.setFont(QtGui.QFont('Decorative', 16))
        qp.drawText(event.rect(), QtCore.Qt.AlignCenter, self.text)

def show_lyrics():
    app = QtGui.QApplication(sys.argv)
    # lyrics_receiver = LyricsReceiver()
    lyrics = Lyrics()
    QtDBus.QDBusConnection.sessionBus().registerService('org.musicbox.Bus')
    QtDBus.QDBusConnection.sessionBus().registerObject('/', lyrics, QtDBus.QDBusConnection.ExportAllSlots)
    sys.exit(app.exec_())

def show_lyrics_new_process():
    p = Process(target=show_lyrics)
    p.start()
    os.system("notify-send 123")
    # p.join()<commit_msg>remove unnecessary code<commit_after>from PyQt4 import QtGui, QtCore, QtDBus
import sys
import os
from multiprocessing import Process

class Lyrics(QtGui.QWidget):
    def __init__(self):
        super(Lyrics, self).__init__()
        self.initUI()

    def initUI(self):
        self.resize(900, 150)
        self.text = u"OSD Lyrics for Musicbox"
        self.setWindowTitle("Lyrics")
        self.show()

    @QtCore.pyqtSlot(str)
    def refresh_lyrics(self, text):
        self.text = text
        self.repaint()

    def paintEvent(self, event):
        qp = QtGui.QPainter()
        qp.begin(self)
        self.drawText(event, qp)
        qp.end()

    def drawText(self, event, qp):
        qp.setPen(QtGui.QColor(0, 0, 0))
        qp.setFont(QtGui.QFont('Decorative', 16))
        qp.drawText(event.rect(), QtCore.Qt.AlignCenter, self.text)

def show_lyrics():
    app = QtGui.QApplication(sys.argv)
    # lyrics_receiver = LyricsReceiver()
    lyrics = Lyrics()
    QtDBus.QDBusConnection.sessionBus().registerService('org.musicbox.Bus')
    QtDBus.QDBusConnection.sessionBus().registerObject('/', lyrics, QtDBus.QDBusConnection.ExportAllSlots)
    sys.exit(app.exec_())

def show_lyrics_new_process():
    p = Process(target=show_lyrics)
    p.start()
    # p.join()
{'fraction_non_alphanumeric': 0.1296080714008537, 'fraction_numerical': 0.010477299185098952, 'mean_word_length': 3.0344287949921753, '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': '5960510', 'n_tokens_mistral': 927, 'n_tokens_neox': 883, 'n_words': 161}