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
| <!DOCTYPE html> | |
| <meta charset="utf-8"> | |
| <title>Trees</title> | |
| <style> | |
| body { | |
| /*font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;*/ | |
| font: 11px sans-serif; | |
| position: relative; | |
| height: 500px; |
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 splinter import Browser | |
| import re | |
| import time | |
| def download_file(url): | |
| local_filename = url.split('/')[-1] | |
| # NOTE the stream=True parameter | |
| r = requests.get(url, stream=True) | |
| with open(local_filename, 'wb') as f: | |
| for chunk in r.iter_content(chunk_size=1024): |
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 splinter import Browser | |
| from splinter.exceptions import * | |
| from selenium.common.exceptions import * | |
| from selenium.webdriver.common.keys import Keys | |
| from collections import deque | |
| import re | |
| import time | |
| import pickle | |
| class Stop(): |
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 splinter import Browser | |
| import time | |
| #this part is unfinished | |
| def get_hours(br): | |
| br.visit('http://living.sas.cornell.edu/dine/whentoeat/') | |
| for ea in br.find_by_css(".dineToggleControl"): | |
| ea.click() |
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 os | |
| import string | |
| import random | |
| def organize_wallpapers(directory=r'C:\Users\SACHIN\Pictures\Wallpapers'): | |
| """ Delete duplicate files that are the same size, igoring *.db files. | |
| Renames duplicately named files that are not the same size with | |
| random id, maintaining same extension | |
| """ |
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 java.io.BufferedReader; | |
| import java.io.IOException; | |
| import java.nio.charset.Charset; | |
| import java.nio.charset.StandardCharsets; | |
| import java.nio.file.Files; | |
| import java.nio.file.Path; | |
| import java.util.regex.Pattern; | |
| import java.util.regex.Matcher; | |
| import java.util.ArrayList; |
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 java.io.BufferedReader; | |
| import java.io.IOException; | |
| import java.nio.charset.Charset; | |
| import java.nio.charset.StandardCharsets; | |
| import java.nio.file.Files; | |
| import java.nio.file.Path; | |
| import java.util.Scanner; | |
| public class Unscrambler { | |
| //given wordlist and dictionary, unscramble wordlist |
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 pyPdf import PdfFileWriter, PdfFileReader | |
| def splitPDF(input_fn, output_fn, start, end): | |
| """ extracts from input anoter pdf from start to end pages | |
| just use the textbooks bookmarks 'edit' to figure out | |
| where chapters end and start. It's easy from there | |
| """ | |