Skip to content

Instantly share code, notes, and snippets.

View konradbachusz-zz's full-sized avatar

Konrad konradbachusz-zz

View GitHub Profile
@yashprakash13
yashprakash13 / app.py
Created April 4, 2021 17:26
FastApi example
import uvicorn
from fastapi import FastAPI
from model import SentimentModel, SentimentQueryModel
app = FastAPI()
model = SentimentModel()
@app.post('/predict')
def predict(data: SentimentQueryModel):
data = data.dict()
@ih2502mk
ih2502mk / list.md
Last active July 6, 2024 11:46
Quantopian Lectures Saved
@jamescalam
jamescalam / flask_api.py
Last active August 24, 2023 07:50
A example API using Flask
from flask import Flask
from flask_restful import Resource, Api, reqparse
import pandas as pd
import ast
app = Flask(__name__)
api = Api(app)
class Users(Resource):
def get(self):
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import numpy
import pandas
import statsmodels.api as sm
def custom_heuristic(file_path):
'''
You are given a list of Titantic passengers and their associated
information. More information about the data can be seen at the link below:
http://www.kaggle.com/c/titanic-gettingStarted/data