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 json | |
import time | |
import requests | |
from bs4 import BeautifulSoup | |
def main(): | |
# ????? UNSURE where to use these two options!! | |
opts = ['B22', 'BM22'] |
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 requests | |
cities = ['Las Vegas, NV, US', 'Paris', 'Tokyo, CN'] | |
api_url = 'https://accommodations.booking.com/autocomplete.json' | |
referer = 'https://www.booking.com/searchresults.html?aid=355028&sid=1c4689c64a9440a81fb0d7ae95196127&sb=1&sb_lp=1&src=index&src_elem=sb&error_url=https%3A%2F%2Fwww.booking.com%2Findex.html%3Faid%3D355028%3Bsid%3D1c4689c64a9440a81fb0d7ae95196127%3Bsb_price_type%3Dtotal%26%3B&ss=Las+Vegas&is_ski_area=0&ssne=Las+Vegas&ssne_untouched=Las+Vegas&dest_id=20079110&dest_type=city&checkin_year=&checkin_month=&checkout_year=&checkout_month=&group_adults=2&group_children=0&no_rooms=1&b_h4u_keep_filters=&from_sf=1' | |
header = { | |
'Accept': '*/*', | |
'Accept-Encoding': 'gzip, deflate, br', |
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 numpy as np | |
import tensorflow as tf | |
# Create graph | |
sess = tf.Session() | |
# Create data | |
x_vals = np.concatenate((np.random.normal(-1, 1, 50), np.random.normal(1, 1, 50))) | |
y_vals = np.concatenate((np.repeat(0, 50), np.repeat(1, 50))) | |
x_data = tf.placeholder(shape=[1], dtype=tf.float32) |