Skip to content

Instantly share code, notes, and snippets.

View liyuqi's full-sized avatar

liyuqi liyuqi

  • Taipei
View GitHub Profile

Q1.pykafka

給定kafka-producer-perf-test條件,模仿輸出下列結果。

條件說明:100000筆,每筆大小100字,滿200字送出,不壓縮,對perf11類別,同步1 thread

# kafka-producer-perf-test.sh
# --broker-list 172.28.128.22:9092,172.28.128.23:9092,172.28.128.24:9092
# --messages 100000
# Dengue fever in R

1 jupyter with python and R

透過jupyter互動式網頁寫腳本,有助於git分享結果。

本篇將jupter安裝在ubuntu 14.04 server 上, 可透過https 方式連線,編寫python、R程式。

1.1 安裝虛擬機

#5 Aggregations in 5 Minutes: The Nickel Tour of the Aggregation Framework
###Sample Document
```
mongos> db.logs.findOne()
{
"_id" : ObjectId("556172a53004b760dde8a488"),
"d_id" : ObjectId("556172a53004b760dde8a443"),
"v" : 6205,
"timestamp" : ISODate("3129-12-13T02:03:17.906Z"),