<commit_before># Copyright (c) 2014 <NAME>
#

from __future__ import division
from __future__ import print_function

from .xilinx._xula import Xula, Xula2
from .xilinx._papilio import Pone
from .xilinx._anvyl import Anvyl
from .xilinx._mojo import Mojo

from .altera._de0nano import DE0Nano
from .altera._de0nano_soc import DE0NanoSOC

from .lattice._icestick import Icestick


xbrd = {
    'xula': Xula,
    'xula2': Xula2,
    'pone': Pone,
    'anvyl': Anvyl,
    'mojo': Mojo
}

abrd = {
    'de0nano': DE0Nano,
    'de0nano_soc': DE0NanoSOC,
}

lbrd = {
    'icestick': Icestick
}


def get_board(name):
    """ retrieve a board definition from the name provided.
    """
    brd = None
    if name in xbrd:
        brd = xbrd[name]()
    elif name in abrd:
        brd = abrd[name]()
    elif name in lbrd:
        brd = lbrd[name]()
    else:
        # @todo: print out a list of boards and descriptions
        raise ValueError("Invalid board %s"%(name,))

    return brd


def get_all_board_names():
    return xbrd.keys() + abrd.keys() + lbrd.keys()
<commit_msg>python3 fix<commit_after># Copyright (c) 2014 <NAME>
#

from __future__ import division
from __future__ import print_function

from .xilinx._xula import Xula, Xula2
from .xilinx._papilio import Pone
from .xilinx._anvyl import Anvyl
from .xilinx._mojo import Mojo

from .altera._de0nano import DE0Nano
from .altera._de0nano_soc import DE0NanoSOC

from .lattice._icestick import Icestick


xbrd = {
    'xula': Xula,
    'xula2': Xula2,
    'pone': Pone,
    'anvyl': Anvyl,
    'mojo': Mojo
}

abrd = {
    'de0nano': DE0Nano,
    'de0nano_soc': DE0NanoSOC,
}

lbrd = {
    'icestick': Icestick
}


def get_board(name):
    """ retrieve a board definition from the name provided.
    """
    brd = None
    if name in xbrd:
        brd = xbrd[name]()
    elif name in abrd:
        brd = abrd[name]()
    elif name in lbrd:
        brd = lbrd[name]()
    else:
        # @todo: print out a list of boards and descriptions
        raise ValueError("Invalid board %s"%(name,))

    return brd


def get_all_board_names():
    return list(xbrd.keys()) + list(abrd.keys()) + list(lbrd.keys())

{'fraction_non_alphanumeric': 0.11296296296296296, 'fraction_numerical': 0.014351851851851852, 'mean_word_length': 2.9724264705882355, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '3494516', 'n_tokens_mistral': 861, 'n_tokens_neox': 844, 'n_words': 227}