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 datetime | |
p1_meetings = [ | |
(1230, 1300), | |
(845, 900), | |
(1300, 1500), | |
] | |
p2_meetings = [ | |
(930, 1200), |
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
# data analysis and wrangling | |
import pandas as pd | |
import numpy as np | |
import random as rnd | |
# visualization | |
import seaborn as sns | |
import matplotlib.pyplot as plt | |
# %matplotlib inline |
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 sys | |
import yaml | |
from os.path import dirname, join | |
import pandas as pd | |
import numpy as np | |
import random as rnd | |
from scipy import sparse |
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
models: | |
1: | |
vectorizer: | |
title: | |
name: 'tfidf' | |
parameters: | |
- ngram_range: [[1, 1], [1, 2]] | |
max_features: [500] | |
url: | |
name: 'tfidf' |
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
# -*- coding: utf-8 -*- | |
import numpy as np | |
import boto3 | |
import pickle | |
from flask import Flask, request, json | |
BUCKET_NAME = 'non-hacker-news-models' | |
MODEL_FILE_NAME = 'model.pkl' | |
T_VECTORIZER_FILE_NAME = 't_vectorizer.pkl' |
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 boto | |
import datetime | |
import pickle | |
import sys | |
import yaml | |
from os.path import dirname, join | |
from sklearn.externals import joblib | |
import pandas as pd | |
import numpy as np |
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
let’s say you have two text columns: Title and URL. your data looks like this: | |
```Title,URL,NonEng | |
slack vs microsoft teams vs google hangouts,techcrunch,0 | |
the costs of universal healthcare,nytimes,1 | |
...``` | |
and you are trying to create a binary classifier (the “NonEng” column) | |
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
{% if campaign_setup.preset_name == "dashboard" %} | |
{% assign cta_text = "advocate_reward_paid_dashboard_email_button" | localize: "Refer more Friends!" %} | |
{% elsif campaign_setup.preset_name == "leaderboard" %} | |
{% assign cta_text = "advocate_reward_paid_leaderboard_email_button" | localize: "Refer more Friends!" %} | |
{% else %} | |
{% assign cta_text = "advocate_reward_paid_email_button" | localize: "Redeem now" %} | |
{% endif %} | |
<table class="body" align="center" style="border-spacing: 0; border-collapse: collapse; vertical-align: top; text-align: left; height: 100%; width: 560px; padding: 0;"> | |
<tr style="vertical-align: top; text-align: left; padding: 0;" align="left"> |