$kubectl get pods -o wide
$kubectl get pods
$kubectl get rc
__author__ = 'renienj' | |
#!/usr/bin/env python | |
import sys | |
def read_input(file): | |
for line in file: | |
# split the line into words | |
yield line.split() |
<!doctype html> | |
<html> | |
<head> | |
<title>Network | Basic usage</title> | |
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.0.0-beta1/jquery.min.js"></script> | |
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/vis/4.15.0/vis.js"></script> | |
<script type="text/javascript" src="pos-pattern.js"></script> | |
<link href="https://cdnjs.cloudflare.com/ajax/libs/vis/4.15.0/vis.css" rel="stylesheet" type="text/css" /> |
__author__ = 'renienj' | |
import numpy as np | |
def compute_jaccard_similarity_score(x, y): | |
""" | |
Jaccard Similarity J (A,B) = | Intersection (A,B) | / | |
| Union (A,B) | | |
""" | |
intersection_cardinality = len(set(x).intersection(set(y))) |
__author__ = 'renienj' | |
import numpy as np | |
import pandas as pd | |
import math as math | |
def compute_tfidf(tf_list, idf_list): | |
""" | |
tfidf = tf(w) * idf(w) |
__author__ = 'renienj' | |
def compute_gram(doc_data, k=2): | |
""" | |
In natural language processing a w-shingling is a set of unique "shingles" | |
(n-grams, contiguous subsequences of tokens in a document) | |
Very much similar to n-grams but here we consider characters | |
""" |
__author__ = 'renienj' | |
import urllib | |
from itertools import combinations | |
import time | |
from collections import defaultdict | |
""" | |
Sample Data Sets | |
---------------- |
object NGram { | |
/** | |
* Split the sentence | |
* @param data documents | |
* @param splitter the delimiting regular expression | |
* @return the array of strings computed by splitting this string | |
* around matches of the given regular expression | |
*/ | |
private def split(data: String, splitter: String): Seq[String] ={ |
import scala.util.hashing.MurmurHash3 | |
def md3(s: String) = { | |
MurmurHash3.stringHash(s).toString | |
} | |
val hasehd = List(md3("1"), md3("2"), md3("3"), md3("Product:12345"), md3("Product:12346"), md3("Product:12347")) | |
val unhashed = List("1", "2", "Product:12345", "Product:12346", "Product:12347", "3") |