<commit_before>#! /usr/bin/env python2
from __future__ import print_function

''' setup.py
Initial setup script for the Red Spider Project

Copyright 2012, 2013 <NAME>
Licensed under the Red Spider Project License.
See the License.txt that shipped with your copy of this software for details.


A -q option to make it less verbous would probably be nice. Until we
have a dedicated 'update' command we'll need to run the setup every
time one of the commands has been changed on master.
'''

from future_builtins import zip, map
import os
from os.path import exists, join, split, splitext, abspath, expanduser
from shutil import copy2
import py_compile
import sys
import stat

bin_dir     = 'bin'
extbin_dir  = 'extbin'  # stands for 'external binaries'
lib_dir     = 'lib'
build_dir   = 'build'
src_dir     = 'src'
inc_dir     = 'include'
cfg_dir     = 'config'
work_dir    = 'work'

documented_cmds = [["xkcd-fetch",    "xkcd-fetch --help"],
                   ["xkcd-search",   "xkcd-search --help"],
                   ["level_up",      "level_up --help"],
                   ["summon",        "summon"],
                   ["fortune",       "fortune --help"],
                   ["godel",         "godel"],
                   ["random-number", "random-number --help"],
                   ["randomtext",    "randomtext"]]

executable_scripts = [  'json-parse.py', 'xkcd-fetch.py', 'xkcd-search.py',
                        'level_up.py', 'summon.py', 'fortune.py', 'godel.py',
                        'random-number.py', 'rshelp.py', 'Geico.py', 'randomtext.py' ]

python_modules = 'src/xkcd-fetch.py src/level_up.py'.split()


class SomeChoice:
    def __init__(self, hint, *responses):
        self.validation = [hint] + list(responses)
        self.hint = hint

    def __call__(self, check):
        check = check.strip().lower()
        if check in self.validation:
            return self

YES = SomeChoice(
    "y", "ye", "yes", "aye", "affirmative", "roger", "okay", "kay", 
    "sure", "fine", "all right", "certainly", "definitely"
    )
NO = SomeChoice(
    "n", "no", "nope", "nay", "nah", "naw", "hell no", "no way",
    "negative", "absolutely not"
    )


def main ( ):
    print(welcome_msg)
    red_spider_root = verify_root()<commit_msg>Add PM 2Ring's contributions to the setup script<commit_after>#! /usr/bin/env python2
from __future__ import print_function

''' setup.py
Initial setup script for the Red Spider Project

Copyright 2012, 2013 <NAME>
Licensed under the Red Spider Project License.
See the License.txt that shipped with your copy of this software for details.


A -q option to make it less verbous would probably be nice. Until we
have a dedicated 'update' command we'll need to run the setup every
time one of the commands has been changed on master.
'''

from future_builtins import zip, map
import os
from os.path import exists, join, split, splitext, abspath, expanduser
from shutil import copy2
import py_compile
import sys
import stat

bin_dir     = 'bin'
extbin_dir  = 'extbin'  # stands for 'external binaries'
lib_dir     = 'lib'
build_dir   = 'build'
src_dir     = 'src'
inc_dir     = 'include'
cfg_dir     = 'config'
work_dir    = 'work'

documented_cmds = [["xkcd-fetch",       "xkcd-fetch --help"],
                   ["xkcd-search",      "xkcd-search --help"],
                   ["level_up",         "level_up --help"],
                   ["summon",           "summon"],
                   ["fortune",          "fortune --help"],
                   ["godel",            "godel"],
                   ["random-number",    "random-number --help"],
                   ["randomtext",       "randomtext"],
                   ["phpBBthreadfetch", "phpBBthreadfetch -h"]]

executable_scripts = [  'json-parse.py', 'xkcd-fetch.py', 'xkcd-search.py',
                        'level_up.py', 'summon.py', 'fortune.py', 'godel.py',
                        'random-number.py', 'rshelp.py', 'Geico.py', 'randomtext.py', 'phpBBthreadfetch.py', 'myentity.py' ]

python_modules = 'src/xkcd-fetch.py src/level_up.py src/myentity.py'.split()


class SomeChoice:
    def __init__(self, hint, *responses):
        self.validation = [hint] + list(responses)
        self.hint = hint

    def __call__(self, check):
        check = check.strip().lower()
        if check in self.validation:
            return self

YES = SomeChoice(
    "y", "ye", "yes", "aye", "affirmative", "roger", "okay", "kay", 
    "sure", "fine", "all right", "certainly", "definitely"
    )
NO = SomeChoice(
    "n", "no", "nope", "nay", "nah", "naw", "hell no", "no way",
    "negative", "absolutely not"
    )


def main ( ):
    print(welcome_msg)
    red_spider_root = verify_root()
{'fraction_non_alphanumeric': 0.13813685781283308, 'fraction_numerical': 0.004476657429119591, 'mean_word_length': 2.5014925373134327, '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': '270235', 'n_tokens_mistral': 1539, 'n_tokens_neox': 1468, 'n_words': 446}