Skip to content

Instantly share code, notes, and snippets.

View chy168's full-sized avatar
🤠

Hung-Yen chy168

🤠
  • Taiwan
View GitHub Profile
@chy168
chy168 / gist:c599a2b2f85697a942e6
Created March 5, 2016 03:24
Spark Mllib K-means example
// k-mean
import org.apache.spark.mllib.clustering.{KMeans, KMeansModel}
import org.apache.spark.mllib.linalg.Vectors
import org.apache.spark.mllib.regression.LabeledPoint
case class Data(userId: String, videoId: String, isKid: String)
val raw_data = sc.textFile("/Users/zzchen/Downloads/locked_video_up5.csv").map { line =>
val f = line.split(",")
Data(f(0),f(1).split("=")(1),f(5))
@chy168
chy168 / docker-compose.yml
Created December 1, 2016 11:18 — forked from cboettig/docker-compose.yml
debugging NGINX configuration for Jupyter
jupyter:
image: jupyter/datascience-notebook
environment:
- PASSWORD=${PASSWORD}
nginx:
image: nginx
links:
- jupyter
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: testing
labels:
component: db
spec:
template:
metadata:
labels:
@chy168
chy168 / NOTE
Last active June 6, 2022 01:43
zsh theme for display kube context
## Pre-install package
https://github.com/jonmosco/kube-ps1