rabbit-slide-kou-okinawa-rubykaigi-02 2018.3.10.0 → 2018.3.10.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.rabbit +1 -1
- data/config.yaml +2 -2
- data/pdf/okinawa-rubykaigi-02-red-data-tools.pdf +0 -0
- data/red-data-tools.rab +38 -10
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: eba108e9007aa25faa9fd272b790795bba0fc75bb22ece0cebb81c7baf55b78d
|
4
|
+
data.tar.gz: bed5f584633e8f391de06fee92fe495a11e64ed4ee16c0746916753865fb5379
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1aaa7bcbada4f41270dab0e25af9559cf27947467de3bd4cbf3875bef5d0f02ab882a8e3ee48cb4c38023c9c1ded54334c1a4d77f16871fbb49960ff366f77a8
|
7
|
+
data.tar.gz: 8200735f145f3d76dff9384f363450d50d8d82f4d4997dfce27cdad79e9848a78fab12752ae9c085843866d01850ad2d78185f0ad5c5982f6b613956dcfec636
|
data/.rabbit
CHANGED
@@ -1 +1 @@
|
|
1
|
-
red-data-tools.rab
|
1
|
+
--size 800,450 red-data-tools.rab
|
data/config.yaml
CHANGED
@@ -8,10 +8,10 @@ tags:
|
|
8
8
|
presentation_date: 2018-03-10
|
9
9
|
presentation_start_time:
|
10
10
|
presentation_end_time:
|
11
|
-
version: 2018.3.10.
|
11
|
+
version: 2018.3.10.1
|
12
12
|
licenses:
|
13
13
|
- CC BY-SA 4.0
|
14
|
-
slideshare_id:
|
14
|
+
slideshare_id: okinawarubykaigi02
|
15
15
|
speaker_deck_id:
|
16
16
|
ustream_id:
|
17
17
|
vimeo_id:
|
Binary file
|
data/red-data-tools.rab
CHANGED
@@ -11,9 +11,9 @@
|
|
11
11
|
: date
|
12
12
|
2018-03-10
|
13
13
|
: start-time
|
14
|
-
2018-03-10T13:
|
14
|
+
2018-03-10T13:10:00+09:00
|
15
15
|
: end-time
|
16
|
-
2018-03-
|
16
|
+
2018-03-10T14:00:00+09:00
|
17
17
|
: theme
|
18
18
|
clear-code
|
19
19
|
|
@@ -74,7 +74,8 @@ Rubyコミュニティーを\n
|
|
74
74
|
|
75
75
|
= 協力例\n(('note:Apache Arrow'))
|
76
76
|
|
77
|
-
* Python
|
77
|
+
* Pythonの人達他と一緒に\n
|
78
|
+
C/C++のライブラリーを開発
|
78
79
|
* それぞれでバインディングを開発
|
79
80
|
* それぞれで同じライブラリーを活用
|
80
81
|
|
@@ -248,6 +249,7 @@ csv
|
|
248
249
|
|
249
250
|
row[index] # => field value
|
250
251
|
|
252
|
+
(('tag:center'))
|
251
253
|
(({dig}))の中では(({self}))の(({[]}))を呼べばよい
|
252
254
|
|
253
255
|
= (({[]}))の呼び方
|
@@ -312,9 +314,7 @@ Red Datasets
|
|
312
314
|
p page.title # タイトル
|
313
315
|
p page.revision.text # 本文
|
314
316
|
end
|
315
|
-
|
316
|
-
(('tag:center'))
|
317
|
-
(('note:インターフェイスがeachなのがカッコいいんだよ!'))
|
317
|
+
# インターフェイスがeachなのがカッコいいんだよ!
|
318
318
|
|
319
319
|
= 実装方法
|
320
320
|
|
@@ -492,7 +492,8 @@ Red Arrow
|
|
492
492
|
* バインディングを本体で開発
|
493
493
|
* 本体の開発チームに入った\n
|
494
494
|
* GObject Introspection(GI)を利用
|
495
|
-
* GIを使うとRuby
|
495
|
+
* GIを使うとRuby以外のバインディングも\n
|
496
|
+
自動生成できる\n
|
496
497
|
(('note:ポリシー1:コミュニティーを超えて協力'))
|
497
498
|
|
498
499
|
= Red Arrow
|
@@ -746,7 +747,7 @@ Fluent interface:\n
|
|
746
747
|
* GDK Pixbuf
|
747
748
|
* 画像オブジェクト
|
748
749
|
|
749
|
-
= オブジェクト変換例
|
750
|
+
= オブジェクト変換例1
|
750
751
|
|
751
752
|
# rouge ruby
|
752
753
|
|
@@ -870,6 +871,33 @@ Fluent interface:\n
|
|
870
871
|
end
|
871
872
|
end
|
872
873
|
|
874
|
+
= オブジェクト変換例2
|
875
|
+
|
876
|
+
# rouge ruby
|
877
|
+
|
878
|
+
# RelationをArrow形式に
|
879
|
+
users = User
|
880
|
+
.where("age >= ?", 20)
|
881
|
+
.to_arrow
|
882
|
+
|
883
|
+
= Relation→Arrow
|
884
|
+
|
885
|
+
# rouge ruby
|
886
|
+
|
887
|
+
module ArrowActiveRecord::Arrowable
|
888
|
+
def to_arrow(batch_size: 10000)
|
889
|
+
in_batches(of: batch_size).each do |relation|
|
890
|
+
column_values_set = relation.pluck(*column_names).transpose
|
891
|
+
data_types.each_with_index do |data_type, i|
|
892
|
+
column_values = column_values_set[i]
|
893
|
+
arrow_batches[i] << build_arrow_array(column_values, data_type)
|
894
|
+
end
|
895
|
+
end
|
896
|
+
# ...
|
897
|
+
Arrow::Table.new(...)
|
898
|
+
end
|
899
|
+
end
|
900
|
+
|
873
901
|
= Red Chainer
|
874
902
|
|
875
903
|
(('tag:large'))
|
@@ -960,8 +988,8 @@ ChainerのRuby移植
|
|
960
988
|
|
961
989
|
# Rubyのネームスペースの仕組みはモジュール
|
962
990
|
Module.new do
|
963
|
-
|
964
|
-
model =
|
991
|
+
include Chainer::Links
|
992
|
+
model = Model::Classifier.new(...)
|
965
993
|
end
|
966
994
|
|
967
995
|
= 開発したくなった?
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rabbit-slide-kou-okinawa-rubykaigi-02
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2018.3.10.
|
4
|
+
version: 2018.3.10.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- 須藤功平
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-03-
|
11
|
+
date: 2018-03-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rabbit
|
@@ -79,7 +79,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
79
79
|
version: '0'
|
80
80
|
requirements: []
|
81
81
|
rubyforge_project:
|
82
|
-
rubygems_version: 2.
|
82
|
+
rubygems_version: 2.7.6
|
83
83
|
signing_key:
|
84
84
|
specification_version: 4
|
85
85
|
summary: Red Data Tools
|