2019-08-01
Check Heroku Logs and Debug
Dash App on Heroku
https://hours-estimate.herokuapp.com/
GitHub Repo
https://github.com/Nov05/DS-Unit-2-Sprint-4-Project
- navigate: Heroku >
hours-estimate
(or your own app name) > Activity > View build log
# install chromium, its driver, and selenium | |
!apt install chromium-chromedriver | |
!cp /usr/lib/chromium-browser/chromedriver /usr/bin | |
!pip install selenium | |
# set options to be headless, .. | |
from selenium import webdriver | |
options = webdriver.ChromeOptions() | |
options.add_argument('--headless') | |
options.add_argument('--no-sandbox') | |
options.add_argument('--disable-dev-shm-usage') |
2019-08-01
Dash App on Heroku
https://hours-estimate.herokuapp.com/
GitHub Repo
https://github.com/Nov05/DS-Unit-2-Sprint-4-Project
hours-estimate
(or your own app name) > Activity > View build log2019-08-05
Anaconda Logs
Unit 3 Module 1 Python Packages and Environments
https://github.com/Nov05/DS-Unit-3-Sprint-1-Software-Engineering/tree/master/module1-python-modules-packages-and-environments
Managing Environments (Anaconda)
https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html
Windows 10, Anaconda Prompt
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
import pandas_profiling
import plotly
import plotly.graph_objects as go
from sklearn.preprocessing import MinMaxScaler
!pip install colorlover
# Successfully installed colorlover-0.3.0
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
# baseline score
X_train, X_val, y_train, y_val = train_test_split(
X_trainval, y_trainval, test_size=0.33, random_state=42)
print("train mean velocity:", y_train.mean())
y_val_pred = [y_train.mean()] * len(y_val)
print('baseline error score:', mean_squared_error(y_val, y_val_pred))
''' | |
Load Yelp JSON files and spit out CSV files | |
Does not try to reinvent the wheel and uses pandas json_normalize | |
Kinda hacky and requires a bit of RAM. But works, albeit naively. | |
Tested with Yelp JSON files in dataset challenge round 12: | |
https://www.yelp.com/dataset/challenge | |
''' | |
import json |
Find the elements that appear in both lists.
import time
with open('names_1.txt', 'r') as f:
names_1 = f.read().split("\n") # List containing 10000 names
with open('names_2.txt', 'r') as f:
names_2 = f.read().split("\n") # List containing 10000 names
import torch | |
import torch.nn as nn | |
import torch.nn.functional as F | |
import torchvision.models as models | |
class EncoderCNN(nn.Module): | |
def __init__(self, embed_size): | |
# super(EncoderCNN, self).__init__() | |
super().__init__() |