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
# Calico Version v3.4.4 | |
# https://docs.projectcalico.org/v3.4/releases#v3.4.4 | |
# This manifest includes the following component versions: | |
# calico/node:v3.4.4 | |
# calico/cni:v3.4.4 | |
# calico/kube-controllers:v3.4.4 | |
# This ConfigMap is used to configure a self-hosted Calico installation. | |
kind: ConfigMap | |
apiVersion: v1 |
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
from __future__ import division | |
import random | |
import numpy as np | |
import matplotlib | |
matplotlib.use('TkAgg') | |
import matplotlib.pyplot as plt | |
# epsilon values | |
EPSILON_VALUES = [0.0, 0.01, 0.1] |
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
from pyspark import since, keyword_only | |
from pyspark.ml.param.shared import HasInputCol, HasOutputCol, Param | |
from pyspark.ml.util import JavaMLReadable, JavaMLWritable | |
from pyspark.ml.wrapper import JavaTransformer | |
class Stemmer(JavaTransformer, HasInputCol, HasOutputCol, JavaMLReadable, JavaMLWritable): | |
@keyword_only | |
def __init__(self, inputCol=None, outputCol=None): | |
super(Stemmer, self).__init__() |
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
// Permutations are using all elements in the sequence | |
import scala.collection.mutable.ArrayBuffer | |
// Mutable version | |
def permutationsM[T](s: Seq[T]): Seq[Seq[T]] = { | |
if (s.length < 2) { | |
Seq(s) | |
} | |
else if (s.length == 2) { |
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 requests._ | |
import org.json4s._ | |
import org.json4s.jackson.{JsonMethods => Json} | |
import org.json4s.JsonDSL.WithBigDecimal._ | |
import scala.concurrent._ | |
import scala.concurrent.duration._ | |
// import ExecutionContext.Implicits.global | |
import java.lang.Runtime |
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 boto3 | |
import subprocess | |
import configargparse | |
SSH_USER = 'hadoop' | |
SSH_TEMPLATE = 'ssh -o StrictHostKeyChecking=no -i {ssh_key} {ssh_user}@{host} "{cmd}"' | |
SSH_KEY_PATH = os.path.expanduser('~/.ssh') | |
def find_ssh_key(emr, config): |
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 re | |
def expand_hadoop_path(path): | |
brace_patterns = re.findall('{{[^}]+}}', path) | |
brace_patterns_values = [(brace_pattern, brace_pattern.replace('{{','').replace('}}','').split(',')) for brace_pattern in brace_patterns] | |
replacements = [] | |
for (brace_pattern, values) in brace_patterns_values: | |
if replacements: |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder