程式設計週記[2016/10/14]: Learning how to using Machine Learning

這是什麼? 程式週記主要內容如下: Gihub project 介紹: 主要會貼一些github,但是會盡量寫上一些有用的評語(或是我容易想到的關鍵詞)幫助以後查詢 網路文章心得: 會寫些心得,強迫自己閱讀. “程式週記”並且定期週期性更新. 大部分內容在我的twitter都會有,這邊只是將一些簡單的心得與感想註解一下. 本週摘要 小孩子得了腸病毒,在家休養了一個禮拜.每天都在學習機器學習 (好像回文). 這次竟然花了兩個禮拜才整理出來,下週要改進. Go sourcegraph/checkup : Distributed, lock-free, self-hosted health checks and status pages checkup 是一個 #golang 專門拿來做應用程式健康檢查 (Health Check) 用的工具. 你可以使用 JSON 定義要檢查的應用程式網路與方式 (TCP/HTTP) 然後使用 CLI 的方式來執行. 也提供直接在 Programming 處理的方式. 支援 HTTP, TCP (並且支援 TLS) 與 AWS S3. 運用層面相當廣泛的好工具… 他們也寫了篇部落格來解釋他們為何需要自行研發這樣的產品. Why we open-sourced our uptime monitoring system heetch/LAPJV: Go implementation of the LAPJV algorithm 這個用來解決 Assignment Problem (任務指派問題)也就是將 n 個工作分配給 m 個人如何達到最大的有效的分配方式的問題. 一般而言的解決方式會是透過匈牙利演算法,而這段代碼使用了另外一個方式 Liner-Assignment-Problem Jonker-Volgenant algorithm 來大大的提升計算效能. 似乎無法找到論文(要錢),不過這邊有稍微講到如何做到 LAPJV . astaxie/bat : Go implement CLI, cURL-like tool for humans 類似 httpie 使用 Golang 作出的 CLI curl 工具。 這個套件的作者 Asta Xie 也就是 BeeGo 的作者. 參考 Httpie 重新以 Go 來打造的工具,使用了 Go Routine 讓整個軟體更加具有效能. noqcks/gucci : A simple cli templating tool written in golang noqcks/gucci 使用 #golang 寫的 template 工具。 可以透過樣板的替換方式,來讀取系統變數或是執行結果。 EBOOK : Webapps in Go (without) framework 免費的 #Golang Ebook ,使用最基本的 built-in package 來建置 Go Web App.還有 Go 語言的基礎教學,還不錯的書籍. pygo:...
繼續閱讀

[Kubernetes] Authorization and Admission Survey

This slide show some note about Authorization and Admission in Kubernetes. It include some detail about: Authorziation ABAC RBAC Admission Service Account Secret Link About Authenication: Still working understanding how to do Authenication in Kubernetes. Using access tokens to secure microservices API Security: The 4 Defenses of The API Stronghold How To Control User Identity Within Microservices Microservices in Practice Adding an OpenID Connect identity provider OpenID Connect FAQ and Q&As SCIM: System for Cross-domain Identity Management
繼續閱讀

[GCPUG] 參加 GCPUG + Flink 小筆記

前言 話說強者我同事 Simon Su 是 GCPUG 是主辦者. 當然還是得特地跟老婆請假來彭場一下,加上本週有不少資料科學相關的講題. 1. Apache Beam in Big Data Pipeline by Randy Huang - Data Architect at VMFive Why use beam? If you want to decompose your task into pipeline. You can focus on algorithm. It could run on Flink, Storm and Spark. So you can write code once run anywhere. Q&A What is the pain point if such application has so much runner? (spark, flink, storm) Ans: No, pain point until now. Sometime CEP for Flink but might not able to use in Beam. Beam is follow Flink related API closely. Related Link: Beam website Embulk: Pluggable Bulk Data Loader. 2.Kubernetes 使用心得分享 by Gene Liu / LIVEhouse.in Self healing in second. Master will use 0.4 CPU in etcd. Q&A Is any way to assign random port in Kubernetes Cluster if we want to run random replica? Ans: Use node pool Why use kubernetes? Ans:...
繼續閱讀

[Kubernetes] 透過 Kubernetes 1.4 新功能 Kubeadm 來建立 Kubernetes Cluster

