This file contains 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
from __future__ import annotations | |
from uuid import UUID | |
from litestar import Litestar, get | |
from litestar.contrib.sqlalchemy.base import UUIDBase | |
from litestar.contrib.sqlalchemy.dto import SQLAlchemyDTO, SQLAlchemyDTOConfig | |
from litestar.contrib.sqlalchemy.plugins import ( | |
AsyncSessionConfig, | |
SQLAlchemyAsyncConfig, |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
""" | |
Fairlearn expects scikit-learn models. This submodule has some shims to work | |
around that issue. | |
""" | |
import numpy as np | |
import tensorflow as tf | |
class KerasWrapper: | |
def __init__(self, model, model_path="/tmp/corrected-model.h5"): |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
import matplotlib.pyplot as plt | |
import numpy as np | |
import requests | |
# data source | |
URL = "http://www.stat.columbia.edu/~gelman/book/data/light.asc" | |
# simulation hyperparams | |
N_SIM = 200 # number of simulations |
This file contains 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
# -*- coding: utf-8 -*- | |
import dash | |
import dash_core_components as dcc | |
import dash_html_components as html | |
import dash_bootstrap_components as dbc | |
from dash.dependencies import Input, Output | |
import pandas as pd | |
import datetime as dt | |
from io import StringIO |
This file contains 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
# -*- coding: utf-8 -*- | |
import dash | |
import dash_core_components as dcc | |
import dash_html_components as html | |
import dash_bootstrap_components as dbc | |
from dash.dependencies import Input, Output | |
import pandas as pd | |
import datetime as dt | |
from io import StringIO |
This file contains 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
import json | |
import dash | |
import dash_bootstrap_components as dbc | |
import dash_html_components as html | |
from dash.dependencies import ALL, Input, Output, State | |
from dash.exceptions import PreventUpdate | |
FONT_AWESOME = "https://use.fontawesome.com/releases/v5.13.0/css/all.css" | |
app = dash.Dash(external_stylesheets=[dbc.themes.BOOTSTRAP, FONT_AWESOME]) |
This file contains 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
import dash | |
import dash_bootstrap_components as dbc | |
import dash_core_components as dcc | |
import dash_html_components as html | |
from dash.dependencies import Input, Output, State | |
def parse_query_params(s): | |
s = s.lstrip("?") | |
return dict(pair.split("=") for pair in s.split("&")) |