Skip to content

Instantly share code, notes, and snippets.

View nealcaren's full-sized avatar

Neal Caren nealcaren

View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@nealcaren
nealcaren / mac_selenium_install.py
Last active October 28, 2020 16:58
Install Selenium and the appropriate Chrome driver for your Mac using conda.
import requests
import re
import plistlib
# Find the available Chrome Drivers
url = "https://pypi.org/project/chromedriver-binary/#history"
html = requests.get(url).text
available = re.findall("\/project\/chromedriver-binary\/(.*?)\/", html)
available = [i for i in available if i.count(".") > 2]
New Hampshire 02/13 H Hofstra 14 – 8
New Hampshire 02/20 A Massachusetts 4 – 16
New Hampshire 02/23 A Dartmouth 10 – 11
New Hampshire 02/27 H Connecticut 7 – 13
New Hampshire 03/02 H Holy Cross 16 – 6
New Hampshire 03/05 H Fairfield 6 – 16
New Hampshire 03/12 A Harvard 10 – 12
New Hampshire 03/16 A Monmouth 9 – 7
New Hampshire 03/19 A Manhattan 11 – 13
New Hampshire 03/26 H Massachusetts-Lowell 16 – 3
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
# http://stackoverflow.com/questions/753052/strip-html-from-strings-in-python
from HTMLParser import HTMLParser
class MLStripper(HTMLParser):
def __init__(self):
self.reset()
self.fed = []
def handle_data(self, d):
self.fed.append(d)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
# coding: utf-8
from string import punctuation
from nltk.tokenize import sent_tokenize
from collections import Counter
liwc_stem_categories = {"yellow": ["Perceptual processes", "See"], "four": ["Total function words", "Numbers"], "jihad": ["Religion"], "sleep": ["Biological processes", "Body"], "authorit": ["Achievement"], "feeding": ["Biological processes", "Ingestion"], "buddy": ["Social processes", "Friends"], "opport": ["Affective processes", "Positive emotion", "Achievement"], "abilit": ["Achievement"], "bike": ["Leisure"], "buddh": ["Religion"], "daze": ["Affective processes", "Negative emotion"], "lord": ["Religion"], "emphysem": ["Biological processes", "Health"], "hormone": ["Biological processes", "Health"], "risk": ["Affective processes", "Negative emotion", "Anxiety"], "compassion": ["Social processes", "Affective processes", "Positive emotion"], "rise": ["Motion", "Relativity"], "voic": ["Perceptual processes", "Hear"], "arous": ["Biological processes", "Body", "Sexual"], "govern": ["Work"], "
We can't make this file beautiful and searchable because it's too large.
0
From:
"From: ""Rufus Gifford, BarackObama.com"" <info@barackobama.com>
Subject: Last email today -- really
Date: April 30, 2012 9:04:40 PM EDT
To: Victoria Bassetti <victoria.bassetti@gmail.com>