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 bs4 | |
import datetime | |
import os | |
import pandas as pd | |
import psycopg2 | |
from selenium import webdriver | |
from selenium.webdriver.support.ui import WebDriverWait | |
from selenium.webdriver.support import expected_conditions as EC | |
from selenium.webdriver.common.by import By |
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
CREATE OR REPLACE VIEW public.centiles_by_small_region | |
AS SELECT s2.small_pid, | |
s2.p_region, | |
percentile_cont(0.30::double precision) WITHIN GROUP (ORDER BY (mode_prices.mode_price::double precision)) AS percentile_30, | |
percentile_cont(0.60::double precision) WITHIN GROUP (ORDER BY (mode_prices.mode_price::double precision)) AS percentile_60, | |
percentile_cont(0.90::double precision) WITHIN GROUP (ORDER BY (mode_prices.mode_price::double precision)) AS percentile_90 | |
FROM mode_prices | |
JOIN ( SELECT product_id_sml_class.product_id, | |
product_id_sml_class.small_pid, | |
CASE |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<script src="http://d3js.org/d3.v3.min.js"></script> | |
<script src="http://dimplejs.org/dist/dimple.v2.0.0.min.js"></script> | |
<style> | |
circle.dimple-series-1 { | |
fill: red; |
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
def preprocessing(doc): | |
'''Doc is assumed to be an open file object of English-language text. | |
Function outputs a dictionary with keys as line numbers from the document, | |
values as lists containing likely date-element candidates. | |
Years are assumed to be between 1900-2018 inclusive, but this can be easily changed.''' | |
import re | |
maybedatestuff = {i:[] for i in range(len(doc))} | |
for i, line in enumerate(doc): |