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
/* RandomIterator - (c) Tyler Burdsall 2018 | |
* | |
* A C++ class that can generate random, unique, and evenly-distributed | |
* numbers with O(1) memory space. | |
*/ | |
#include <vector> | |
#include <random> | |
#include <iostream> | |
#include <stdexcept> |
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 | |
import asyncio | |
from concurrent.futures import ThreadPoolExecutor | |
from timeit import default_timer | |
START_TIME = default_timer() | |
def fetch(session, csv): | |
base_url = "https://people.sc.fsu.edu/~jburkardt/data/csv/" | |
with session.get(base_url + csv) as response: |
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 | |
from timeit import default_timer | |
def fetch(session, csv): | |
base_url = "https://people.sc.fsu.edu/~jburkardt/data/csv/" | |
with session.get(base_url + csv) as response: | |
data = response.text | |
if response.status_code != 200: | |
print("FAILURE::{0}".format(url)) | |
# Return .csv data for future consumption |
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
from urllib.request import urlopen | |
from bs4 import BeautifulSoup | |
# add new modules | |
import textwrap | |
import texttable as tt | |
website = 'https://saltandstraw.com/flavors/' | |
page = urlopen(website) | |
soup = BeautifulSoup(page, 'html.parser') | |
results = soup.find('section', attrs={'class':'content-area clear portland'}).findAll('div', attrs={'class':'entry-title'}) |
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
from urllib.request import urlopen | |
from bs4 import BeautifulSoup | |
website = 'https://saltandstraw.com/flavors/' | |
page = urlopen(website) | |
soup = BeautifulSoup(page, 'html.parser') | |
results = soup.find('section', attrs={'class':'content-area clear portland'}).findAll('div', attrs={'class':'entry-title'}) | |
flavors = [] | |
for title in results: |
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
from urllib.request import urlopen | |
from bs4 import BeautifulSoup | |
website = 'https://saltandstraw.com/flavors/' | |
page = urlopen(website) | |
soup = BeautifulSoup(page, 'html.parser') | |
results = soup.find('section', attrs={'class':'content-area clear portland'}).findAll('div', attrs={'class':'entry-title'}) | |
flavors = [] | |
for title in results: |
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
from urllib.request import urlopen | |
from bs4 import BeautifulSoup | |
website = 'https://saltandstraw.com/flavors/' | |
page = urlopen(website) | |
soup = BeautifulSoup(page, 'html.parser') | |
results = soup.findAll('div', attrs={'class':'entry-title'}) | |
for title in results: |
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
from urllib.request import urlopen | |
from bs4 import BeautifulSoup | |
website = 'https://saltandstraw.com/flavors/' | |
page = urlopen(website) | |
soup = BeautifulSoup(page, 'html.parser') | |
results = soup.find('section', attrs={'class':'content-area clear portland'}.findAll('div', attrs={'class':'entry-title'}) | |
flavors = [] # new code |
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
from urllib.request import urlopen | |
from bs4 import BeautifulSoup | |
website = 'https://saltandstraw.com/flavors/' | |
page = urlopen(website) | |
soup = BeautifulSoup(page, 'html.parser') | |
results = soup.find('section', attrs={'class':'content-area clear portland'}).findAll('div', attrs={'class':'entry-title'}) | |
flavors = [] | |
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
from urllib.request import urlopen | |
from bs4 import BeautifulSoup | |
website = 'https://saltandstraw.com/flavors/' | |
page = urlopen(website) | |
soup = BeautifulSoup(page, 'html.parser') | |
results = soup.findAll('div', attrs={'class':'entry-title'}) | |
for title in results: |