<commit_before>"""
Name: <NAME>
Date: 11/15/16
Class: Introduction to Python
Session05
LAB: Dictionaries

Description:

"""

# -------------------------------Imports----------------------------------------


# -------------------------------Functions--------------------------------------


def print_colors(fore_color='Blue', back_color='Green', link_color='White',
                 visited_color='Yellow'):
    """
    Take in strings representing the color of the foreground, background, links
    and visited links of a website and display the them.
    """
    print("Foreground: {} Background: {} Links: {} Visited links: "
          "{}".format(fore_color, back_color, link_color, visited_color))


def print_colors2(**kwargs):
    """
    Take in strings representing the color of the foreground, background, links
    and visited links of a website and display the them.
    """
    print("Foreground: {fore_color} Background: {back_color}"
          " Links: {link_color} Visited"
          " links: {visited_color}".format(**kwargs))


def print_colors3(*args):
    """
    Take in strings representing the color of the foreground, background, links
    and visited links of a website and display the them.
    """
    print("Foreground: {} Background: {}"
          " Links: {} Visited"
          " links: {}".format(*args))


# ==============================================================================


def main():
    """
    Tests output.
    """
    print_colors()
    print_colors('Purple')
    print_colors(back_color='Black', visited_color='Pink')
    print_colors2(fore_color='Blue', back_color='Green', link_color='White',
                  visited_color='Yellow')
    print_colors3('Black', 'Pink', 'Blue', 'Yellow')


if __name__ == '__main__':
    main()
<commit_msg>Generalized print_colors so it can take args and kwargs as parameters.<commit_after>"""
Name: <NAME>
Date: 11/15/16
Class: Introduction to Python
Session05
LAB: Dictionaries

Description:

"""

# -------------------------------Imports----------------------------------------


# -------------------------------Functions--------------------------------------


def print_colors(fore_color='Blue', back_color='Green', link_color='White',
                 visited_color='Yellow'):
    """
    Take in strings representing the color of the foreground, background, links
    and visited links of a website and display the them.
    """
    print("Foreground: {fore_color} Background: {back_color} Links:"
          " {link_color} Visited links: {visited_color}"
          "".format(fore_color=fore_color, back_color=back_color,
                    link_color=link_color, visited_color=visited_color))


def print_colors2(**kwargs):
    """
    Take in strings representing the color of the foreground, background, links
    and visited links of a website and display the them.
    """
    print("Foreground: {fore_color} Background: {back_color}"
          " Links: {link_color} Visited"
          " links: {visited_color}".format(**kwargs))


def print_colors3(*args):
    """
    Take in strings representing the color of the foreground, background, links
    and visited links of a website and display the them.
    """
    print("Foreground: {} Background: {}"
          " Links: {} Visited"
          " links: {}".format(*args))


# ==============================================================================


def main():
    """
    Tests output.
    """
    print_colors()
    print_colors('Purple')
    print_colors(back_color='Black', visited_color='Pink')
    args1 = ('Blue', 'Red', 'Teal')
    args2 = ('Pink', 'Orange', 'Teal', 'Gold')
    dict1 = {'fore_color': 'Black',
             'back_color': 'Green',
             'link_color': 'Red',
             'visited_color': 'Yellow'}
    print_colors(*args1)
    print_colors(*args2)
    print_colors(**dict1)
    # print_colors2(fore_color='Blue', back_color='Green', link_color='White',
    # visited_color='Yellow')
    # print_colors3('Black', 'Pink', 'Blue', 'Yellow')


if __name__ == '__main__':
    main()

{'fraction_non_alphanumeric': 0.22770817980840088, 'fraction_numerical': 0.007369196757553427, 'mean_word_length': 2.6195555555555554, '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': '6425414', 'n_tokens_mistral': 1141, 'n_tokens_neox': 1087, 'n_words': 297}