I hereby claim:
- I am amanahuja on github.
- I am amanqa (https://keybase.io/amanqa) on keybase.
- I have a public key ASASllH9sUL7cRzrWMq-nIMWp7iil-P5Y3I_7ec4VcBSXwo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
import sys | |
import simplejson as json | |
def get_param(js, param=()): | |
if len(param) == 0: | |
return None | |
if len(param) == 1: |
# -*- coding: utf-8 -*- | |
## Basado en el script originalmente publicado en | |
## http://www.jansipke.nl/using-python-to-add-new-posts-in-wordpress/ | |
import datetime | |
import xmlrpclib | |
from xml.sax.saxutils import escape | |
import json | |
import markdown |
# Orignal version taken from http://www.djangosnippets.org/snippets/186/ | |
# Original author: udfalkso | |
# Modified by: Shwagroo Team and Gun.io | |
import sys | |
import os | |
import re | |
import hotshot, hotshot.stats | |
import tempfile | |
import StringIO |
# Data from: http://www.ny1.com/content/top_stories/156599/now-available--2007-2010-nyc-teacher-performance-data#doereports | |
from pylab import * | |
from pandas import * | |
import re | |
def get_data(filename): | |
d = read_csv(filename, delimiter="\t") | |
d['teacher'] = d['teacher_name_first_1'] + " " + d['teacher_name_last_1'] | |
return d |
""" | |
tiny script to convert a pandas data frame into a JSON object | |
""" | |
import ujson as json | |
import pandas | |
import numpy as np | |
df = pandas.DataFrame({ | |
"time" : [1,2,3,4,5], |