示例#1
0
文件: routes.py 项目: peustr/krime
def api_get_predictions():
    count = request.args.get('count', 50)
    crime_set = get_crimes(count)
    predictions = predict_crime(crime_set)
    return json.dumps([p.__serialize__() for p in predictions])
示例#2
0
文件: routes.py 项目: peustr/krime
def api_get_crimes():
    count = request.args.get('count', 50)
    return json.dumps([c.__serialize__() for c in get_crimes(count)])