Created
October 30, 2019 15:59
-
-
Save crankycoder/3f933e0048bf7e2e5fec715959f80567 to your computer and use it in GitHub Desktop.
MAD Cat
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
Run this with: | |
env FLASK_APP=foo.py flask run | |
. | |
|'.._ __......._ _.-'. | |
\M\ ^'.-' ''-/ / | |
:M'._ ^'\ ; | |
'MMM'. ' | |
'.MMMM/ ;._ ,,| | |
\M; . /.#\ /'' | | |
; /d' #.___./d \ ": | |
"| '---:dM +\-/ ; | |
: _.d._'^. \ | |
', / | ; ; | |
..,___'.._,:\..' \\ ha | |
''' | |
from flask import Flask, escape, request | |
app = Flask(__name__) | |
@app.route("/v1/api/score_features/<webext_guid>/<scanner_id>/", methods=["POST"]) | |
def score_feature(scanner_id, feature_vector): | |
pass | |
model = model_factory(scanner_id) | |
score = model.compute_score(ffeature_vector) | |
db.write(score, scanner_id) | |
return score | |
# TODO: fill in feature scoring code here | |
# TODO: write the score for this particular scanner into database/datastore | |
# TODO return the score for this scanner | |
@app.route("/v1/api/ensemble_score/<webext_guid>/", methods=['POST']) | |
def ensemble_score(webext_guid): | |
return result |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment