예제 #1
0
class ConfigTree(Config):
    """
    Parameters to configure the parameters of a tree to show
    """
    roots = ParamCreator.create_list_str(help_string="roots to output", )
    parent_column = ParamCreator.create_int(help_string="parent column", )
    child_column = ParamCreator.create_int(help_string="child column", )
예제 #2
0
class ConfigWeightValue(Config):
    """
    Config weight and Value
    """
    weight_column = ParamCreator.create_int(
        help_string="what column to determine weight by", )
    value_column = ParamCreator.create_int(
        help_string="what is the value column", )
예제 #3
0
class ConfigMajority(Config):
    """
    Config the parameters for the majority algorithm
    """
    input_first_column = ParamCreator.create_int(help_string="first column", )
    input_second_column = ParamCreator.create_int(
        help_string="second column", )
    input_multiplication_column = ParamCreator.create_int(
        help_string="multiplication column", )
예제 #4
0
class Authorized(Config):
    """
    stuff which is authorized
    """
    chars_ok_for_folders = ParamCreator.create_str(
        help_string="Which chars are allowed for folders",
        default=""
    )
    chars_ok_for_files = ParamCreator.create_str(
        help_string="Which chars are allowed for files",
        default="“”ìú"
    )
예제 #5
0
class ConfigOutput(Config):
    """
    Parameters to control output
    """
    verbose = ParamCreator.create_bool(
        help_string="be verbose?",
        default=False,
    )
    suppress_warnings = ParamCreator.create_bool(
        help_string="suppress warnings?",
        default=False,
    )
예제 #6
0
class ConfigTsvReader(Config):
    """
    Parameters to configure a TSV reader object
    """
    check_non_ascii = ParamCreator.create_bool(
        help_string="check non ascii",
        default=CHECK_NON_ASCII,
    )
    validate_all_lines_same_number_of_fields = ParamCreator.create_bool(
        help_string="validate all lines same number of fields",
        default=VALIDATE_ALL_LINES_SAME_NUMBER_OF_FIELDS,
    )
예제 #7
0
class ConfigOutput(Config):
    """
    Parameters to configure the output of pydmt
    """
    verbose = ParamCreator.create_bool(
        help_string="Should output be verbose?",
        default=True,
    )
    print_not = ParamCreator.create_bool(
        help_string="print out what we are not doing",
        default=False,
    )
예제 #8
0
class ConfigGrep(Config):
    """
    Parameters for the grep command
    """

    regexp = ParamCreator.create_str(
        help_string="what regexp to look for?",
    )
    files = ParamCreator.create_str_or_none(
        help_string="what regexp to look for?",
        default=None,
    )
예제 #9
0
class ConfigYoutubeDl(Config):
    """
    Configuration for youtube downloads
    """
    use_archive = ParamCreator.create_bool(
        help_string="Should we use an archive?",
        default=True,
    )
    archive_file = ParamCreator.create_existing_file(
        help_string="What file to use as archive?",
        default=os.path.expanduser('~/.config/youtube-dl-archive'),
    )
예제 #10
0
class ConfigParallel(Config):
    """
    Parameters to configure how thing should run in parallel
    """
    parallel = ParamCreator.create_bool(
        help_string="do things in parallel?",
        default=False,
    )
    jobs = ParamCreator.create_int(
        help_string="how many jobs to run in parallel",
        default=multiprocessing.cpu_count(),
    )
예제 #11
0
class ConfigSubprocess(Config):
    """
    Parameters to configure how we run subprocess
    """
    print_command = ParamCreator.create_bool(
        help_string="print out commands",
        default=True,
    )
    quiet = ParamCreator.create_bool(
        help_string="Suppress output?",
        default=False,
    )
예제 #12
0
파일: configs.py 프로젝트: veltzer/pyunique
class ConfigLMDB(Config):
    """
    Parameters that control working with LMDB (experts only)
    """
    map_size = ParamCreator.create_int(
        help_string="Which size of mmap to use?",
        default=1000000000000,
    )
    buffers = ParamCreator.create_bool(
        help_string="Should we use buffers? (lmdb default is False)",
        default=False,
    )
예제 #13
0
class ConfigPattern(Config):
    """
    Parameters to configure patterns of files generated
    """
    pattern = ParamCreator.create_str(
        help_string="pattern of intermediate generated files",
        default="{key}_{i:04d}.tsv.gz",
    )
    final_pattern = ParamCreator.create_str(
        help_string="pattern of final generated files",
        default="{key}.tsv.gz",
    )
예제 #14
0
파일: configs.py 프로젝트: veltzer/pyunique
class ConfigAlgo(Config):
    """
    Parameters at the core of the algorithm
    """
    digest = ParamCreator.create_choice(
        help_string="Which digest to use?",
        default="sha256",
        choice_list=list(hashlib.algorithms_available),
    )
    encoding = ParamCreator.create_str(
        help_string="Which encoding to use?",
        default='utf-8',
    )
