Skip to content

Instantly share code, notes, and snippets.

View adityanatraj's full-sized avatar

Aditya Natraj adityanatraj

View GitHub Profile
@adityanatraj
adityanatraj / download_from_gcs.py
Created April 15, 2019 15:14
Python : download from gcs
import logging
from collections import deque
from os import path, makedirs
from urllib.parse import urlparse
from google.api_core.exceptions import Forbidden
from google.cloud import storage
from google.cloud.exceptions import NotFound
@adityanatraj
adityanatraj / sum.py
Last active January 11, 2019 16:53
sum - a python command that sums over delimited stdin columns
#!/usr/bin/env python3
import sys
import logging
from argparse import ArgumentParser
def parse_fields(fields_str):
field_refs = fields_str.split(',')
fields = set()
@adityanatraj
adityanatraj / osxkeymap.sublime-keymap
Created January 18, 2017 18:58
Sublime MacKeyboard Keymap on linux
[
{ "keys": ["super+q"], "command": "exit" },
{ "keys": ["super+shift+n"], "command": "new_window" },
{ "keys": ["super+shift+w"], "command": "close_window" },
{ "keys": ["super+o"], "command": "prompt_open_file" },
{ "keys": ["super+shift+t"], "command": "reopen_last_file" },
{ "keys": ["super+n"], "command": "new_file" },
{ "keys": ["super+s"], "command": "save" },
{ "keys": ["super+shift+s"], "command": "prompt_save_as" },
{ "keys": ["super+w"], "command": "close" },
@adityanatraj
adityanatraj / migration_v2_to_v3.md
Last active March 21, 2016 18:31
AON Medicare Upgrade (2 -> 3)

Migrating from v2 to v3

To aid in the migration from version 2 to version 3 of the medicare-api this document provides specific notes where breaking changes exist.

0. Requesting versions

As the medicare-api grows and requires versioning to accomodate the needs of clients to use stable APIs while there are requests for newer features, the API allows the client to request a specific version using the HTTP Accept header.

@adityanatraj
adityanatraj / add
Created September 21, 2015 19:05
sum : add up numbers piped from stdin in a column with usage similar to cut
#!/usr/bin/env python3
description = 'sum: adds up numbers in columns of piped input'
import sys
from argparse import ArgumentParser
argparser = ArgumentParser(description=description)
argparser.add_argument('-d', type=str, default=None)
argparser.add_argument('-f', type=int, default=1)

Keybase proof

I hereby claim:

  • I am adityanatraj on github.
  • I am adityanatraj (https://keybase.io/adityanatraj) on keybase.
  • I have a public key whose fingerprint is 5302 4A0B 801E 88CC FE68 028F F931 B874 3B4F AA47

To claim this, I am signing this object: