Skip to content

Instantly share code, notes, and snippets.

View toVersus's full-sized avatar

Tsubasa Nagasawa toVersus

View GitHub Profile
@toVersus
toVersus / reverse_elements.go
Last active April 16, 2018 12:28
[Language Processing 100 Essentials] #0: Reverse a string
package main
import (
"bufio"
"fmt"
"os"
"reflect"
"strings"
)
@toVersus
toVersus / extract_elements.go
Last active April 16, 2018 12:28
[Language Processing 100 Essentials] #1: Extract and concatenate odd-numbered elements from a string
package main
import (
"fmt"
"unicode/utf8"
)
func main() {
fmt.Printf("%s\n", delCharInSequence("パタトクカシーー"))
}
@toVersus
toVersus / concat_string_head.go
Last active March 30, 2018 15:14
[Language Processing 100 Essentials] #2: Concatenate two string alternately
package main
import (
"fmt"
"unicode/utf8"
)
func main() {
fmt.Printf("%#v\n", pileUpLeadChar("ace", "bdf"))
}
@toVersus
toVersus / count_word_length.go
Last active February 5, 2018 11:13
[Language Processing 100 Essentials] #3: Separate a string into words and create a list within length of each word from head to tail
package main
import (
"fmt"
"strings"
)
func main() {
str := "Now I need a drink, alcoholic of course, after the heavy lectures involving quantum mechanics."
str = strings.Replace(str, ".", "", -1)
@toVersus
toVersus / list_element_symbol.go
Created February 12, 2018 06:03
[Language Processing 100 Essentials] #4: List symbol element with map array
package main
import (
"fmt"
"strings"
)
func main() {
str := "Hi He Lied Because Boron Could Not Oxidize Fluorine. New Nations Might Also Sign Peace Security Clause. Arthur King Can."
a := []int{1, 5, 6, 7, 8, 9, 15, 16, 19}

Docker の監視ツール

Rancher OS の開発チームが公開した各監視ツールの比較記事です。 Comparing 7 Monitoring Options for Docker

次の 5項目をそれぞれ 5段階で評価しています。

  1. デプロイが簡単か
  2. 取得できる情報の詳細度
  3. 全コンテナからの集計度
  4. アラートの生成
  5. Docker 以外のリソース監視

Jupyter Notebook

導入環境

ホスト OS

  • VM サイズ: Standard D2 v3 (2 vcpu 数、8 GB メモリ)
  • OS: Windows 10, Version 1709 (OS Build 16299.64)
  • VirtualBox: v5.1.30
  • Vagrant: v2.0

ゲスト OS

@toVersus
toVersus / ncr.go
Created February 12, 2018 23:20
nCr is an extended math library to calculate combinations
package ncr
func permutation(x, y uint) uint {
if x <= y || y == 0 {
return 0
} else if y == 1 {
return x
}
return x * permutation(x-1, y-1)
}
@toVersus
toVersus / bi-gram_word.go
Created February 13, 2018 13:06
[Language Processing 100 Essentials] #5-A: Create a function to generate a word bi-gram from given string
package main
import (
"fmt"
"strings"
)
func main() {
fmt.Printf("%#v\n", BiGramWord2("I am an NLPer"))
}