Skip to content

Instantly share code, notes, and snippets.

@lgendrot
lgendrot / feature_crawler.py
Created November 27, 2018 17:52
Crawls input urls using selenium and headless chrome to search for form elements and image sizes.
import pandas as pd
import requests
import os
import argparse
from selenium import webdriver
from urllib.request import urlopen
from urllib.parse import urlparse
from PIL import ImageFile
from bs4 import BeautifulSoup
@lgendrot
lgendrot / cannibals_and_missionaries.py
Created October 12, 2017 21:13
Generalized solution to the cannibals and missionaries problem.
class State:
def __init__(self, left_m=5, right_m=0, left_c=5, right_c=0, boat='left', parent=None, couples=5, boat_holds=3):
if parent == None:
assert left_m == left_c == couples, "Invalid root state lefts must equal couples"
self.left_m = left_m
self.right_m = right_m
self.left_c = left_c
self.right_c = right_c
self.boat = boat
@lgendrot
lgendrot / Tool.markdown
Last active August 29, 2015 14:25
DNA/RNA Transcript Tool