Python
PythonでgRPCを扱う方法です。クライアント側だけの紹介です。 Protocol Buffersの定義ファイルを用意します。 crawl.proto syntax = 'proto3'; package proto; service Crawler { rpc Crawl(CrawlRequest) returns (CrawlResponse); } message CrawlRequest…
ここではPython 3.7を使った方法を紹介します。 絵文字の判定 現時点の最新版であるUnicode® Emoji Charts v11.0では、絵文字のUnicodeは1F600から1F3F4の範囲でコードが振られています。 なので、Unicodeの範囲を指定すればいけるじゃんと思っていたのです…
Cloud Dataflow pipeline上で自作パッケージを使う場合は setup.py を作成して --setup-file オプションで指定しなければなりません。 以下のようなディレクトリ構成で main.py が my-package に依存していたとします。 Dataflow |- my-package/ |- helper.p…
TL;DR google-cloud-datastoreの代わりにCloud Datastore’s helper methodを使用する。 より詳しく Apache Beam pipelineのインスタンスを作る直前にCloud Datastoreからデータを取得したいと思い ReadFromDatastore を Cloud Dataflow上のapache_beam.io.gc…
If you run Cloud Dataflow pipeline with some your local package, you must create setup.py and specify --setup-file option. Assume that you have a directory structure like below and main.py depends on under the my-package packages. Dataflow…
TL;DR Use Cloud Datastore's helper method instead of google-cloud-datastore. More Details I wanted to read data from Datastore before running an Apache Beam's pipeline that uses ReadFromDatastore from apache_beam.io.gcp.datastore.v1.datast…
I created simple examples of the rotation and shear mapping of linear algebra for understanding. My examples this repository. This visualized example was very helpful for understanding eigenvectors and eigenvalues. Rotation The rotation us…