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

import os
from PyQt5.QtWidgets import (QWizard, QMessageBox)
from PyQt5.QtGui import QPixmap
from PyQt5.QtCore import pyqtSlot, Qt

try:
    import odmltables

    have_odmltables = True
except:
    have_odmltables = False

from .settings import Settings


class OdmltablesWizard(QWizard):
    def __init__(self, wizname, parent=None):
        super(OdmltablesWizard, self).__init__(parent)

        self.wizname = wizname
        self.settingsfile = wizname.replace(' ', '').lower() + '.conf'

        # initialize settings
        self.settings = Settings(self.settingsfile)

        # setting starting page of wizard
        # self.setStartId(0)

        self.setOption(self.IndependentPages, False)

        # images won't show in Windows 7 if style not set
        self.setWizardStyle(self.ModernStyle)
        self.setOption(self.HaveHelpButton, True)
        self.setPixmap(QWizard.LogoPixmap,
                       QPixmap(os.path.join('..', '..', 'logo',
                                            "odML-tables_100x100.png")))
        # self.setPixmap(QWizard.WatermarkPixmap, QPixmap(os.path.join('..',
        # 'logo',"odML-tables_100x100.png")))

        # set up help messages
        self._lastHelpMsg = ''
        self._helpMsgs = self._createHelpMsgs()
        self.helpRequested.connect(self._showHelp)

        self.setWindowTitle(self.tr(wizname))
<commit_msg>[1.0] switch to central location of config files<commit_after># -*- coding: utf-8 -*-

import os
from PyQt5.QtWidgets import (QWizard, QMessageBox)
from PyQt5.QtGui import QPixmap
from PyQt5.QtCore import pyqtSlot, Qt

try:
    import odmltables

    have_odmltables = True
except:
    have_odmltables = False

from .settings import Settings


class OdmltablesWizard(QWizard):
    def __init__(self, wizname, parent=None):
        super(OdmltablesWizard, self).__init__(parent)

        self.wizname = wizname
        self.settingsfile = os.path.join(os.path.expanduser("~"),
                                         '.odmltables',
                                         wizname.replace(' ', '').lower() + '.conf')

        # initialize settings
        self.settings = Settings(self.settingsfile)

        # setting starting page of wizard
        # self.setStartId(0)

        self.setOption(self.IndependentPages, False)

        # images won't show in Windows 7 if style not set
        self.setWizardStyle(self.ModernStyle)
        self.setOption(self.HaveHelpButton, True)
        self.setPixmap(QWizard.LogoPixmap,
                       QPixmap(os.path.join('..', '..', 'logo',
                                            "odML-tables_100x100.png")))
        # self.setPixmap(QWizard.WatermarkPixmap, QPixmap(os.path.join('..',
        # 'logo',"odML-tables_100x100.png")))

        # set up help messages
        self._lastHelpMsg = ''
        self._helpMsgs = self._createHelpMsgs()
        self.helpRequested.connect(self._showHelp)

        self.setWindowTitle(self.tr(wizname))

{'fraction_non_alphanumeric': 0.11177446102819237, 'fraction_numerical': 0.012603648424543947, 'mean_word_length': 2.328918322295806, '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': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4907979', 'n_tokens_mistral': 976, 'n_tokens_neox': 906, 'n_words': 181}