javascript import tinykeys from "tinykeys"tinykeys(window, {"Shift+D": () => {alert("The 'Shift' and 'd' keys were pressed at the same time")},"y e e t": () => {alert("The keys 'y', 'e', 'e', and 't' were pressed in order")},"$mod+KeyD": () => {alert("Either 'Control+d' or 'Meta+d' were pressed")},})
Go 语言的数据处理库。该库提供了类似 Python 语言 Pandas 库的功能,以及 Series 和 DataFrames 的数据结构,支持用列的方式高效地处理数据```go type User struct {Name string Age int Accuracy float64}users := []User{{"Aram", 17, 0.2},{"Juan", 18, 0.8},{"Ana", 22, 0.5},}df := dataframe.LoadStructs(users)fmt.Println(df)// Output:// [3x3] DataFrame//// Name Age Accuracy// 0: Aram 17 0.200000// 1: Juan 18 0.800000// 2: Ana 22 0.500000//```
Go 的高性能多语言分词库。它是结巴分词的 Go 语言实现,支持中文和接入 ES 等功能```go text = "《复仇者联盟3:无限战争》是全片使用IMAX摄影机拍摄制作的的科幻片."// use DAG and HMM hmm := seg.Cut(text, true)fmt.Println("cut use hmm: ", hmm)// cut use hmm: [《复仇者联盟3:无限战争》 是 全片 使用 imax 摄影机 拍摄 制作 的 的 科幻片 .]```