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
# ___ | |
# / ()\\ | |
# _|_____|_ | |
# | | === | | | |
# |_| O |_| | |
# || O || | |
# ||__*__|| | |
# |~ \\___/ ~| | |
# /=\\ /=\\ /=\\ | |
#______[_]_[_]_[_]_______ |
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
# ___ | |
# / ()\\ | |
# _|_____|_ | |
# | | === | | | |
# |_| O |_| | |
# || O || | |
# ||__*__|| | |
# |~ \\___/ ~| | |
# /=\\ /=\\ /=\\ | |
#______[_]_[_]_[_]_______ |
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 keras.applications.resnet50 import ResNet50 | |
from keras.preprocessing import image | |
from keras.applications.resnet50 import preprocess_input, decode_predictions | |
import numpy as np | |
import os | |
import cherrypy | |
import tensorflow as tf | |
import uuid | |
import simplejson |
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
# Used in blog post https://harshsinghal.dev/post/learn-sql-in-a-browser-with-postgresql-and-pgweb.html | |
import pandas as pd | |
from sqlalchemy import create_engine | |
iris = pd.read_csv('https://raw.githubusercontent.com/mwaskom/seaborn-data/master/iris.csv') | |
engine = create_engine('postgresql://postgres:postgres@localhost:5432/postgres') | |
iris.to_sql("iris", engine, if_exists = 'replace', index=False, chunksize=1000) |