This file contains hidden or 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 | |
import sys | |
import json | |
import yaml | |
import argparse | |
import functools | |
def main(args): |
This file contains hidden or 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 | |
import sys, json, yaml | |
def transform(filename=None): | |
stream = sys.stdin if filename is None else open(filename, 'rb') | |
return json.dumps(yaml.load(stream), separators=(',',':')) | |
if __name__ == '__main__': | |
sys.stdout.write(transform(*sys.argv[1:])) |
This file contains hidden or 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
// vim: set ts=4 sw=4 et: | |
import java.io.FileReader; | |
import java.io.BufferedReader; | |
import java.io.IOException; | |
import java.util.Iterator; | |
import java.util.Scanner; | |
import java.util.HashMap; | |
import java.util.Map; |