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
""" | |
Stub for scraping-related jobs | |
CSS Selectors Reference: http://www.w3schools.com/cssref/css_selectors.asp | |
""" | |
import requests, lxml.html | |
# Grab HTML from page | |
response = requests.get('https://www.google.com/') |
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
""" | |
Stub for scraping-related jobs | |
CSS Selectors Reference: http://www.w3schools.com/cssref/css_selectors.asp | |
""" | |
import requests, lxml.html | |
# Grab HTML from page | |
response = requests.get('https://www.google.com/') |
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
""" | |
Stub for scraping-related jobs | |
CSS Selectors Reference: http://www.w3schools.com/cssref/css_selectors.asp | |
""" | |
import requests, lxml.html | |
import re | |
# Select the element using a CSS Selector |
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 nameparser import HumanName | |
import codecs | |
import csv | |
# READ NAMES AND FORMAT PROPERLY | |
namefile = codecs.open('names.txt', encoding='utf-16') | |
names = {} | |
for name in namefile: | |
names[name.strip()] = str(HumanName(name.strip())) | |
namefile.close() |
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
""" | |
Stub for script to query API | |
""" | |
from urllib2 import Request, urlopen, URLError | |
import json | |
import logging | |
from time import sleep | |
URL_STUB = "http://website.com/api?q=" |
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
<3 Hi, Goodmorning |
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
#!/usr/bin/env ruby | |
# | |
# Ruby script to access wordpress.com REST API | |
# For usage, see main method at end of file. | |
require 'wordpress-com' | |
require 'json' | |
require 'logger' | |
@logger = Logger.new(STDOUT) |
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
library(dplyr) | |
library(tidyr) | |
setwd('~/Downloads') | |
filename <- 'GS_Election_Poll_20161101' | |
df <- read.csv(paste(filename,".csv",sep="")) | |
grouped <- group_by(df, Question..2.Answer) | |
summary_df = summarise(grouped, total=sum(Weight)) | |
summary_df_mutated <- mutate(summary_df, pct=total/sum(total)) |
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
[ | |
{ | |
"name" : "Molecule Man", | |
"age" : 29, | |
"secretIdentity" : "Dan Jukes", | |
"powers" : [ | |
"Radiation resistance", | |
"Turning tiny", | |
"Radiation blast" | |
] |
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
[ | |
{ | |
"name" : "Molecule Man", | |
"age" : 29, | |
"secretIdentity" : "Dan Jukes", | |
"powers" : [ | |
"Radiation resistance", | |
"Turning tiny", | |
"Radiation blast" | |
] |
OlderNewer