Exemple #1
0
def get_training_data():
    x_train = []
    y_train = []

    for record in Record.select():
        x_train.append([record.weekday, record.monthday, record.special])
        y_train.append(record.result)

    return (np.array(x_train), y_train)
Exemple #2
0
def get_records():
	return jsonify([model_to_dict(record) for record in Record.select()])