<commit_before>"""
UPEL View Helper Classes
"""

import Tkinter as Tk
from common.upel_icp import ICP_DeviceError

class ICP_Widget(Tk.Frame):
    PIXELS_PER_X = 30
    PIXELS_PER_Y = 30
    
    def __init__(self, master, model, units_x=8, units_y=1):
        Tk.Frame.__init__(self, master, padx=2, pady=2)
        
        width = units_x * self.PIXELS_PER_X
        height = units_y * self.PIXELS_PER_Y
        
        self.config(width=width, height=height)
        self.pack_propagate(0)
        
class ICP_Operation_Mode(ICP_Widget):
    def __init__(self, master, model):
        ICP_Widget.__init__(self, master, model, 8, 4)
        
        self.columnconfigure(0, weight=1)
        
        # Current Mode
        Tk.Label(self, font=("Purisa", 12), text="Current Mode:", anchor=Tk.W, justify=Tk.LEFT).grid(row=0, column=0)
        self.mode = Tk.StringVar()<commit_msg>Bug fix in UPEL view where an invalid module was being imported<commit_after>"""
UPEL View Helper Classes
"""

import Tkinter as Tk
from common.icp.errors import *

class ICP_Widget(Tk.Frame):
    PIXELS_PER_X = 30
    PIXELS_PER_Y = 30
    
    def __init__(self, master, model, units_x=8, units_y=1):
        Tk.Frame.__init__(self, master, padx=2, pady=2)
        
        width = units_x * self.PIXELS_PER_X
        height = units_y * self.PIXELS_PER_Y
        
        self.config(width=width, height=height)
        self.pack_propagate(0)
        
class ICP_Operation_Mode(ICP_Widget):
    def __init__(self, master, model):
        ICP_Widget.__init__(self, master, model, 8, 4)
        
        self.columnconfigure(0, weight=1)
        
        # Current Mode
        Tk.Label(self, font=("Purisa", 12), text="Current Mode:", anchor=Tk.W, justify=Tk.LEFT).grid(row=0, column=0)
        self.mode = Tk.StringVar()
{'fraction_non_alphanumeric': 0.11419068736141907, 'fraction_numerical': 0.018847006651884702, 'mean_word_length': 2.7370600414078674, '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': '6307773', 'n_tokens_mistral': 674, 'n_tokens_neox': 645, 'n_words': 135}