緣起 2016/09/26 Google 推出了新版的 Kubernetes 1.4 裡頭最讓人期待的,就是 kubeadm 這個新的功能. 本來很期待他能夠讓 Kubernetes 變得更容易安裝並且加入新的節點,所以就試玩了一下.發現功能都還蠻強大的.不僅僅是變得更容易安裝,其實根本就是跟 docker swarm mode 致敬啊.整個變得簡單到不行. 建立機器 這邊只建議兩個 OS 版本: Ubuntu 16.04 CentOS 7 備註: 如果你使用 docker-machine 來建立 VM 獲釋 GCP 上面的機器,預設的 Ubuntu 是 15.10 ,是無法順利安裝完畢的. 下載相關的 binary 每一台電腦(包括 Master 跟 Node 都得執行)所有的指令都是透過 sudo su - # curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - # cat <<EOF > /etc/apt/sources.list.d/kubernetes.list deb http://apt.kubernetes.io/ kubernetes-xenial main EOF # apt-get update # apt-get install -y docker.io kubelet kubeadm kubectl kubernetes-cni 啟動 Master 就像是 docker swarm mode 的 master 一樣,只要一行指令就好. kubeadm init 詳細會出現的螢幕如下 # kubeadm init <master/tokens> generated token: "306d01.da88f33b20103873" <master/pki> created keys and certificates in "/etc/kubernetes/pki" <util/kubeconfig> created "/etc/kubernetes/kubelet.conf" <util/kubeconfig> created "/etc/kubernetes/admin.conf" <master/apiclient> created API client configuration <master/apiclient> created API client, waiting for the control plane to become ready <master/apiclient> all control plane components are healthy after 51.538064 seconds <master/apiclient> waiting for at least one node to register and become ready <master/apiclient> first node is...
繼續閱讀

[Linux] Summary how to retreival system info

Data Q&A How to get disk and network stat? Try to usse sar (detail usage) How could I get GPU info? Try to use glxinfo (detail usage) How to get OS version? Checking your Ubuntu Version You also can get other detail on /proc (detail spec), such as: cpu memory process info (id, usage, … other) DMA info Other Links How to get GPU info? 10 Useful Sar (Sysstat) Examples for UNIX / Linux Performance Monitoring Checking your Ubuntu Version /proc spec
繼續閱讀

程式設計週記[2016/09/30]: 資料科學家除了專業度.全局觀與信任度外,最重要的是想像力!

這是什麼? 程式週記主要內容如下: Gihub project 介紹: 主要會貼一些github,但是會盡量寫上一些有用的評語(或是我容易想到的關鍵詞)幫助以後查詢 網路文章心得: 會寫些心得,強迫自己閱讀. “程式週記”並且定期週期性更新. 大部分內容在我的twitter都會有,這邊只是將一些簡單的心得與感想註解一下. 本週摘要 最近除了學習 Kubernetes 之外,還有加強自己對於 Machine Learning 的了解.不論是各種方式與如何驗證的手段.其實要學的東西真的不少,但是就是時間越來越少. Go Reversing GO binaries like a pro 來看看如何透過 ADA (專業的 reverse engineering 軟體 ) 來反組譯 Go 的應用程式. GopherCon 2016: Renee French - The Go Gopher A Character Study Rob Pike 的老婆 Renée French 也就是眾所皆知的 Gopher 圖形發明者,講解了 Gopher 的發明過程.沒有任何程式碼但是相當有趣. 也可以看到許多可愛的 Gopher 圖案,還有 Gopher 圖案的設計規範與理念. Mini-Workshop: Build a Web App with Francesc Francesc Campoy Flores 線上教你如何透過 #golang 建置 Web App . 2016/10/11 開始,記得先報名一起來看線上直播喔. The Three Go Landmines 三個常見的 Golang 的錯誤. Awesome Go 許多好用及相當好的 Golang 套件集合. reloadproxy restarts your server and reloads what’s in your browser, anytime any changes are detected. 一個很有趣的專案,透過監控的方式當你修改程式碼, Web App 會即時更新內容,不需要重新編譯執行. Youtube: Go generate, generics, and you 透過 go generate ( Golang 裡面自動產生程式碼的工具 ) 來達到 generic 的目的. Thread-Safe Lock Free Priority Queues in Golang 講解透過 Golang 如何達到沒有 lock 又能滿足 thread-safe 的 priority queue (擁有優先權的 queue ) Github 在這裡 Idiomatic Go 許多 Golang...
繼續閱讀