Skip to content

Instantly share code, notes, and snippets.

Harsh Singhal harshsinghal

View GitHub Profile
harshsinghal /
Last active Jul 7, 2019
ResNet50 image labeling service using CherryPy web framework
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
harshsinghal /
Last active Jul 2, 2019
Grab data using pandas and insert into PostgreSQL db
# Used in blog post
import pandas as pd
from sqlalchemy import create_engine
iris = pd.read_csv('')
engine = create_engine('postgresql://postgres:postgres@localhost:5432/postgres')
iris.to_sql("iris", engine, if_exists = 'replace', index=False, chunksize=1000)
You can’t perform that action at this time.