Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import base64
from hdijupyterutils.constants import EVENTS_HANDLER_CLASS_NAME, LOGGING_CONFIG_CLASS_NAME
from hdijupyterutils.utils import join_paths
from hdijupyterutils.configuration import override as _override
from hdijupyterutils.configuration import override_all as _override_all
from hdijupyterutils.configuration import with_override
from .constants import HOME_PATH, CONFIG_FILE, MAGICS_LOGGER_NAME, LIVY_KIND_PARAM, \
LANG_SCALA, LANG_PYTHON, LANG_R, \
SESSION_KIND_SPARKR, SESSION_KIND_SPARK, SESSION_KIND_PYSPARK, CONFIGURABLE_RETRY
from sparkmagic.livyclientlib.exceptions import BadUserConfigurationException
import sparkmagic.utils.constants as constants
d = {}
path = join_paths(HOME_PATH, CONFIG_FILE)
def override(config, value):
_override(d, path, config, value)
def override_all(obj):
_override_all(d, obj)
_with_override = with_override(d, path)
# Helpers
def get_livy_kind(language):