Skip to content

Instantly share code, notes, and snippets.

View Furkan-Gulsen's full-sized avatar

Furkan Gulsen Furkan-Gulsen

View GitHub Profile
@bradtraversy
bradtraversy / node_nginx_ssl.md
Last active July 22, 2024 05:09
Node app deploy with nginx & SSL

Node.js Deployment

Steps to deploy a Node.js app to DigitalOcean using PM2, NGINX as a reverse proxy and an SSL from LetsEncrypt

1. Sign up for Digital Ocean

If you use the referal link below, you get $10 free (1 or 2 months) https://m.do.co/c/5424d440c63a

2. Create a droplet and log in via ssh

I will be using the root user, but would suggest creating a new user

@mmeendez8
mmeendez8 / cnn_image_model.py
Last active February 25, 2021 21:41
CNN using pretrained VGG16 model with a new classification layer. This script reads a csv with file paths and labels and fine-tunes (or retrains) the whole network based on new images and labels. Batch size and epochs can be also personalized
from keras.applications import VGG16
from keras.layers import Dropout, Flatten, Dense
from keras.applications.vgg16 import preprocess_input
from keras.preprocessing import image as kimage
from keras.models import Model
from keras.utils import to_categorical
import numpy as np
import pandas as pd
''' This file reads from a csv file the paths of the images and its corresponding labels (in my case
@yrevar
yrevar / imagenet1000_clsidx_to_labels.txt
Last active July 21, 2024 08:16
text: imagenet 1000 class idx to human readable labels (Fox, E., & Guestrin, C. (n.d.). Coursera Machine Learning Specialization.)
{0: 'tench, Tinca tinca',
1: 'goldfish, Carassius auratus',
2: 'great white shark, white shark, man-eater, man-eating shark, Carcharodon carcharias',
3: 'tiger shark, Galeocerdo cuvieri',
4: 'hammerhead, hammerhead shark',
5: 'electric ray, crampfish, numbfish, torpedo',
6: 'stingray',
7: 'cock',
8: 'hen',
9: 'ostrich, Struthio camelus',