some tech and other talks

ruby, rails, book reviews, etc

Nov 20, 2021 - 15 minute read

Similarities between Matrix series and Nausicaa of the Valley of the Wind

The Matrix 4 is coming out! I love this series and I can’t wait for it now. I personally like Matrix the 2nd and the 3rd ones as well, but I think they tend to have fewer fans because the story is more complicated and harder to understand compared to the 1st one. When I first saw them, I lost confidence in myself to follow the story in the middle of the 2nd, but after I realized that the structure of the story was similar to the manga version of Nausicaä of the Valley of the Wind that I had read, I was able to enjoy watching it very much (whether I understood it properly or not).

Nov 19, 2021 - 1 minute read

マトリックスと風の谷のナウシカの共通点について

マトリックス4が公開されますね!このシリーズ大好きなので今から待ち遠しいです。 個人的にマトリックスの2と3も好きなのですが、1に比べると話が複雑になり、理解しづらくなるからかファンが少ない傾向にあると思います。 私も最初見たときは2の途中からついていっている自信がなくなりましたが、その後読んだ風の谷のナウシカの漫画版と話の構造が似ていることに気づいてからは、(私がちゃんと理解できているかはともかく)非常に楽しく鑑賞出来るようになりましたので、そのことについて触れてみたいと思います。ちなみに話の内容については説明しないので、未見の方は以下のリンクより購入してフォローしてください。 For English veriosn, please access here マトリックス コンプリート・トリロジー [Blu-ray] amazon.co.jp 風の谷のナウシカ 全7巻箱入りセット amazon.co.jp 風の谷のナウシカ [Blu-ray] amazon.co.jp 以降はネタバレとなりますのでご注意ください。 また、当然ですが、マトリックスは攻殻機動隊をはじめ、多くの作品の影響を受けて作られていますし、風の谷のナウシカもそうであると思います。 そのため、この2作品のみを比較して語ること自体がバランスを欠いた物語の理解に繋がる可能性はありますので、その点はご容赦ください。 単純に2作品が似ている、と言いたいだけのポストです。 最後に、ここで語る内容については完全に私の私見"のみ"であり、監督や関係者のインタビューなどで裏を固めた文章ではありませんのでご注意ください。 はじめに 風の谷のナウシカはスタジオジブリの1作目の映画で、同名の漫画が原作になっています。 漫画の連載開始が1982、映画の公開が1984、そしてその後漫画の制作が継続され1994に完結しています。 つまり、映画版は原作の漫画のほんの一部であり、実際に7巻あるうちの2巻目の途中で映画の内容は終わってしまいます。 映画版については非常に分かりやすいストーリー構成になっているのですが、その後の漫画版は非常に複雑で難解と言えます。 物語を難解にしている要素の一つは、この物語が内容が読み手の期待した方向に向かわない点です。 映画版で見ていたナウシカは生き物すべてを愛する、優しく美しい少女です。 映画版で自分を犠牲にして王蟲を助ける姿に感動した観客としては、その後の漫画版でも無垢なままのナウシカが健気に活躍する姿を予想したくなります。 ところが、その後のナウシカは巨神兵を操り、血みどろになりながら人類の闇と向き合う人物に変わっていきます。 ナウシカ自身が一生懸命であることには変わりないのですが、読み手としてはこの変化についていけないと物語の理解が進まなくなると思います。 同様にマトリックスも1は分かりやすいSF映画で、自らが背負った運命に戸惑いながらも仲間との友情やトリニティの愛により覚醒していくネオの冒険活劇、という普遍的なストーリーになっていると思います。 1のクライマックスからネオがマトリックスにつながれた全人類を救う続編を期待した人も多かったのではないでしょうか? ところが、全人類を救うはずだったアーキテクトとのコンタクトから物語は急展開し、3でのネオはザイオンを救うものの、ライバルのエージェント・スミスには負けた形となり、さらにマトリックスのシステムにつながった人たちはどうなったんだろう?という疑問に答えないまま物語は終了します。 そのため、見た後にどうもスッキリ出来ないという感覚になると思います。 マトリックスとナウシカはこの客を裏切る展開という点だけではなく物語の構成自体や登場人物の役割などに共通点があると思います。(Visualでの共通点、というか影響については既に語られていますので こちら をどうぞ) これらを比較していくと、より両者のストーリー展開の理解が進むので面白いと思います。 では、1つずつ共通点を見ていきましょう。 1. 背景 どちらの世界でも人類は瀕死の状態にあります。 マトリックスでは機械の脅威にさらされ、ナウシカでは腐海と戦争の脅威にさらされています。 2. 救世主の存在と運命 どちらの世界においても救世主が現れてこの世界を救うという予言が流布しています。 マトリックスではネオが"the one"、ナウシカではナウシカが"青き衣の者"としてこれに該当します。

Nov 12, 2017 - 3 minute read

Add Google Plus and Instagram Login with Omniauth + Devise on Rails5

This post shows how to implement google plus and instagram login with omniauth and devise on rails5. This change totally depends on my previous implementation for facebook and twitter, so if you are new to implement this, you should look at those posts first. I write about google plus first, then add instagram login later. Implement Google Plus Login 0. Get Google APP ID and SECRET You can get CLIENT ID and CLIENT_SECRET from here.

Aug 22, 2017 - 2 minute read

How to access MapR Streams from Python bindings

From MEP 3.0, MapR offers Python binding for MapR Streams. This article show how to use it with sample code. Step 0. The environment is as follows. CentOS : 7.2 MapR 5.2.2 MEP 3.1 python-2.7.5-48.el7.x86_64 python-devel-2.7.5-48.el7.x86_64 Step 1. Create stream and topic as follows. $ maprcli stream create -path /streams/python-test-stream -produceperm p -consumeperm p -topicperm p $ maprcli stream topic create -path /streams/python-test-stream -topic test-topic Step 2. Install what you need.

May 24, 2017 - 3 minute read

How to setup Squirrel SQL Client on Mac for Hive, Drill, and Impala on MapR cluster

This post shows how to setup Squirrel SQL client for Hive, Drill, and Impala on Mac. I assume Mac client is already setup and this is the case with MapR 5.2.1 and MEP 3.0. Change the version numbers if you set up with other MapR or MEP versions. Install Squirrel Go to http://www.squirrelsql.org/#installation and follow the instruction. Then, Launch Squirrel App from Application Directory. Use Hive from Squirrel You have to follow three steps, bring jars, configuration, and run the query.

Jan 9, 2017 - 2 minute read

Add twitter login with Omniauth + Devise on Rails5

This post follows previous post How to use Omniauth + Devise on Rails5 from scratch, which is about how to setup facebook login. This post shows how to additionally setup twitter login. You can get APP ID and APP SECRET from here. 1. initial step add omniauth-twitter in Gemfile $ diff --git a/Gemfile b/Gemfile index de3f792..271a916 100644 --- a/Gemfile +++ b/Gemfile @@ -56,3 +56,4 @@ gem 'devise' gem 'omniauth' gem 'omniauth-facebook' gem 'dotenv-rails' +gem 'omniauth-twitter' $ bundle install $ gem list | grep omniauth omniauth (1.

Nov 10, 2016 - 5 minute read

How to use Omniauth + Devise on Rails5 from scratch

This post is no-brainer step by step memo to use omniauth and devise on rails5 for setting up oauth webapp with facebook. Rails 5.0.0.1, ruby 2.3.0, devise 4.2.0, omniauth 1.3.1, omniauth-facebook 4.0.0 are used. 0. env & requiement $ ruby -v ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-darwin15] $ rails -v Rails 5.0.0.1 Obtain facebook AppID and AppSecret from https://developers.facebook.com/ 1. initial steps create rails app $ rails new omniauth && cd omniauth modify Gemfile and add devise and omniauth

Oct 29, 2016 - 2 minute read

Behavior of Hbase Read/Write Requests Counter

HBase has Read/Write Requests System Counter feature and we can monitor it from HBase Web UI or API. Against my instincts, the numbers of those counters could DECREASE while running. This article covers how we could see the decrease of those counters. We can see read/write request counters of HBase from http://master-server-node:60010/master-status#requestStats or http://region-server-nodes:60010/jmx These numbers are calculated by summing each region’s counts. Check the iteration part of the code. https://github.

Mar 20, 2016 - 1 minute read

install npm package from npm pack-ed file using ansible

In case you want to install npm package file, created by “npm pack” command, just specify the path to the file to “name”. description: Install "sample" node.js package, created by "npm pack", located at /tmp/sample.tar.gz - npm: name=/tmp/sample.tar.gz path=/app/location That’s it.

Nov 15, 2015 - 1 minute read

use extra-vars of ansible from packer

ansible’s "–extra-vars" is the option to pass variables from command line. In using packer with ansible, you can still specify “–extra-vars” through packer’s “extra_arguments”. Here’some example. ansible We consider the case that we specify parameter “base_ami”, “parameter_1”, and “parameter_2” for ansible. {% raw %} $ cat sample.yml - hosts: sample roles: sample_dir vars: base_ami: '{{ base_ami }}' parameter_1: '{{ parameter_1 }}' parameter_2: '{{ parameter_2 }}' {% endraw %}