Skip to content

Instantly share code, notes, and snippets.

View afraca's full-sized avatar

Sije Harkema afraca

View GitHub Profile
@afraca
afraca / main.py
Created June 12, 2018 10:58
Python (typed) script to move your IMDb rating history to Netflix upvotes/downvotes
from selenium import webdriver
from selenium.webdriver.firefox.firefox_profile import FirefoxProfile
from selenium.webdriver.remote.webelement import WebElement
from selenium.common.exceptions import *
from selenium.webdriver.firefox.options import Options
import getpass
from typing import Dict, Tuple, List
import os
import csv
import re
infixr 2 _⟨_⟩_
_⟨_⟩_ : forall {a : Set} -> (x : a) -> {y z : a} -> x == y -> y == z -> x == z
x ⟨ p ⟩ q = trans p q
infixr 3 _∎
_∎ : {a : Set} -> (x : a) -> x == x
x ∎ = Refl
-- Visible reduction steps make the proof more explicit
definition : {a : Set} -> {x : a} -> x == x
@afraca
afraca / hashtiming.py
Created June 29, 2012 08:19
Hash algo timing in python
from timeit import default_timer
import hashlib
class Timer(object):
def __init__(self, verbose=False):
self.verbose = verbose
self.timer = default_timer
def __enter__(self):
self.start = self.timer()