<commit_before>
import os
import time
from datetime import datetime

from manifest import QtGui
from plow.tools.util import *


def loadTheme():
    QtGui.QApplication.setStyle("plastique")
    path = os.path.join(os.path.dirname(__file__) , "resources/style.css")
    QtGui.qApp.setStyleSheet(open(path).read())


def ask(msg, title='Confirm?', parent=None):
    ret = QtGui.QMessageBox.question(parent, title, msg,
                                     QtGui.QMessageBox.Ok | QtGui.QMessageBox.Cancel,
                                     QtGui.QMessageBox.Cancel )
   
    return ret == QtGui.QMessageBox.Ok<commit_msg>added getSettings() utility method<commit_after>
import os
import time
from datetime import datetime

from manifest import QtCore, QtGui
from plow.tools.util import *


def loadTheme():
    QtGui.QApplication.setStyle("plastique")
    path = os.path.join(os.path.dirname(__file__) , "resources/style.css")
    QtGui.qApp.setStyleSheet(open(path).read())


def getSettings(name, scope=QtCore.QSettings.UserScope, parent=None):
    settings = QtCore.QSettings(QtCore.QSettings.NativeFormat, 
                                scope,
                                "plow", 
                                name, 
                                parent)
    return settings


def ask(msg, title='Confirm?', parent=None):
    ret = QtGui.QMessageBox.question(parent, title, msg,
                                     QtGui.QMessageBox.Ok | QtGui.QMessageBox.Cancel,
                                     QtGui.QMessageBox.Cancel )
   
    return ret == QtGui.QMessageBox.Ok

{'fraction_non_alphanumeric': 0.10081915563957151, 'fraction_numerical': 0.0, 'mean_word_length': 2.1570576540755466, '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': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5187735', 'n_tokens_mistral': 462, 'n_tokens_neox': 445, 'n_words': 89}