If you only need to know who was the last person to change the line, git blame will do

To see who modified the code on line # 85 and next 5 lines

git blame ${path-to-the-file} -L 85,+5

output would look like this

f1f66980053 (Naoko         2019-02-25 17:32:25 -0700 85)                 text = re.sub(r'{([^\n]+?)}', r'{0[\1]}', template["text"])
50ccaf0f3b8 (Naoko         2019-02-16 10:44:54 -0700 86)                 template["text"] = text.format(template_vars)
f373fd241db (Tom Bocklisch 2018-07-10 14:33:18 +0200 87)             except KeyError as e:
f373fd241db (Tom Bocklisch 2018-07-10 14:33:18 +0200 88)                 logger.exception(
390792a0008 (Tom Bocklisch 2018-11-16 12:51:21 +0100 89)                     "Failed to fill utterance template '{}'. "

But often the above information is not good enough.

Since Git 1.8.4, git log has -L to view the evolution of a range of lines.

git log --pretty=short -u -L 85,+5:${path-to-the-file}

The output would look like this

diff --git a/rasa_core/nlg/template.py b/rasa_core/nlg/template.py
--- a/rasa_core/nlg/template.py
+++ b/rasa_core/nlg/template.py
@@ -80,7 +85,5 @@
-                # blacklist characters that probably should not be
-                # part of slot name and replace with old %-formatting
-                text = re.sub(r'{([^\n,]+?)}', r'{0[\1]}', template["text"])
+                text = re.sub(r'{([^\n]+?)}', r'{0[\1]}', template["text"])
                 template["text"] = text.format(template_vars)
             except KeyError as e:
                     "Failed to fill utterance template '{}'. "

commit 50ccaf0f3b86c65bfcd857ebf4c64f64b9b7c4a0
Author: Naoko

    Resolve #1720
    Handles slot name contains character that is invalid as python variable name (e.g. dot) in template


Forking a Github Repository

Just click “fork” button on upper right corner

black tea

Making a Local Clone

$ git clone https://github.com/YOUR_USERNAME/YOUR_FORK.git

Adding a Remote

# list current configured remote repository for your fork
$ git remote -v

# add upstream
$ git remote add upstream https://github.com/ORIGINAL_OWNER/ORIGINAL_REPOSITORY.git

# list again to see upstream is added
$ git remote -v
origin    https://github.com/YOUR_USERNAME/YOUR_FORK.git (fetch)	
origin    https://github.com/YOUR_USERNAME/YOUR_FORK.git (push)
upstream  https://github.com/ORIGINAL_OWNER/ORIGINAL_REPOSITORY.git (fetch)
upstream  https://github.com/ORIGINAL_OWNER/ORIGINAL_REPOSITORY.git (push)

Working in a Branch

Create and checkout a feature branch. Personally, I like to set github issue number followed by summary of issue. This notation GH-${issue_num} will create a link to the issue on github.

$ issue_num=100
$ git checkout -b GH-${issue_num}_summary_of_issue

When ready, commit and push changes to GitHub.

$ git push origin GH-${issue_num}_summary_of_issue

Keeping Your Fork in Sync

$ git pull upstream master
$ git push origin master



  • スコビー(SCOBY - symbiotic culture of bacteria and yeast)
    • スコビーはどこで手に入れる?
      - 自分で作ることもできるけどお友達にもらったりとかアマゾンでもかえるよ。
    • スコビーはスターター紅茶(コンブチャ)と一緒に運ばれてきます。
  • 黒紅茶の茶葉 - ティーバックでもいいけどルースティーリーフのほうがお得なはず。
    <figcaption>black tea</figcaption>
  • 砂糖(グラニュー糖があ勧め)
  • 広口のガラス瓶 (熱湯消毒してね)
    • 私が使ってるのは 2.5 gallon (9.5 litter) と大きいけど 1 gallon (3.7 litter) サイズから始めるはよいスタートかとおもいます。ちなみに右の瓶はおよそ1リットルで 左側のがおよそ9.5リットルです。
      Kombucha jars
  • キッチンクロスまたはキッチンペーパー
  • キッチンクロスを留めるゴムまたは紐
  • 2次発行用のエアタイトボトルもしくは瓶
    • 私はこんなボトルを使ってます。

      Kombucha bottles


瓶のサイズ: 1 little or 34 oz

  • 紅茶: 2 tea bags or 1.5 tsp loos tea
  • 砂糖: 1/4 cup
  • 水: 3 1/4 cups
  • スターター紅茶: 1/4 cup

瓶のサイズ: Half gallon

  • 紅茶: 4 tea bags or 1 tbsp loos tea
  • 砂糖: 1/2 cup
  • 水: ~7 cups
  • スターター紅茶: 1 cups

瓶のサイズ: 3.7 little or 1 gallon

  • 紅茶: 8 tea bags or 2 tbsp loos tea
  • 砂糖: 1 cup
  • 水: ~14 cups
  • スターター紅茶: 2 cups



  1. お湯を沸かしてお砂糖をとかす。紅茶をいれてさませます。
  2. 紅茶の葉を取り、スターター紅茶、お水をいれてスコビーを入れます。
  3. スコビーが呼吸できるようにキッチンクロスなど通気性のあるもので蓋をしゴムでとめます。 瓶を適温の環境におき、あす。直射日光はさけてください。できれば発酵中はあまり動かさないでください。発酵がおそくなります。 適温は 26-29 C もしくは 78-85 F です。それ以下でも大丈夫ですが発酵がゆっっくりになります。 それ以上だと発酵が早まります。たいせつなのは安定した温度環境にあることです。
  4. 七日たったら味を見てみてください。酸味と甘みのバランスが自分のお好みになったらできあがりです。寒いと14日くらいかかることもあります。  毎回新しいスコビー(ベイビースコビー)が上の層にできてきます。
baby scoby
  1. 次に二次発酵ボトリングにはいるのですが次のバッチのためにコンブチャ   (スターター紅茶)を残しておいてください。


  1. 二次発酵は味付けと炭酸つくりです。エアタイトボトルにコンブチャをいれて好きなフルーツやジュースであじをつけます。  私はレモンとジンジャーの欠片を入れたものがお気に入り。ミントとライムもよかったです。

    Kombucha bottling
    Kombucha bottling
    Kombucha bottling
  2. このときお砂糖少し入れてください。炭酸化を活動をしょうかんします。ソーダみたいになるよ。
  3. 3日か4日後くらいにはふるーつから味もでてシュワシュワな飲み物がかんせいです。   発行を止めるためにこの時点で冷蔵庫にいれましょう。発行中に育ったバクテリアとイースト菌をフィルターして飲んだほうが快適かとおもわれます。
    After 2nd farmentation
    Filter bucha


Check the latest version here At the time of writing, 3.8.0 is the latest and 3.8.5 has release candidate.

Also make sure you have sqlite3, libbz2-dev and libffi-dev are installed

sudo apt-get install libsqlite3-dev libbz2-dev libffi-dev
wget https://www.python.org/ftp/python/${version}/Python-${version}.tgz
tar xzvf Python-${version}.tgz
cd Python-${version}
# Linux (or any Unix-like system), the default prefix and exec-prefix are /usr/local.
# thus you should be able to omit --prefix here
# --enable-optimizations option for significant speed boost (10-20%) but much
# slower build process
./configure --prefix /usr/local --enable-optimizations
sudo make install
# OR if you want to skip creating the python link then:
sudo make altinstall

in case you want to remove and re-install it again cause some software was missing before installation

rm -f /usr/local/bin/python${version}
rm -rf /usr/local/lib/python${version}


The Goal:

Decide on most money worth indoor cycling bike and software options.

Motivation: I run almost everyday but some days, my knee hurts and some days it rain on me. For those reasons, I have been thinking of other cardio option other than running and swimming. Biking seems so fun with right software and easy on your knee.


Just like computer, without right software device (bike) won’t be much useful. You will be more motivated if software is good (addictive and stress free) and you will hopefully use your device to the full potential.

So I decided to look from angle of software perspective.

There are 3 notable software out there.

  • zwfit is still in beta (as of 2018-10-03) but getting much attention from indoor cyclist.
  • ifit Coach
  • peloton

Setup Options and other cost


There are 3 level of setup. This video is very comprehensive.

Assuming that you already have mountain bike. If not, add that to cost. $100 to $600+.

Basic: * Bike home trainer * The cheapest one you can get starts from around $50. * Garmin speed sensor is less than $40 Flexible Setup * Bike home trainer * Power Meter. Power meter is is a device fitted to a bike that measures the power output of the rider. Most commonly, power meters use strain gauges that deflect slightly when a force is applied. By measuring this torque and combining it with angular velocity, power (measured in watts) can be calculated. It measure much more than speed and cost more than speed sensor. Premium Setup * Smart trainer which will give you automatic resistance. Smart trainer is available from around $230.

Also you want to have monitor. If you want dedicated monitor or tablet, include that in the cost as well.

Monthly Membership Fee $14.99 (used to be $10)

ifit Coach

iFit will give you access to:

  • Personal trainer
  • Unlimited virtual travel
  • Virtual gym membership
  • Workout classes

The official training bike is ProForm Tour De France which automatically simulates every hill and dip etc.

The software is also available on both Android and iOS and just like most software, review on Android is so low. Chances are depends on your device, it doesn’t work.

Max Weight is 350lb.

Per this review though

  • The automated incline/decline doesn’t always work
  • iFit isn’t well-integrated with TDF bikes (Often crashes)

So kind of “no”….

Other compatible bike NordicTrack Commercial S10i Studio workout video automates your bike’s resistance and incline/decline to follow the coach’s plan. Comes with 10” Smart HD Touchscreen. $1500 includes first year membership cost.

$500 more for 22 inch screen bike

iFit Coach membership with equipment:

Pay all at once and save 15% - $33 per month or opt to pay monthly for $39 per month


Monthly subscription for the software is $39 if you own their bike. Standalone is $12.99 for a monthly membership but lacks various metrics as it is not linking to device. Currently Android OS user has no option. Peloton is only available on iOS and planning to release for Android on late 2018. So you could go with just buying good spin bike which ranges from

Bike comes with amazing 22 inch touchscreen. With its live-streaming and on-demand classes, costs roughly $3,000 for the first year (Bike $2000 + $250 for shipping and setup) and nearly $500 each year thereafter.

Without paying the $39 monthly subscription, you’re left with just three classes and a free-ride mode that displays only real-time data on the screen, with no leaderboard-inspired competition or any record of your efforts.

No automatic resistance control by the way.

Nice looking bike though


I don’t know yet… but considering automatic resistance control (Peloton is not supporting), I was learning towards either NordicTrack Commercial S10i or Zwift setup (buy bike, trainer and monitor etc). But people love Peloton over NordiTrack because of (a) unlimited classes (b) magnetic resistance for easier adjustment.