<commit_before>#!/usr/bin/env python
# coding: utf-8
import os
import signal
import sys

from rosreestr2coord.batch import batch_parser
from rosreestr2coord.parser import Area, TYPES
from rosreestr2coord.version import VERSION


def getopts():
    import argparse
    import textwrap

    '''
    Get the command line options.
    '''
    parser = argparse.ArgumentParser(
        formatter_class=argparse.RawDescriptionHelpFormatter,
        description=textwrap.dedent('''Get geojson with coordinates of area by cadastral number.
        https://pkk.rosreestr.ru/''')
    )
    parser.add_argument('-c', '--code', action='store', type=str,
                        required=False,
                        help='area cadastral number')
    parser.add_argument('-t', '--area_type', action='store', type=int,
                        required=False, default=1,
                        help='area types: %s' % '; '.join(
                            ['%s:%s' % (k, v) for k, v in list(TYPES.items())]))
    parser.add_argument('-p', '--path', action='store', type=str,
                        required=False,
                        help='media path')
    parser.add_argument('-o', '--output', action='store', type=str,
                        required=False,
                        help='output path')
    parser.add_argument('-m', '--list', action='store', type=str,
                        required=False,
                        help='path of file with cadastral codes list')
    parser.add_argument('-d', '--display', action='store_const', const=True,
                        required=False,
                        help='display plot (only for --code mode)')
    parser.add_argument('-D', '--delay', action='store', type=int,
                        required=False, default=1,
                        help='delay between request (only for --list mode)')
    parser.add_argument('-r', '--refresh', action='store_const', const=True,
                        required=False,
                        help='do not use cache')
    parser.add_argument('-e', '--epsilon', action='store', type=float,
                        required=False, default=5,
                        help='parameter specifying the approximation accuracy. '
                             'This is the maximum distance between the original curve and its approximation. '
                             'Small value = high detail = more points '
                             '(default %(default).2f)')
    parser.add_argument('-C', '--center_only', action='store_const', const=True,
                        required=False,
                        help='use only the center of area')
    parser.add_argument('-P', '--proxy', action='store_const', const=True,
                        required=False,
                        help='use proxies')
    parser.add_argument('-v', '--version', action='store_const', const=True,
                        required=False, help='show current version')
    opts = parser.parse_args()
    return opts


def run_console(opt):<commit_msg>Change `--delay` parameter type to float (#41)<commit_after>#!/usr/bin/env python
# coding: utf-8
import os
import signal
import sys

from rosreestr2coord.batch import batch_parser
from rosreestr2coord.parser import Area, TYPESf
from rosreestr2coord.version import VERSION


def getopts():
    import argparse
    import textwrap

    '''
    Get the command line options.
    '''
    parser = argparse.ArgumentParser(
        formatter_class=argparse.RawDescriptionHelpFormatter,
        description=textwrap.dedent('''Get geojson with coordinates of area by cadastral number.
        https://pkk.rosreestr.ru/''')
    )
    parser.add_argument('-c', '--code', action='store', type=str,
                        required=False,
                        help='area cadastral number')
    parser.add_argument('-t', '--area_type', action='store', type=int,
                        required=False, default=1,
                        help='area types: %s' % '; '.join(
                            ['%s:%s' % (k, v) for k, v in list(TYPES.items())]))
    parser.add_argument('-p', '--path', action='store', type=str,
                        required=False,
                        help='media path')
    parser.add_argument('-o', '--output', action='store', type=str,
                        required=False,
                        help='output path')
    parser.add_argument('-m', '--list', action='store', type=str,
                        required=False,
                        help='path of file with cadastral codes list')
    parser.add_argument('-d', '--display', action='store_const', const=True,
                        required=False,
                        help='display plot (only for --code mode)')
    parser.add_argument('-D', '--delay', action='store', type=float,
                        required=False, default=1,
                        help='delay between requests (only for --list mode)')
    parser.add_argument('-r', '--refresh', action='store_const', const=True,
                        required=False,
                        help='do not use cache')
    parser.add_argument('-e', '--epsilon', action='store', type=float,
                        required=False, default=5,
                        help='parameter specifying the approximation accuracy. '
                             'This is the maximum distance between the original curve and its approximation. '
                             'Small value = high detail = more points '
                             '(default %(default).2f)')
    parser.add_argument('-C', '--center_only', action='store_const', const=True,
                        required=False,
                        help='use only the center of area')
    parser.add_argument('-P', '--proxy', action='store_const', const=True,
                        required=False,
                        help='use proxies')
    parser.add_argument('-v', '--version', action='store_const', const=True,
                        required=False, help='show current version')
    opts = parser.parse_args()
    return opts


def run_console(opt):
{'fraction_non_alphanumeric': 0.12833961645631864, 'fraction_numerical': 0.0029503360104900836, 'mean_word_length': 1.8554047730463266, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '3278168', 'n_tokens_mistral': 1621, 'n_tokens_neox': 1561, 'n_words': 395}