This file contains hidden or 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
async function scrollDown() { | |
const wrapper = document.querySelector("#search-page-list-container"); | |
await new Promise((resolve, reject) => { | |
var totalHeight = 0; | |
var distance = 600; | |
var timer = setInterval(async () => { | |
var scrollHeightBefore = wrapper.scrollHeight; | |
wrapper.scrollBy(0, distance); | |
totalHeight += distance; |
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 hidden or 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 flask import Flask, request | |
import uuid | |
app = Flask(__name__) | |
@app.route('/error_endpoint', methods=['POST']) | |
def receive_error_message(): | |
error_message = request.form.get('error_message') | |
if error_message: |
This file contains hidden or 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
# Pareto Party | |
# Load libs | |
library(tidyverse) | |
library(readstata13) | |
library(car) | |
library(dplyr) | |
library(xtable) | |
library(dplyr) |
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 hidden or 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 csv | |
import pandas as pd | |
import numpy as np | |
df = pd.read_csv('parsed-new.csv', header = None, delimiter="\t", quoting=csv.QUOTE_NONE, encoding='utf-8') | |
df.head() | |
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 hidden or 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
# | |
# Get All Unique Domain Names from comScore | |
# | |
# INPUT: comScore browsing data file | |
# | |
# OUTPUT: a text file containing a list of unique domains | |
# | |
# PAREMETERS: | |
# + INTERNET_USAGE_FILE: path to the comScore browsing data | |
# + FINAL_OUTPUT_FILE: path to intended output file |
This file contains hidden or 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
library(readr) | |
library(dplyr) | |
a_string <- read_file("nielsen_2016") | |
split_lines <- strsplit(a_string, "\r\n")[[1]] | |
split_cols <- strsplit(split_lines, "--") | |
dat_frame <- ldply(split_cols) | |
names(dat_frame) <- c("dma", "counties") | |
write.csv(dat_frame, file = "dma_counties_2016.csv", row.names = F) |
This file contains hidden or 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
State | Position | Name | @Twitter Handle | Part Affiliation | Boris Shor's Score | |
---|---|---|---|---|---|---|
AZ | Senator | David Bradley | @Bradley4AZ | Democrat | -1.253 | |
AZ | Senator | Katie Hobbs | @katiehobbs | Democrat | -1.684 | |
AZ | Senator | Ed Ableser | @SenatorAbleser | Democrat | -1.606 | |
AZ | Senator | Barbara McGuire | @SenBarbMcGuire | Democrat | -0.672 | |
AZ | Senator | Steve Farley | @SteveFarleyAZ | Democrat | -1.413 | |
AZ | Senator | Adam Driggs | @AdamDriggs | Republican | 0.738 | |
AZ | Senator | Bob Worsley | @bob_worsley | Republican | 0.46 | |
AZ | Senator | Kelli Ward | @kelliwardaz | Republican | 1.144 | |
AZ | Senator | Nancy Barto | @NancyBarto | Republican | 0.996 |