Skip to content

Instantly share code, notes, and snippets.

View modi95's full-sized avatar

Abhishek Modi modi95

View GitHub Profile
@modi95
modi95 / yml_to_variables.py
Created March 15, 2017 05:17
I was feeling a bit lazy while refactoring config.py to config.yml. Here's a humorous way to get around that issue :D
import ruamel.yaml
CONFIG_FILE_NAME = 'config.yml'
def load_config(globs):
"""Read file and set values. The parameter is intended to be globals()."""
config_dict = yaml.load(open(CONFIG_FILE_NAME, 'r'))
for key in config_dict:
globs[key] = config_dict[key]
@modi95
modi95 / keybase.md
Created January 1, 2017 10:58
keybase.md

Keybase proof

I hereby claim:

  • I am modi95 on github.
  • I am akmodi (https://keybase.io/akmodi) on keybase.
  • I have a public key whose fingerprint is 45B5 F0CB 0FA0 A700 997E 334B 8C7E 953C 384C A370

To claim this, I am signing this object: