<commit_before>from tkinter import Canvas, BOTH, Frame
from .tkmixins import ScheduleMixin, DestroyMixin, FocusMixin, DisplayMixin, SizeMixin, ReprMixin
from . import utilities as utils

class Waffle(ScheduleMixin, DestroyMixin, FocusMixin, DisplayMixin, ReprMixin):

    def __init__(self, master, height=3, width=3, dim=20, pad=5, color="white", dotty=False, grid=None, align=None, command=None, remember=True):

    	# Description of this object (for friendly error messages)
        self.description = "[Waffle] object ("+str(height)+"x"+str(width)+")"

        self._command = command
        self._height = height       # How many pixels high
        self._width = width         # How many pixels wide
        self._pixel_size = dim      # Size of one pixel
        self._pad = pad             # How much padding between pixels
        self._color = color        # Start color of the whole waffle
        self._dotty = dotty         # A dotty waffle will display circles
        self._save_canvas = []      # Where the Waffle objects will be stored

        # Calculate how big this canvas will be
        self._c_height = self._width*(self._pixel_size+self._pad)
        self._c_width = self._width*(self._pixel_size+self._pad)

        # Create a tk Frame object within this object which will be the waffle
        self.tk = Frame(master.tk)

        # Create an internal canvas to draw the waffle on
        self._canvas = Canvas(self.tk, height=self._c_height, width=self._c_width)

        # Draw the pixels on the canvas
        self._draw(self._color)

        # Pack the canvas into this Waffle object<commit_msg>Allow the dimensions of a Waffle to differ in height and width<commit_after>from tkinter import Canvas, BOTH, Frame
from .tkmixins import ScheduleMixin, DestroyMixin, FocusMixin, DisplayMixin, SizeMixin, ReprMixin
from . import utilities as utils

class Waffle(ScheduleMixin, DestroyMixin, FocusMixin, DisplayMixin, ReprMixin):

    def __init__(self, master, height=3, width=3, dim=20, pad=5, color="white", dotty=False, grid=None, align=None, command=None, remember=True):

    	# Description of this object (for friendly error messages)
        self.description = "[Waffle] object ("+str(height)+"x"+str(width)+")"

        self._command = command
        self._height = height       # How many pixels high
        self._width = width         # How many pixels wide
        self._pixel_size = dim      # Size of one pixel
        self._pad = pad             # How much padding between pixels
        self._color = color        # Start color of the whole waffle
        self._dotty = dotty         # A dotty waffle will display circles
        self._save_canvas = []      # Where the Waffle objects will be stored

        # Calculate how big this canvas will be
        self._c_height = self._height*(self._pixel_size+self._pad)
        self._c_width = self._width*(self._pixel_size+self._pad)

        # Create a tk Frame object within this object which will be the waffle
        self.tk = Frame(master.tk)

        # Create an internal canvas to draw the waffle on
        self._canvas = Canvas(self.tk, height=self._c_height, width=self._c_width)

        # Draw the pixels on the canvas
        self._draw(self._color)

        # Pack the canvas into this Waffle object
{'fraction_non_alphanumeric': 0.08232445520581114, 'fraction_numerical': 0.003026634382566586, 'mean_word_length': 2.790137614678899, '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': '3466262', 'n_tokens_mistral': 956, 'n_tokens_neox': 933, 'n_words': 320}