예제 #15
0
class ConfigSiteId(Config):
    """
    Parameters for downloading workers
    """
    site = ParamCreator.create_choice(
        choice_list=["facebook", "instagram", "travelgirls", "vk", "mamba.ru"],
        help_string="Which site to download from?",
    )
    user_id = ParamCreator.create_str(help_string="""Which user id to user?
            https://www.facebook.com/profile.php?id=[user_id]
            https://www.instagram.com/[user_id]
            http://www.travelgirls.com/member/[user_id]
            https://vk.com/id[user_id]
            http://www.mamba.ru/mb[user_id]""", )
예제 #16
0
class ConfigUrl(Config):
    """
    Parameters for what url to download
    """
    url = ParamCreator.create_str(
        help_string="url to download (e.g. https://www.pornhub.com/model/lily)"
    )
예제 #17
0
class ConfigNames(Config):
    """
    Parameters for names authorization repository
    """
    repository = ParamCreator.create_existing_file(
        help_string="file where authorized strings are located",
        default="/home/mark/.mp3lib_authorized_non_ascii.json",
    )
    repository_backup = ParamCreator.create_existing_file(
        help_string="file where authorized strings are located",
        default="/home/mark/.mp3lib_authorized_non_ascii.json.back",
    )
    all_over = ParamCreator.create_bool(
        help_string="start from scratch",
        default=False,
    )
예제 #18
0
class ConfigDownload(Config):
    """
    Configure details about the download process
    """
    download_as_collecting = ParamCreator.create_bool(
        help_string="Do you want download while collecting the urls?",
        default=False,
    )
    download = ParamCreator.create_bool(
        help_string="really download or just print the urls?",
        default=True,
    )
    folder = ParamCreator.create_existing_folder(
        help_string="where to save the data to?",
        default=".",
    )
예제 #19
0
class ConfigAggregateColumns(Config):
    """
    Parameters to select which columns to aggregate
    """
    aggregate_columns = ParamCreator.create_list_int(
        help_string=
        "column to aggregate by (list of numbers separated by comma)", )
예제 #20
0
class ConfigMatchColumns(Config):
    """
    Parameters to select which columns to match by
    """
    match_columns = ParamCreator.create_list_int(
        help_string="column to match by (list of numbers separated by comma)",
    )
예제 #21
0
class ConfigRequests(Config):
    """
    Parameters to config the requests module
    """
    connect_timeout = ParamCreator.create_int_or_none(
        help_string="Timeout for connections in seconds (none means endless)",
        default=5,
    )
    read_timeout = ParamCreator.create_int_or_none(
        help_string="Timeout for reading in seconds (none means endless)",
        default=5,
    )
    debug = ParamCreator.create_bool(
        help_string="Do you want to debug the requests module?",
        default=False,
    )
예제 #22
0
파일: configs.py 프로젝트: veltzer/pyconch
class ConfigDummy(Config):
    """
    Parameters for the symlink install tool
    """
    param = ParamCreator.create_str(
        help_string="This is a param",
    )
예제 #23
0
class ConfigDebug(Config):
    """
    Parameters for debug
    """
    debug_verbose = ParamCreator.create_bool(
        help_string="be verbose?",
        default=False,
    )
    git_verbose = ParamCreator.create_bool(
        help_string="add --verbose when running git?",
        default=False,
    )
    git_quiet = ParamCreator.create_bool(
        help_string="add --quiet when running git?",
        default=False,
    )
예제 #24
0
class ConfigProxy(Config):
    """
    Configure proxy settings for the daemon
    """
    no_proxy = ParamCreator.create_str_or_none(
        default="localhost,169.254.169.254",
        help_string="what addresses to exempt from proxy",
    )
    http_proxy = ParamCreator.create_str_or_none(
        default=None,
        help_string="http proxy",
    )
    https_proxy = ParamCreator.create_str_or_none(
        default=None,
        help_string="https proxy",
    )
예제 #25
0
class ConfigDummy(Config):
    """
    Parameters for nothing
    """
    doit = ParamCreator.create_bool(
        help_string="actually perform the actions?",
        default=True,
    )
예제 #26
0
파일: configs.py 프로젝트: veltzer/pyunique
class ConfigScan(Config):
    """
    Parameters that control the scanning phase
    """
    folder = ParamCreator.create_existing_folder(
        help_string="Which folder to work on?",
        default=".",
    )
예제 #27
0
class ConfigProgress(Config):
    """
    Parameters to control progress reporting
    """
    progress = ParamCreator.create_bool(
        help_string="do you want progress report",
        default=True,
    )
예제 #28
0
class ConfigFilter(Config):
    """
    Parameters to select if the use the filter or not
    """
    filter = ParamCreator.create_bool(
        default=True,
        help_string="use filter for the instances",
    )
예제 #29
0
class ConfigDebugUrls(Config):
    """
    Configure how to debug urls
    """
    save = ParamCreator.create_bool(
        help_string="Do you want to save urls?",
        default=False,
    )
예제 #30
0
class ConfigDebugRequests(Config):
    """
    Configure how to user the requests module
    """
    debug = ParamCreator.create_bool(
        help_string="Do you want to debug the requests module?",
        default=False,
    )