Documentations
sqlite3: https://www.sqlite.org/cli.html
import scipy.stats as scs | |
def min_sample_size(bcr, mde, power=0.8, sig_level=0.05): | |
"""Returns the minimum sample size to set up a split test | |
Arguments: | |
bcr (float): probability of success for control, sometimes | |
referred to as baseline conversion rate | |
mde (float): minimum change in measurement between control |
import numpy as np | |
import matplotlib.pyplot as plt | |
import scipy.stats as scs | |
def z_val(sig_level=0.05, two_tailed=True): | |
"""Returns the z value for a given significance level""" | |
z_dist = scs.norm() | |
if two_tailed: | |
sig_level = sig_level/2 | |
area = 1 - sig_level |
from flask import Flask | |
from flask_restful import reqparse, abort, Api, Resource | |
import pickle | |
import numpy as np | |
from model import NLPModel | |
app = Flask(__name__) | |
api = Api(app) | |
model = NLPModel() |
import datetime | |
import time | |
# get current date in format yymmdd; useful for naming files | |
today = datetime.date.today().strftime("%y%m%d") | |
# get current unix time in seconds as integer | |
now = int(time.time()) | |
# get time at midnight for current day in seconds as integer |
# ┌──────────────── Minute (0 ... 59) | |
# │ ┌───────────── Hour (0 ... 23) | |
# │ │ ┌────────── Day (1 ... 31) | |
# │ │ │ ┌─────── Month (1 ... 12) | |
# │ │ │ │ ┌──── Weekday (0=Sun ... 6=Sat) | |
# ┴ ┴ ┴ ┴ ┴ | |
# * * * * * | |
# run at 1:00 AM everyday from Monday through Friday | |
0 1 * * 1-6 cd projects/cron_hello_world/ && python hello_world.py |
Documentations
sqlite3: https://www.sqlite.org/cli.html
Objective: Delete remote branches that have already been merged into master
plac makes parsing arguments from the command line easy.
plac Documentation: https://micheles.github.io/plac/
This short guide will only cover the decorator function plac.annotations()
.
808-381-0751 | mnguyenngo@gmail.com | Github | LinkedIn
Software developer with experience in machine learning and data science in the process of making a career transition from structural engineering. I enjoy working on personal projects and collaborating with others as much as possible. In addition to keeping up with the latest machine learning tools, I was driven to understand how to build REST APIs and web applications in order to easily deploy and demonstrate my work to the online community.
"""Histogram bars are not centered at their label by default. | |
The function below returns the bins parameter value for use with matplotlib's | |
hist() method. | |
""" | |
import numpy as np | |
import pandas as pd | |
def bin_array(distribution): | |
"""Returns an array to be used as the parameter value to center the |