예제 #1
0
def parse_command_line():
    parser = ArgumentParser(
        description='Analyse sequence data and predict outcomes')
    add_database_option(parser)
    add_half_option(parser)
    add_history_option(parser)
    add_league_option(parser, False)
    add_country_option(parser, False)
    add_minimum_option(parser)
    add_team_option(parser)
    add_venue_option(parser)
    add_events_option(parser)
    add_logging_options(parser)

    parser.add_argument('--probability',
                        type=float,
                        help='only show events below or at this threshold',
                        default=0.1)

    parser.add_argument(
        '-S',
        '--show-match',
        action='store_true',
        help='show the next match even if it is beyond the next 24 hours',
        default=False)

    parser.add_argument('--no-header',
                        action='store_true',
                        help='do not show the league header banner',
                        default=False)

    return parser.parse_args()
예제 #2
0
def parse_command_line():
    parser = ArgumentParser(description='Compare team performance from this season against previous seasons')
    add_database_option(parser)
    add_history_option(parser)
    add_league_option(parser)
    add_team_option(parser)
    add_half_option(parser)
    add_venue_option(parser)
    add_logging_options(parser)
    add_block_option(parser)

    parser.add_argument('-A',
                        '--average',
                        help='compare against averages over previous seasons',
                        action='store_true',
                        default=False)

    parser.add_argument('-r',
                        '--relative',
                        choices=Position,
                        type=Position.from_string,
                        metavar='{{{}}}'.format(','.join(position.name for position in Position)),
                        help='compare against relative table positions over previous seasons')

    parser.add_argument('-p',
                        '--position',
                        type=int,
                        nargs='+',
                        help='compare against absolute table positions over previous seasons')

    return parser.parse_args()
예제 #3
0
def parse_command_line():
    parser = ArgumentParser(description='Show head-to-head record')
    add_database_option(parser)
    add_logging_options(parser)
    add_league_option(parser, False)
    add_team_option(parser, True)
    add_block_option(parser)
    return parser.parse_args()
예제 #4
0
def parse_command_line():
    parser = ArgumentParser(
        description='Update football results database with events information')
    add_database_option(parser)
    add_logging_options(parser)
    add_league_option(parser, True)
    add_past_option(parser)
    add_force_option(parser)
    return parser.parse_args()
예제 #5
0
파일: ml.py 프로젝트: abetts155/Projects
def parse_command_line():
    parser = ArgumentParser(description='Machine learning trials')
    add_database_option(parser)
    add_history_option(parser)
    add_league_option(parser)
    add_team_option(parser)
    add_half_option(parser)
    add_events_option(parser, number=1)
    add_logging_options(parser)
    return parser.parse_args()
예제 #6
0
def parse_command_line():
    parser = ArgumentParser(description='Show recent form')
    add_database_option(parser)
    add_logging_options(parser)
    add_team_option(parser, True)
    add_league_option(parser, True)
    add_venue_option(parser)
    add_half_option(parser)
    add_block_option(parser)
    return parser.parse_args()
예제 #7
0
def parse_command_line():
    parser = ArgumentParser(
        description='Show summary of seasons by results, goals, and scorelines'
    )
    add_database_option(parser)
    add_league_option(parser)
    add_logging_options(parser)
    add_half_option(parser)
    add_block_option(parser)
    return parser.parse_args()
예제 #8
0
def parse_command_line():
    parser = ArgumentParser(
        description='Replay season to assess predicition accuracy')
    add_database_option(parser)
    add_half_option(parser)
    add_venue_option(parser)
    add_events_option(parser, True, 1)
    add_league_option(parser)
    add_logging_options(parser)
    return parser.parse_args()
예제 #9
0
def parse_command_line():
    parser = ArgumentParser(description='Show breakdown of results')
    add_database_option(parser)
    add_history_option(parser)
    add_league_option(parser)
    add_half_option(parser)
    add_venue_option(parser)
    add_logging_options(parser)
    add_team_option(parser, True)
    add_block_option(parser)
    return parser.parse_args()
예제 #10
0
def parse_command_line():
    parser = ArgumentParser(
        description='Update football results database with team information')
    add_database_option(parser)
    add_logging_options(parser)
    add_country_option(parser)

    parser.add_argument('-f',
                        '--force',
                        action='store_true',
                        help='force an update',
                        default=False)

    return parser.parse_args()
