Skip to content

Instantly share code, notes, and snippets.

View ahlusar1989's full-sized avatar
🏀
Let's Go!

Saran Ahluwalia ahlusar1989

🏀
Let's Go!
View GitHub Profile
@ahlusar1989
ahlusar1989 / _.md
Created November 3, 2015 16:57
Ball on Line - Setup
@ahlusar1989
ahlusar1989 / _.md
Last active November 3, 2015 16:33
Clickable Line Setup
@ahlusar1989
ahlusar1989 / _.md
Last active October 31, 2015 18:45
crossfilter
@ahlusar1989
ahlusar1989 / _.md
Last active October 31, 2015 14:19
colorscale
@ahlusar1989
ahlusar1989 / _.md
Last active October 31, 2015 14:02
Three Circles Setup
@ahlusar1989
ahlusar1989 / _.md
Last active October 31, 2015 12:53
Three Circles
@ahlusar1989
ahlusar1989 / boston.json
Created October 23, 2015 11:43 — forked from pprett/boston.json
Decision Tree Viewer (D3 and Sklearn)
{"error": 42716.2954, "samples": 506, "value": [22.532806324110698], "label": "RM <= 6.94", "type": "split", "children": [{"error": 17317.3210, "samples": 430, "value": [19.93372093023257], "label": "LSTAT <= 14.40", "type": "split", "children": [{"error": 6632.2175, "samples": 255, "value": [23.349803921568636], "label": "DIS <= 1.38", "type": "split", "children": [{"error": 390.7280, "samples": 5, "value": [45.58], "label": "CRIM <= 10.59", "type": "split", "children": [{"error": 0.0000, "samples": 4, "value": [50.0], "label": "Leaf - 4", "type": "leaf"}, {"error": 0.0000, "samples": 1, "value": [27.9], "label": "Leaf - 5", "type": "leaf"}]}, {"error": 3721.1632, "samples": 250, "value": [22.90520000000001], "label": "RM <= 6.54", "type": "split", "children": [{"error": 1636.0675, "samples": 195, "value": [21.629743589743576], "label": "LSTAT <= 7.57", "type": "split", "children": [{"error": 129.6307, "samples": 43, "value": [23.969767441860473], "label": "TAX <= 222.50", "type": "split", "children": [{"err
@ahlusar1989
ahlusar1989 / data.csv
Created October 5, 2015 20:55 — forked from eightysteele/data.csv
Unicode DictReader and DictWriter
id name age
0 aaron 34
1 tina 36
2 noah ©
from glob import iglob
import csv
from collections import *
import os, sys
import csv
import itertools
from csv import reader
import xml.etree.cElementTree as ElementTree
from xml.etree.ElementTree import XMLParser
@ahlusar1989
ahlusar1989 / cleaner.py
Last active August 29, 2015 14:25 — forked from lawlesst/cleaner.py
cleaning invalid characters from xml
def invalid_xml_remove(c):
#http://stackoverflow.com/questions/1707890/fast-way-to-filter-illegal-xml-unicode-chars-in-python
illegal_unichrs = [ (0x00, 0x08), (0x0B, 0x1F), (0x7F, 0x84), (0x86, 0x9F),
(0xD800, 0xDFFF), (0xFDD0, 0xFDDF), (0xFFFE, 0xFFFF),
(0x1FFFE, 0x1FFFF), (0x2FFFE, 0x2FFFF), (0x3FFFE, 0x3FFFF),
(0x4FFFE, 0x4FFFF), (0x5FFFE, 0x5FFFF), (0x6FFFE, 0x6FFFF),
(0x7FFFE, 0x7FFFF), (0x8FFFE, 0x8FFFF), (0x9FFFE, 0x9FFFF),
(0xAFFFE, 0xAFFFF), (0xBFFFE, 0xBFFFF), (0xCFFFE, 0xCFFFF),
(0xDFFFE, 0xDFFFF), (0xEFFFE, 0xEFFFF), (0xFFFFE, 0xFFFFF),