2020/04/27

jupyter no working on Visual Studio Code

My visual studio code with python extension "suddenly" became not working with the following error message...
```
data science library kernelspec is not installed in interpreter...
```

Searched for google and found
https://stackoverflow.com/questions/60252982/data-science-library-kernelspec-is-not-installed
but no useful comments.

I reviewed what I have done around VS Code in the last few hours and I remembered ...

To fix the problem, I searched for the item that I might have modified recently, and found that
VSCode settings / Extension / Python / Terminal: Activate Environment
was "UN"checked. Reset the setting to be checked, and confirmed that jupyter become to work fine.

2020/01/13

Buffalo LAN adapter LUA4-U3-AGT on macOS Catalina

Buffalo LAN adapter LUA4-U3-AGT on macOS Catalina (10.15.2)

BUFFALOのサイト
あかんらしい.

ここの記事を参考にすると使えた.
  • https://www.asix.com.tw/products.php?op=pItemdetail&PItemID=131;71;112
  • Apple Mac OS X 10.15 above Drivers Installer (v2.15.0) を download & install.
  • インストーラの指示に従ってインストールし、再起動した.
  • インストール中、システム環境設定 -> セキュリティとプライバシ で「許可」する必要がある。このてんもインストーラが指示しているので、素直に従えば良い。
  • 再起動後 USB ポートに UA4-U3-AGT を接続し、システム環境設定 -> ネットワーク環境設定を確認すると、「AX8817....」の項目が増えている。

2017/03/11

MOOV Now Swimming Stroke Recognition

Laps recognition results:

 Laps Recognized As…
Bu Ba Br Fr NA
Actual Stroke Bu 2 0 0 3 0
Ba 0 5 0 0 0
Br 0 6 6 0 1
Fr 0 0 0 49 0
500m kicks were completely ignored and recorded as 18min. rest... orz.

2017/03/08

Moov Now が来た

MOOV NOW が来た。注文は 2/26 (土) 夜、到着は 3/6.

Ordered 2.

There is only one sport that supports two moov's, but I found that that is enjoyable. I hope swimming kick will be detected by another moov on the ankle.

https://welcome.moov.cc/moovnow/

Knowledge base
https://moov.zendesk.com/hc/en-us

2017/03/03

ポイントの価値を計算する ヨドバシ編

ポイントの価値を計算する

ポイントのルールを整理する
  • z 円の品物をヨドバシカードで購入すると、品物に加えて 0.11z ポイントがついてくる。
  • z 円の品物をポイントで購入すると、品物だけ手に入る。
つまり、品物 A を介して次の 2 つの関係式が成立する:
  z [yen] = 品物A + 0.11z [pt] 
  z [pt]  = 品物A
品物A を消去して
  z [yen] - z[pt] = 0.11z [pt]
<=>
  (1+0.11)z [pt] = z[yen]
従って
  1 [pt] = 1/(1.11)[yen] = 0.9009009... [yen].

ヨドバシでの支払いは、カード、ポイントのどちらが得なのか?

y円の品を購入した場合の収支を円建で計算する

ポイントで支払い

支出 y [pt] = (1/1.11) y[yen] = 0.9009...y [yen]
収入 0 [yen]
総支払額 y [pt] = (1/1.11) y[yen]

カードで支払い (11%還元商品の場合)

支出 y [yen]
収入 0.11y [pt] = 0.11x(1/1.11)y [yen] = 0.099099...y [yen]
総支払額 = y [yen] - 0.11y [pt] = (1-0.11/1.11)y [yen] = 1/1.11 y [yen] 
ポイントで支払った場合と最終的な収支は同じである。
ここまでの議論を一般化すると、ヨドバシ方式の場合、平均還元率 a でためたポイントを持っている場合、 品物 A の還元率がちょうど a の場合、 支払いはカードでもポイントでも同じである。

カードで支払い (6%還元商品の場合)

支出 y [yen]
収入 0.06y [pt] = 0.06x(1/1.11)y [yen] = 0.05405...y [yen]
総支払額 = y [yen] - 0.06y [pt] = (1-0.06/1.11)y [yen] = 1.05/1.11 y [yen] > 1/1.11y[yen]
ポイントで支払うよりも、総支払額が多くなる。
一般化すると、平均還元率 a でためたポイントを持っている場合、 品物 A の還元率が a を超える場合は、カードで支払ったほうが得で、 還元率が a を下回る場合、ポイントで支払ったほうが得である。

2017/02/28

jupyter nbextensions

 まずはインストール
  • pip install jupyter_nbextensions_configurator
  • pip install https://github.com/ipython-contrib/jupyter_contrib_nbextensions/tarball/master
jupyter 起動前に enable
"C:\opt\IntelPython35\Scripts\jupyter.exe" nbextensions_configurator enable --user
"C:\opt\IntelPython35\Scripts\jupyter.exe" contrib nbextension install --user

2017/02/27

simpy on jupyter


from sympy import *
init_printing() # to print with mathjax on jupyter notebook
a=Symbol('a');
b=Symbol('b');
c=Symbol('c');
x=Symbol('x');
y=Symbol('y');
expr = a*x**2 + b*x + c;
solve(expr, x)