예제 #11
0
def parse_command_line():
    parser = ArgumentParser(
        description='Show matches that ended in one of the given results')
    add_database_option(parser)
    add_league_option(parser, True)
    add_logging_options(parser)

    parser.add_argument('--results',
                        help='use these results',
                        nargs='+',
                        metavar='<SCORE>',
                        type=str.strip,
                        required=True)

    return parser.parse_args()
예제 #12
0
def parse_command_line():
    parser = ArgumentParser(description='Show fixtures for specified date')
    add_half_option(parser)
    add_venue_option(parser)
    add_database_option(parser)
    add_minimum_option(parser)
    add_logging_options(parser)
    add_league_option(parser, False)
    add_country_option(parser, False)
    add_events_option(parser, False)

    today = datetime.today()
    parser.add_argument('-D',
                        '--day',
                        help='day of fixtures',
                        metavar='<INT>',
                        type=int,
                        default=today.day)

    parser.add_argument('-M',
                        '--month',
                        help='month of fixtures',
                        metavar='<INT>',
                        type=int,
                        default=today.month)

    parser.add_argument('-Y',
                        '--year',
                        help='month of fixtures',
                        metavar='<INT>',
                        type=int,
                        default=today.year)

    parser.add_argument('-l',
                        '--lower',
                        help='left-side of the time window to consider',
                        metavar='<INT>',
                        type=int,
                        default=0)

    parser.add_argument('-u',
                        '--upper',
                        help='right-side of the time window to consider',
                        metavar='<INT>',
                        type=int,
                        default=23)

    return parser.parse_args()
예제 #13
0
def parse_command_line():
    parser = ArgumentParser(description='Show minutes when goals are scored')
    add_database_option(parser)
    add_block_option(parser)
    add_history_option(parser)
    add_team_option(parser)
    add_venue_option(parser)
    add_league_option(parser, True)
    add_logging_options(parser)

    parser.add_argument('-I',
                        '--intervals',
                        help='specify the number of time intervals',
                        type=int,
                        default=5)

    return parser.parse_args()
예제 #14
0
def parse_command_line():
    parser = ArgumentParser(description='Show matrix of data')
    add_database_option(parser)
    add_history_option(parser)
    add_league_option(parser)
    add_half_option(parser)
    add_venue_option(parser)
    add_logging_options(parser)
    add_chunk_option(parser)
    add_events_option(parser, True, 1)
    add_block_option(parser)

    parser.add_argument('-S',
                        '--symmetry',
                        action='store_true',
                        help='assume the event applies to both teams equally',
                        default=False)

    return parser.parse_args()
예제 #15
0
def parse_command_line():
    parser = ArgumentParser(description='Show sequence data in bar charts')
    add_database_option(parser)
    add_half_option(parser)
    add_events_option(parser)
    add_history_option(parser)
    add_league_option(parser)
    add_team_option(parser)
    add_venue_option(parser)
    add_logging_options(parser)
    add_chunk_option(parser)
    add_block_option(parser)

    parser.add_argument('-l',
                        '--lines',
                        action='store_true',
                        help='only show lines (not bars)',
                        default=False)

    return parser.parse_args()
예제 #16
0
def parse_command_line():
    parser = ArgumentParser(description='Show heatmap of data')
    add_database_option(parser)
    add_history_option(parser)
    add_league_option(parser)
    add_team_option(parser)
    add_half_option(parser)
    add_venue_option(parser)
    add_logging_options(parser)
    add_chunk_option(parser)

    parser.add_argument('-A',
                        '--analysis',
                        choices=Analysis,
                        type=Analysis.from_string,
                        metavar='{{{}}}'.format(','.join(
                            analysis.name for analysis in Analysis)),
                        help='choose type of analysis',
                        required=True)

    return parser.parse_args()
예제 #17
0
def parse_command_line():
    parser = ArgumentParser(description='Analyse individual team')
    add_database_option(parser)
    add_history_option(parser)
    add_league_option(parser)
    add_team_option(parser)
    add_venue_option(parser)
    add_block_option(parser)
    add_logging_options(parser)

    parser.add_argument(
        '--game-states',
        help='analyse assuming one of these game states at half time',
        nargs='+',
        metavar='<SCORE>',
        type=str.strip)

    parser.add_argument('-A',
                        '--averages',
                        help='use seasonal averages',
                        action='store_true',
                        default=False)

    return parser.parse_args()
예제 #18
0
def parse_command_line():
    parser = ArgumentParser(description='Update football results database with season information')
    add_database_option(parser)
    add_logging_options(parser)
    return parser.parse_args()