Skip to content

Instantly share code, notes, and snippets.


Robert Dempsey rdempsey

View GitHub Profile
import unittest
def foo(x, y, z):
return (x != y and x != z or x and z)
def get_test_args():
x = y = z = [True, False]
from itertools import product, repeat
input_args = list(product(x, y, z))
expected_args = [
View style.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
# building the classifier
from sklearn.ensemble import RandomForestClassifier
# I find it easiest to just define all the features you'll be using in a list. In
# our case it's just the fuzzy scores that we generated using fuzzywuzzy.
features = [
import sys
import requests
from arango import create
from bs4 import BeautifulSoup
"user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_5)",
huangzhichong /
Created August 7, 2012 12:38
Selenium Webdriver CheatSheet

API workthough

  1. Open a browser

    # start an instance of firefox with selenium-webdriver
    driver = Selenium::WebDriver.for :firefox
    # :chrome -> chrome
    # :ie     -> iexplore
  • Go to a specified URL
igor-alexandrov / settings.rb
Created December 11, 2011 18:51
Multiple configuration files in SettingsLogic
View settings.rb
class Settings < Settingslogic
source "#{Rails.root}/config/application.yml"
if Rails.env == 'development'
namespace 'development-' + Socket.gethostname.gsub(/\W/, '-').gsub(/[-]{2,}/, '-')
namespace Rails.env
# load local settings