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
var unflatten = function(jsondata) { | |
"use strict"; | |
var data = JSON.parse(jsondata); | |
if (Object(data) !== data || Array.isArray(data)) | |
return data; | |
var result = {}, cur, prop, idx, last, temp; | |
for(var p in data) { | |
cur = result, prop = "", last = 0; | |
do { | |
idx = p.indexOf(".", last); |
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 | |
# Author: Vinay Dandekar | |
""" | |
sc-ec2-autotagger | |
~~~~~~~~~~~~~ | |
Tags the EC2 instance in a autoscaling group. | |
""" |
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 | |
# %%SC_COPYRIGHT%% | |
# Author: Vinay Dandekar | |
import argparse | |
import logging | |
import signal | |
import subprocess | |
import sys |
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 | |
""" | |
SoundCloud Downloader | |
~~~~~~~~~~~~~ | |
Downloads tracks. | |
""" | |
import argparse |
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/python | |
import os | |
import sys | |
import json | |
import requests | |
import time | |
import urllib | |
cities = [] |
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
var dict = ["coffee": 3.99, "tea": 10.99, "carrots": 4.97] | |
print("Tea is \((String)(dict["tea"])) test") |
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
var map = { | |
"s":"d", "m":"e", | |
"e":"h", "x":"l", | |
"z":"o", "i":"r", | |
"a":"w", "o":"!", | |
"-":" " | |
}, | |
reverseMap = {} | |
for (j in map){ |