Skip to main content

utils.misc.misc_utils

Miscellaneous utility functions

snake2camel#

def snake2camel(name)

This method changes input name from snake format to camel format.

Arguments:

  • name str - snake format input name.

Returns:

  • name str - camel format input name.

clear_dir#

def clear_dir(path, skips=None)

This method deletes the contents of the directory for which path has been provided and not included in the skips list.

Arguments:

  • path str - Path for directory to be deleted.
  • skips List[str] - List of paths for sub directories to be skipped from deleting.

debug#

def debug(method)

This method wraps input method with debug calls to measure time taken for the given input method to finish.

Arguments:

  • method function - Method which needs to be timed.

Returns:

  • debugged method - debugged function.