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
// If the script does not work, you may need to allow same site scripting https://stackoverflow.com/a/50902950 | |
Linkedin = { | |
config: { | |
scrollDelay: 3000, | |
actionDelay: 5000, | |
nextPageDelay: 5000, | |
// set to -1 for no limit | |
maxRequests: -1, | |
totalRequestsSent: 0, |
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
// If the script does not work, you may need to allow same site scripting https://stackoverflow.com/a/50902950 | |
Linkedin = { | |
config: { | |
scrollDelay: 3000, | |
actionDelay: 5000, | |
nextPageDelay: 5000, | |
// set to -1 for no limit | |
maxRequests: -1, | |
totalRequestsSent: 0, |
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 scrape_recipe(br, year, idnumber): | |
#This is called when user wants to scrape for specific recipe site | |
#Try functions were used to prevent any one element from stopping the operation | |
#recipe title | |
try: | |
rtitle = br.find_element_by_tag_name('h1').text | |
except: | |
rtitle = 'NA' |
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
br = webdriver.Firefox() #open firefox | |
br.get('https://www.allrecipes.com/recipes/'+str(yearurls[i])) | |
###ID number for year, example 1997 has ID of 14486 | |
html_list = br.find_element_by_id("grid") | |
urls = html_list.find_elements(By.CLASS_NAME, "favorite") | |
#All top 20 recipes have hearts associated with them. Inside | |
#the heart contains the unique ID number for the given recipe | |
for i, e in enumerate(urls): |
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 cv2 | |
import time | |
import math | |
import numpy as np | |
capture = cv2.VideoCapture(0) | |
print capture.get(cv2.CAP_PROP_FPS) | |
t = 100 | |
w = 640.0 |
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
/* Goldbach's conjecture in JavaScript - using Recursion | |
* | |
* author: Igor Hercowitz | |
*/ | |
function isPrime(n) { | |
if (n % 2 === 0) return false; | |
var sqrtn = Math.sqrt(n)+1; |