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
# /// script | |
# requires-python = ">=3.12" | |
# dependencies = [ | |
# "pymupdf", | |
# "pillow", | |
# ] | |
# /// | |
import fitz # PyMuPDF | |
import os |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 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] |
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
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 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
# 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) |
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
# 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"], " |
NewerOlder