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
Traceback (most recent call last): | |
File "/home/raghav/Dropbox/coding/python/snippets/intermediate_python_stuff/send_email.py", line 5, in <module> | |
mail = smtplib.SMTP('smpt.gmail.com', 587) | |
File "/usr/lib/python3.5/smtplib.py", line 251, in __init__ | |
(code, msg) = self.connect(host, port) | |
File "/usr/lib/python3.5/smtplib.py", line 335, in connect | |
self.sock = self._get_socket(host, port, self.timeout) | |
File "/usr/lib/python3.5/smtplib.py", line 306, in _get_socket | |
self.source_address) | |
File "/usr/lib/python3.5/socket.py", line 693, in create_connection |
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
import nltk | |
from nltk.tokenize import word_tokenize | |
from nltk.stem import WordNetLemmatizer | |
import pickle | |
import numpy as np | |
import pandas as pd | |
lemmatizer = WordNetLemmatizer() | |
''' |
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
import tensorflow as tf | |
import pickle | |
import numpy as np | |
import nltk | |
from nltk.tokenize import word_tokenize | |
from nltk.stem import WordNetLemmatizer | |
lemmatizer = WordNetLemmatizer() | |
n_nodes_hl1 = 500 |
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
""" | |
Using the concept of transfer learning to improve accuracy. VGG16 is a CNN that has been trained on ImageNet data. | |
We first load this model upto the first fully connected layer. | |
""" | |
import numpy as np | |
from keras.preprocessing.image import ImageDataGenerator, img_to_array, load_img | |
from keras.models import Sequential | |
from keras.layers import Dense, Flatten, Dropout | |
from keras import applications |