Skip to content

Instantly share code, notes, and snippets.

FROM python:3.6.9-slim-buster as base
WORKDIR /usr/src/app
ADD Pipfile .
ADD Pipfile.lock .
ADD jupyter_notebook_config.py /root/.jupyter/jupyter_notebook_config.py
RUN apt-get update -qq && \
apt-get install -yqq apt-utils && \
apt-get install -yqq procps && \
apt-get install -yqq gcc &&\
apt-get install -yqq cron &&\
TAG="jupyter/jupyter:dev"
build:
docker build -f Dockerfile -t ${TAG} .
run-jupyter:
docker run --rm -it -v $(shell pwd):/usr/src/app -p 8888:8888 -d $(TAG) "jupyter notebook --ip=0.0.0.0 --port=8888 --allow-root"
# Configuration file for jupyter-notebook.
#------------------------------------------------------------------------------
# Application(SingletonConfigurable) configuration
#------------------------------------------------------------------------------
## This is an application.
## The date format used by logging formatters for %(asctime)s
#c.Application.log_datefmt = '%Y-%m-%d %H:%M:%S'
CREATE TABLE KidWts (Name nvarchar(20),Age int ,Weight float);
INSERT INTO KidWts VALUES
(‘Lily’,3,15)
, (‘Muhammad’,30,98)
, (‘Daphne’, 3, 16)
, (‘Max’, 2, 12)
,(‘Chloe’,1,11)
,(‘Jackie’,2,14)
,(‘Albert’,3,17)
;
sepal.length sepal.width petal.length petal.width variety
5.1 3.5 1.4 .2 Setosa
4.9 3 1.4 .2 Setosa
4.7 3.2 1.3 .2 Setosa
4.6 3.1 1.5 .2 Setosa
5 3.6 1.4 .2 Setosa
5.4 3.9 1.7 .4 Setosa
4.6 3.4 1.4 .3 Setosa
5 3.4 1.5 .2 Setosa
4.4 2.9 1.4 .2 Setosa
# def model
inputs = {}
for feature_name in (feature_list):
inputs[feature_name] = tf.keras.Input(shape=(1), name=feature_name)
label = tf.keras.layers.Dense(
1, activation='sigmoid', name='label')(x)
model = tf.keras.Model(inputs=inputs, outputs=label)
model.compile(