Skip to content

Instantly share code, notes, and snippets.

View inashivb's full-sized avatar
🐢
I slow be to respond may.

Shivani Bhardwaj inashivb

🐢
I slow be to respond may.
View GitHub Profile

Keybase proof

I hereby claim:

  • I am inashivb on github.
  • I am shivani (https://keybase.io/shivani) on keybase.
  • I have a public key ASBPVlMe6o0V_J7C-ZqcnrDOCSfM9MTRKetPNmSPYYCJOgo

To claim this, I am signing this object:

@inashivb
inashivb / yaml_indenter.py
Created December 12, 2019 06:24
Example class using context manager
class YamlIndenter:
"""
Cleanly indent by two spaces every new line with every new context.
Likewise, unindent if one comes out of context.
"""
def __init__(self, spaces=2):
self.level = 0
self.spaces = spaces
def __enter__(self):