コード例 #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
ファイル: configs.py プロジェクト: serguk89/pyscrapers
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
ファイル: configs.py プロジェクト: serguk89/pyscrapers
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
ファイル: configs.py プロジェクト: serguk89/pyscrapers
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
ファイル: configs.py プロジェクト: serguk89/pyscrapers
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
ファイル: configs.py プロジェクト: serguk89/pyscrapers
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,
    )