Skip to content

Instantly share code, notes, and snippets.

volumes = [{
"name": "input_data",
"persistentVolumeClaim": {"claimName": 'my_pvc'}
}]
volume_mounts = [{
"name": "input_data",
"mountPath": "/data"
}]
def prep_data(input_param):
# TO BE IMPLEMENTED
def train_model(input_param):
# TO BE IMPLEMENTED
import pandas as pd
def prep_data(input_param):
df = pd.read_parquet(input_param['input_data']
return df
def train_model(input_param):
# TO BE IMPLEMENTED
import pandas as pd
def prep_data(input_param):
df = pd.read_parquet(input_param['input_data']
return df
# The library for responding feature branch and developer,
# avoid conflict in case other people using the same Databricks cluster
# but working on other feature branch
dbutils.library.install("dbfs:/path/to/<feature_brach_name>/<developer_id>/library.egg")
# Removes Python state, but some libraries might not work without calling this function
dbutils.library.restartPython()
[Unit]
Description=Jupyter Notebook
[Service]
Type=simple
PIDFile=/run/jupyter.pid
# Step 1 and Step 2 details are here..
# ------------------------------------
#Note: `workon tf` is to switch to tf virtualenv where i have jupyter installed
ExecStart=/bin/bash -c 'cd /home/keven/notebooks && source /home/keven/.profile && workon tf && jupyter notebook'
@theone4ever
theone4ever / gist:3fda9ca29e914bb5daafebe2a72e0f55
Created December 19, 2016 14:04 — forked from thomaspouncy/gist:e620d32d636f764df261
Natural Language Processing with Spark Code
import org.apache.spark.SparkContext
import org.apache.spark.SparkContext._
import org.apache.spark.SparkConf
import org.apache.spark.sql._
import org.apache.spark.sql.types._
/* We use this to pass configuration properties to Vertica and CoreNLP */
import java.util.{Properties, UUID}
#!/bin/sh
set -e
#
# This script is meant for quick & easy install via:
# 'curl -sSL https://get.docker.com/ | sh'
# or:
# 'wget -qO- https://get.docker.com/ | sh'
#
# For test builds (ie. release candidates):
# 'curl -fsSL https://test.docker.com/ | sh'
@theone4ever
theone4ever / GStreamer-1.0 some strings.sh
Created August 30, 2016 07:27 — forked from strezh/GStreamer-1.0 some strings.sh
GStreamer-1.0 personal cheat sheet
#!/bin/bash
# play YUV444 FULL HD file
gst-launch-1.0 -v filesrc location=size_1920x1080.yuv ! \
videoparse width=1920 height=1080 framerate=25/1 format=GST_VIDEO_FORMAT_Y444 ! \
videoconvert ! \
autovideosink
# play YUV422 FULL HD file
gst-launch-1.0 -v filesrc location=size_1920x1080.yuv ! \