Skip to content

Instantly share code, notes, and snippets.

View ivanromanko's full-sized avatar

Ivan Romanko ivanromanko

View GitHub Profile
@ivanromanko
ivanromanko / json
Last active October 20, 2015 15:36
#!/usr/bin/env python
import fileinput
import json
from pprint import pprint
for line in fileinput.input():
if not line.startswith(("{", "[")):
print(line.strip())
else:
@ivanromanko
ivanromanko / click_test.py
Created April 7, 2016 22:28
Test deep nesting with click library
# -*- coding: utf-8 -*-
import os
import click
class HTTPClient(object):
def __init__(self, token=None, debug=False, base_url=''):
self._token = token
self._debug = debug
self._base_url = base_url