Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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):
if language == LANG_SCALA:
return SESSION_KIND_SPARK
elif language == LANG_PYTHON:
return SESSION_KIND_PYSPARK
elif language == LANG_R:
return SESSION_KIND_SPARKR
else:
raise BadUserConfigurationException("Cannot get session kind for {}.".format(language))
def get_auth_value(username, password):