<commit_before>from collections import defaultdict
import os
import json
import numbers



class FileDoesNotExistError(IOError):
    """ Custom exception returned when the config file is non-existant. """
    pass

class FileExistsError(IOError):
    """
        Custom exception returned by writeConfig() when the config file is already present
        and overwrite=False
    """
    pass
    """ Custom exception returned when the config file is present but cannot be parsed. """
    pass

class InvalidConfigError(Exception):
    """ Custom exception returned when the configuration is not valid. """
    pass

class LSFloorConfig:
    """

        This class implements methods to read/write and otherwise
        manipulate Lightsweeper floor configurations.

        Attributes:
            fileName (str): The name of the config file on disk
            cells (int):    The number of cells in the lightsweeper matrix.
            rows (int):     The number of rows in the lightsweeper matrix.
            cols (int):     The number of columns in the lightsweeper matrix.
            config (list):  A list of 4-tuples of the form (row, col, port, address)
            board (dict):   A dictionary of dictionaries sorted by row and column, each
                            containing a tuple of the corresponding tile's port and address
    """

    fileName = None
    cells = 0
    rows = 0
    cols = 0
    config = list()
    board = defaultdict(lambda: defaultdict(int))
<commit_msg>Put back a line that went missing<commit_after>from collections import defaultdict
import os
import json
import numbers



class FileDoesNotExistError(IOError):
    """ Custom exception returned when the config file is non-existant. """
    pass

class FileExistsError(IOError):
    """
        Custom exception returned by writeConfig() when the config file is already present
        and overwrite=False
    """
    pass
    
class CannotParseError(IOError):
    """ Custom exception returned when the config file is present but cannot be parsed. """
    pass

class InvalidConfigError(Exception):
    """ Custom exception returned when the configuration is not valid. """
    pass

class LSFloorConfig:
    """

        This class implements methods to read/write and otherwise
        manipulate Lightsweeper floor configurations.

        Attributes:
            fileName (str): The name of the config file on disk
            cells (int):    The number of cells in the lightsweeper matrix.
            rows (int):     The number of rows in the lightsweeper matrix.
            cols (int):     The number of columns in the lightsweeper matrix.
            config (list):  A list of 4-tuples of the form (row, col, port, address)
            board (dict):   A dictionary of dictionaries sorted by row and column, each
                            containing a tuple of the corresponding tile's port and address
    """

    fileName = None
    cells = 0
    rows = 0
    cols = 0
    config = list()
    board = defaultdict(lambda: defaultdict(int))

{'fraction_non_alphanumeric': 0.06332020997375327, 'fraction_numerical': 0.0026246719160104987, 'mean_word_length': 2.528935185185185, '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': '6735882', 'n_tokens_mistral': 753, 'n_tokens_neox': 725, 'n_words': 346}