Skip to content

Instantly share code, notes, and snippets.

View abirjameel's full-sized avatar

Abir Jameel abirjameel

  • Bangalore
View GitHub Profile
@abirjameel
abirjameel / scale.py
Created June 16, 2018 14:23
Function for Normalizing pandas DataFrame
def normalize(df):
"""
Function for min-max Scaling a pandas DataFrame
@param:
Takes a pandas DataFrame: df
Returns: a normalized DataFrame
along with a dict containing rescaling
coef which can be used in below function.
"""
result = df.copy()
@abirjameel
abirjameel / json-html
Last active December 15, 2017 10:14
Converting JSON request received to render as html text
<script>
$(document).ready(function() {
$("#getMessage").on("click", function() {
   $.getJSON("/json/cats.json", function(json) {
var html = "";
// Only change code below this line.
json.forEach(function(val) {
var keys = Object.keys(val);