<commit_before>import sys, os
import logging
import html
import json
from base64 import b64decode, b64encode
import numpy as np
from PyQt5.QtCore import Qt, QRectF
from PyQt5.QtGui import QTextCursor, QKeySequence
from PyQt5.QtWidgets import \
  QMainWindow, QTextEdit, QDockWidget, \
  QMenuBar, QMenu, QAction


import log
import fileloader
from graphwidget import GraphWidget
from tools import NopTool
from toolwidgets import FitToolWidget, IADToolWidget
from commonwidgets import TabWidgetWithCheckBox
from sourceswidget import SourcesWidget
from dialogs import FileDialog



class MainWindow(QMainWindow):
  saveStateVersion = 1

  def __init__(self, configFilename):
    super().__init__()
    self.configFilename = configFilename


    actions = [
      ('act_file_import',     '&Import file',    QKeySequence(Qt.CTRL | Qt.Key_I), self.showImportFileDialog),
      ('act_session_open',    '&Open session',   QKeySequence.Open, self.showOpenSessionDialog),
      ('act_session_save',    '&Save session',   QKeySequence.Save, self.saveSession),
      ('act_session_save_as', 'Save session as', QKeySequence.SaveAs, lambda: self.saveSession(True)),
    ]

    for name, label, key, func in actions:
      act = QAction(label)<commit_msg>Fix an import error<commit_after>import sys, os
import logging
import html
import json
from base64 import b64decode, b64encode
import numpy as np
from PyQt5.QtCore import Qt, QRectF
from PyQt5.QtGui import QTextCursor, QKeySequence
from PyQt5.QtWidgets import \
  QMainWindow, QTextEdit, QDockWidget, \
  QMenuBar, QMenu, QAction


import log
import fileloader
from graphwidget import GraphWidget
from tools import NopTool
from toolwidgets import FitToolWidget, IADToolWidget
from sourceswidget import SourcesWidget
from dialogs import FileDialog



class MainWindow(QMainWindow):
  saveStateVersion = 1

  def __init__(self, configFilename):
    super().__init__()
    self.configFilename = configFilename


    actions = [
      ('act_file_import',     '&Import file',    QKeySequence(Qt.CTRL | Qt.Key_I), self.showImportFileDialog),
      ('act_session_open',    '&Open session',   QKeySequence.Open, self.showOpenSessionDialog),
      ('act_session_save',    '&Save session',   QKeySequence.Save, self.saveSession),
      ('act_session_save_as', 'Save session as', QKeySequence.SaveAs, lambda: self.saveSession(True)),
    ]

    for name, label, key, func in actions:
      act = QAction(label)
{'fraction_non_alphanumeric': 0.08278688524590164, 'fraction_numerical': 0.00819672131147541, 'mean_word_length': 4.624423963133641, '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': '1410308', 'n_tokens_mistral': 753, 'n_tokens_neox': 722, 'n_words': 216}