sys.path.insert(0, spark_home + '/python')
sys.path.insert(0, os.path.join(spark_home, 'python/lib/py4j-0.9-src.zip'))
pyspark_submit_args = os.environ.get('PYSPARK_SUBMIT_ARGS', '')
How to run custom Python script on Jupyter Notebook launch (to boot Spark)?