Skip to content

Instantly share code, notes, and snippets.

View Createdd's full-sized avatar
🚀
Making it happen

Daniel Deutsch Createdd

🚀
Making it happen
View GitHub Profile
@Createdd
Createdd / covid_analysis_nb.ipynb
Created July 9, 2022 09:01
covid_analysis_nb.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Createdd
Createdd / text_processing_lstm.ipynb
Last active September 23, 2022 09:43
text_processing_lstm.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
"""
Title: Neural style transfer
Author: [fchollet](https://twitter.com/fchollet)
Date created: 2016/01/11
Last modified: 2020/05/02
Description: Transfering the style of a reference image to target image using gradient descent.
"""
# https://github.com/keras-team/keras-io/blob/master/examples/generative/neural_style_transfer.py
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"iam:AttachRolePolicy",
"iam:GetRole",
"iam:CreateRole",
"iam:PassRole",
FROM python:3.7
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
ENV FLASK_APP=app.py
ENV FLASK_ENV=development
# install system dependencies
RUN apt-get update \
&& apt-get -y install gcc make \
&& rm -rf /var/lib/apt/lists/*s
RUN python3 --version
def pre_process(df):
cols_too_many_missing = ['new_tests',
'new_tests_per_thousand',
'total_tests_per_thousand',
'total_tests',
'tests_per_case',
'positive_rate',
'new_tests_smoothed',
'new_tests_smoothed_per_thousand',
'tests_units',
@app.route('/predict',methods=['POST'])
def predict():
input_val = [x for x in request.form.values()][0]
rf = load_model(BUCKET_NAME, MODEL_FILE_NAME, MODEL_LOCAL_PATH)
if input_val not in available_countries:
return f'Country {input_val} is not in available list. Try one from the list! Go back in your browser', 400
to_pred = get_prediction_params(input_val, url_to_covid)
prediction = rf.predict(to_pred)[0]
return render_template('home.html',pred=f'New cases will be {prediction}')
import os
import glob
import shutil
import typing
import numpy as np
from PIL import Image, ImageStat, ImageChops
from pathlib import Path
def pre_processsing(input_dir: str, output_dir: str, logfile: str) -> int:
@Createdd
Createdd / statistics4.ipynb
Last active April 4, 2020 15:01
Exercisesheet Statistics on Variability and Boxplots
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import numpy as np
one_dim = np.ones(shape=(5), dtype=np.int)
# print(one_dim)
# [1 1 1 1 1]
two_dim = np.ones(shape=(5, 2), dtype=np.int)
# print(two_dim)