Skip to content

Instantly share code, notes, and snippets.

View firstworldproblems's full-sized avatar

faustus firstworldproblems

View GitHub Profile
@firstworldproblems
firstworldproblems / caselaw_scraper.py
Created November 23, 2022 01:05
scrapes caselaw website to extract data for analysis
import furl
import requests
import htmlmin
from bs4 import BeautifulSoup
from datetime import date, datetime
from dateutil import parser
import datefinder
import dateparser
from difflib import SequenceMatcher as SM
from fuzzywuzzy import fuzz, process
@firstworldproblems
firstworldproblems / nsw_health_crimefamily_json_scraper.py
Last active November 16, 2022 20:52
NSW health policy document scraper
#-*- coding: utf-8 -*-
from importlib import reload
from seleniumwire import webdriver
from seleniumwire.utils import decode
import certifi
import cgi
import json
import locale
import os
import re
@firstworldproblems
firstworldproblems / clipboard.py
Created June 24, 2017 04:11
Fix for Ubuntu builds prefixing file:// to file paths when pasting into terminal from clipboard.
#!/usr/bin/env python
# Fix for Ubuntu builds prefixing file:// to file paths when pasting into terminal from clipboard.
# By faustus (2017)
# https://gist.github.com/firstworldproblems/74d6f826096a2c491904f7a4f8e2f951
import os
import pyperclip
import time
class ClipboardWatcher():