<commit_before>#! /usr/bin/env python
# -*- coding: latin-1; -*-

## Qt ##
foundQt=0
try:
    from PyQt4.QtCore import *
    from PyQt4.QtGui  import *
    foundQt=4
except:
    pass    
try:
    from PyQt5.QtCore    import *
    from PyQt5.QtWidgets import *
    foundQt=5
except:
    pass     
if not foundQt:
    raise Exception("PyQt4/5 not found!") 
print "PyQt%d (Qt %s) loaded!" % (foundQt, QT_VERSION_STR)   

## vtk ##
import vtk
try:
    if foundQt==4:
        from vtk.qt4.QVTKRenderWindowInteractor import QVTKRenderWindowInteractor
    else:
        from vtk.qt.QVTKRenderWindowInteractor import QVTKRenderWindowInteractor
except:
    raise Exception("QVTKRenderWindowInteractor not available!")


import sys
class Ui_MainWindow(QWidget):
    def setupUi(self, MainWindow):
       MainWindow.setObjectName("MainWindow")
       MainWindow.resize(603, 553)
       self.centralWidget = QWidget(MainWindow)
       self.gridlayout = QGridLayout(self.centralWidget)
       self.vtkWidget = QVTKRenderWindowInteractor(self.centralWidget)
       self.gridlayout.addWidget(self.vtkWidget, 0, 0, 1, 1)
       MainWindow.setCentralWidget(self.centralWidget)

class SimpleView(QMainWindow):
    def __init__(self, parent = None):
        QMainWindow.__init__(self, parent)
        self.ui = Ui_MainWindow()
        self.ui.setupUi(self)
        self.widget = self.ui.vtkWidget
        self.ren = vtk.vtkRenderer()
        renwin = self.widget.GetRenderWindow()
        renwin.AddRenderer(self.ren)<commit_msg>adding comments<commit_after>#! /usr/bin/env python
# -*- coding: latin-1; -*-

## Qt 4 or 5 ##
foundQt=0
try:
    from PyQt4.QtCore import *
    from PyQt4.QtGui  import *
    foundQt=4
except:
    pass    
try:
    from PyQt5.QtCore    import *
    from PyQt5.QtWidgets import *
    foundQt=5
except:
    pass     
if not foundQt:
    raise Exception("PyQt4/5 not found!") 
print "PyQt%d (Qt %s) loaded!" % (foundQt, QT_VERSION_STR)   

## vtk 5 or 6 or 7 ##
import vtk
try:
    if foundQt==4:
        from vtk.qt4.QVTKRenderWindowInteractor import QVTKRenderWindowInteractor
    else:
        from vtk.qt.QVTKRenderWindowInteractor import QVTKRenderWindowInteractor
except:
    raise Exception("QVTKRenderWindowInteractor not available!")


import sys
class Ui_MainWindow(QWidget):
    def setupUi(self, MainWindow):
       MainWindow.setObjectName("MainWindow")
       MainWindow.resize(603, 553)
       self.centralWidget = QWidget(MainWindow)
       self.gridlayout = QGridLayout(self.centralWidget)
       self.vtkWidget = QVTKRenderWindowInteractor(self.centralWidget)
       self.gridlayout.addWidget(self.vtkWidget, 0, 0, 1, 1)
       MainWindow.setCentralWidget(self.centralWidget)

class SimpleView(QMainWindow):
    def __init__(self, parent = None):
        QMainWindow.__init__(self, parent)
        self.ui = Ui_MainWindow()
        self.ui.setupUi(self)
        self.widget = self.ui.vtkWidget
        self.ren = vtk.vtkRenderer()
        renwin = self.widget.GetRenderWindow()
        renwin.AddRenderer(self.ren)
{'fraction_non_alphanumeric': 0.10194015126603091, 'fraction_numerical': 0.01611312068398553, 'mean_word_length': 3.1557377049180326, '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': '194370', 'n_tokens_mistral': 1047, 'n_tokens_neox': 1008, 'n_words': 210}