This file contains 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
__author__ = 'gavinwhyte' | |
import urllib2 | |
import numpy | |
import random | |
from sklearn import datasets, linear_model | |
from sklearn.metrics import roc_curve, auc | |
import pylab as pl | |
def confusionMatrix(predicted, actual, threshold): | |
if len(predicted) != len(actual): return -1 |
This file contains 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
#!/usr/bin/python3 | |
import curses | |
import time | |
import threading | |
class Clock(threading.Thread): | |
""" Clock curses string class. Updates every second. Easy to install """ |
This file contains 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
#!/usr/bin/env python | |
""" | |
mocking requests calls | |
""" | |
import mock | |
import unittest | |
import requests | |
from requests.exceptions import HTTPError |