Skip to content
View rajivm1991's full-sized avatar
:octocat:
Focusing
:octocat:
Focusing

Block or report rajivm1991

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Please don't include any personal information such as legal names or email addresses. Maximum 100 characters, markdown supported. This note will be visible to only you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse

Pinned Loading

  1. Describe nested datastructure Describe nested datastructure
    1
    from collections import defaultdict
    2
    
                  
    3
    class Structure(object):
    4
        """
    5
        Usage:
  2. Abstract REST Api Helper Abstract REST Api Helper
    1
    import logging
    2
    
                  
    3
    import requests
    4
    
                  
    5
    
                  
  3. Singleton metaclass Singleton metaclass
    1
    import logging
    2
    
                  
    3
    
                  
    4
    logger = logging.getLogger(__name__)
    5
    
                  
  4. Faltten List/Dict of any depth Faltten List/Dict of any depth
    1
    def flatten(obj):  # to flatten multi level list and dict
    2
        if isinstance(obj, dict):
    3
            flat_obj = {}
    4
            for k, v in obj.items():
    5
                fv = flatten(v)