Exemple #1
0
def process(line):
    tokens = tuple(line.split(' '))
    command, args = tokens[0], tokens[1:]

    # Select the appropriate function to call
    if command == 'load':
        load_file(*args)
    elif command == 'load_random':
        load_random()
    elif command == 'load_file_gui':
        load_file_gui()
    elif command == 'preprocess_gui':
        gen = ViewGenerator()
        gen.get_preprocess_options(app)
    elif command == 'preprocess':
        dispatch_preprocess(args)
    elif command in Status.PLOT_COMMANDS:
        visualize_dataset(command, args)
    elif command == 'visualize':
        visualize_dataset(flags=args, plot_all=True)
    elif command == 'see_images':
        see_images(*args)
    elif command == 'run':
        dispatch_run(args)
    elif command == 'help':
        print help_page()
    elif command == 'quit':
        quit_gui()
    elif command == '':
        return
    else:
        raise InvalidCommandException(
            "{} is not a recognized command.".format(command))
Exemple #2
0
def process(line):
    tokens = tuple(line.split(' '))
    command, args = tokens[0], tokens[1:]

    # Select the appropriate function to call
    if command == 'load':
        load_file(*args)
    elif command == 'load_random':
        load_random()
    elif command == 'load_file_gui':
        load_file_gui()
    elif command == 'preprocess_gui':
        gen = ViewGenerator()
        gen.get_preprocess_options(app)
    elif command == 'preprocess':
        dispatch_preprocess(args)
    elif command in Status.PLOT_COMMANDS:
        visualize_dataset(command, args)
    elif command == 'visualize':
        visualize_dataset(flags=args, plot_all=True)
    elif command == 'see_images':
        see_images(*args)
    elif command == 'run':
        dispatch_run(args)
    elif command == 'help':
        print help_page()
    elif command == 'quit':
        quit_gui()
    elif command == '':
        return
    else:
        raise InvalidCommandException(
            "{} is not a recognized command.".format(command))
Exemple #3
0
def load_file_gui():
    from pk.controller import ViewGenerator
    popup = ViewGenerator()
    filter = "CSV files (*.csv);;XLS files (*.xls);;ARFF files (*.arff)"
    filename = popup.open_file_dialog(app, filter)

    if filename == '':
        return
    load_file(filename)
Exemple #4
0
def load_file_gui():
    from pk.controller import ViewGenerator
    popup = ViewGenerator()
    filter = "CSV files (*.csv);;XLS files (*.xls);;ARFF files (*.arff)"
    filename = popup.open_file_dialog(app, filter)

    if filename == '':
        return
    load_file(filename)