This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
export CUSTOM_SPARK_VERSION="3.1.1" | |
export CUSTOM_PYSPARK_VERSION="3.1.1" | |
export CUSTOM_HADOOP_VERSION="3.2" | |
export CUSTOM_HADOOP_VERSION_INDEX="3" | |
export JAVA_HOME="/usr/lib/jvm/java-8-openjdk-amd64" | |
export SPARK_HOME="/content/spark-$CUSTOM_SPARK_VERSION-bin-hadoop$CUSTOM_HADOOP_VERSION" | |
export CUSTOM_SPARK_JARS="$SPARK_HOME/jars" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* iframe code */ | |
var callId = Math.random(); | |
function __receiveTealiumMessage(event) { | |
var tealiumMasterTagCallIdentifier = '__rtiShareDl'; | |
var event_data = {}; | |
try { | |
event_data = JSON.parse(event.data); | |
} catch (e) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var __firstSessionCookieName = '$$FIRST_SESSION_COOKIE_NAME$$'; | |
var __returningSessionCookieName = '$$RETURNING_SESSION_COOKIE_NAME$$'; | |
var __cookieExpiration = '$$COOKIE_GMT_EXPIRATION$$'; | |
var __reviveFirstSession = true; //Revive first session and avoids saving returning session | |
var __customCampaignParam = '$$CUSTOM_CAMPAIGN_QUERY_PARAM$$'; | |
function __crumbleCookie(a) { | |
for (var d = document.cookie.split(";"), c = {}, b = 0; b < d.length; b++) { | |
var e = d[b].substring(0, d[b].indexOf("=")).trim(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let js_obj = {a:'test_track', b:2}; | |
function __getSlackFields(data){ | |
var fields = []; | |
Object.keys(data).map((key) => { | |
fields.push({ title: key, value: data[key], short: true }); | |
return key; | |
}); | |
return fields; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import requests | |
PLAYLIST_URI = os.environ['PLAYLIST_URI'] | |
SPOTIFY_TOKEN = os.environ['SPOTIFY_TOKEN'] # from default api login or more easily from chrome network inspecting calls directed to api.spotify.com | |
url = "https://api.spotify.com/v1/playlists/{}".format(PLAYLIST_URI) | |
querystring = {"type": "track,episode", "market": "from_token"} | |
headers = { |