Skip to content

Instantly share code, notes, and snippets.

View sagz's full-sized avatar

Sagar Savla sagz

View GitHub Profile
@sagz
sagz / .bashrc
Created October 12, 2013 19:58 — forked from tommybutler/.bashrc
# put timestamps in my bash history
export HISTTIMEFORMAT='%F %T '
# don't put duplicate commands into the history
export HISTCONTROL=ignoredups
# record only the most recent duplicated command (see above)
export HISTCONTROL=ignoreboth
# don't record these commands in the history; who cares about ls?
@sagz
sagz / .bashrc
Created October 21, 2013 19:25 — forked from tommybutler/.bashrc
# put timestamps in my bash history
export HISTTIMEFORMAT='%F %T '
# don't put duplicate commands into the history
export HISTCONTROL=ignoredups
# record only the most recent duplicated command (see above)
export HISTCONTROL=ignoreboth
# don't record these commands in the history; who cares about ls?
@sagz
sagz / evills
Created April 1, 2014 14:20 — forked from Eugeny/evills
#!/usr/bin/python
# -*- coding: utf-8 -*-
import subprocess
__all__ = ["transform"]
__version__ = '0.3'
__author__ = 'Christoph Burgmer <cburgmer@ira.uka.de>'
__url__ = 'http://github.com/cburgmer/upsidedown'
# Decision Tree Classifier
from sklearn import datasets
from sklearn import metrics
from sklearn.tree import DecisionTreeClassifier
# load the iris datasets
dataset = datasets.load_iris()
# fit a CART model to the data
model = DecisionTreeClassifier()
model.fit(dataset.data, dataset.target)
class DecisionTree(object):
"""
A decision tree object
"""
@staticmethod
def count_results(data, item=True):
"""
count the occurrences of each result in the data set
"""
#Author: Marcel Pinheiro Caraciolo
#Confusion Matrix Generator
#Version: 0.1
#email: caraciol at gmail . com
from pprint import pprint as _pretty_print
import math
class ConfusionMatrix(object):