The sample code throws an error in Flask-Admin 1.5.3 when creating a user through the UI, but doesn't throw it in 1.5.4
More details you can find in the issue.
Before running, prepare the environment:
python -m venv venv
class SGDRegressor(BaseEstimator): | |
def __init__(self, eta=10**-3, n_iter=10): | |
self.mse_ = [] | |
self.weights_ = [] | |
self.eta_ = eta | |
self.n_iter_ = n_iter | |
def fit(self, X, y): | |
X = self._prepend_ones(X) | |
current_w = np.zeros(X.shape[1], dtype=np.float64, order="C") |
import fitz | |
import io | |
import requests | |
PDF_URL = "https://github.com/pymupdf/PyMuPDF/raw/master/examples/colordbHSV.pdf" | |
PNG_URL = "https://raw.githubusercontent.com/pymupdf/PyMuPDF/master/examples/hand.png" | |
def handle(_): | |
""" |
import fitz | |
import io | |
import requests | |
PDF_URL = "https://github.com/pymupdf/PyMuPDF/raw/master/examples/colordbHSV.pdf" | |
PNG_URL = "https://www.onlygfx.com/wp-content/uploads/2018/07/12-grunge-brush-stroke-banner-11.png" | |
def handle(_): | |
pdf = requests.get(PDF_URL).content |
import fitz | |
import io | |
import requests | |
PDF_URL = "https://github.com/pymupdf/PyMuPDF/raw/master/examples/colordbHSV.pdf" | |
PNG_URL = "https://www.onlygfx.com/wp-content/uploads/2018/07/12-grunge-brush-stroke-banner-11.png" | |
def handle(_): | |
pdf = requests.get(PDF_URL).content |
from flask import Flask | |
from werkzeug.middleware.dispatcher import DispatcherMiddleware | |
api = Flask("api") | |
admin = Flask("admin") | |
app = DispatcherMiddleware(api, {"/admin": admin}) |
The sample code throws an error in Flask-Admin 1.5.3 when creating a user through the UI, but doesn't throw it in 1.5.4
More details you can find in the issue.
Before running, prepare the environment:
python -m venv venv