タイピング記録 2023/5/2

ITエンジニアなのにタイピング激遅なのでなんとかしたい。

タイピング練習を始めてから1カ月、やっとベスト更新しました。

基本常用語 XJ 52.372 通算回数 763

今までタイピング記録を付けてなかったのでe-typingのも貼っておく。

e-typingは学生時代にちょこっとやってて、1カ月前くらいにまたちょこっとやった。

Private Link がようやっとわかりました(憔悴)

勉強する前

Private Link ってサードパーティーのVPCにいい感じに接続できる仕組みでしょ?インターフェイス型エンドポイントとの違いがよくわかんねいや。

Private Link とは

めちゃわかる。ありがとうございます。おかいき!!(誤用)

dev.classmethod.jp

公式。まあまあわかる。ありがとうございます。

docs.aws.amazon.com

Private Link は以下のアーキテクチャー図で示される概念。

サービスプロバイダ側では VPCエンドポイントサービス を作る。プロバイダは自分であることもあるし、サードパーティーであることもあるし、AWSサービスであることもある(AWSサービス統合)。

コンシューマー側は エンドポイントサービス へ向けた VPCエンドポイント(インターフェイス型) を作る。

エンドポイントサービス 。。。Azure の サービスエンドポイントとこんがらがって頭おかしくなる。。。

とゆーことで全体的にはこんなイメージではないかと。※自分以外に通じるかわからんが、まあこのブログ自体便所の落書きみたいなもんだからね。

ネット記事とか解説とかでは 「VPCエンドポイントにはゲートウェイ型とインターフェイス型があってね~~~。あ、Private Link ってのもあるよ。」って説明の仕方だが、そのせいでだいぶ混乱していた。

実際のところは「VPCエンドポイントにはゲートウェイ型とインターフェイス型があってね~~~。あ、インターフェイス型VPCエンドポイントは Private Link の仕組みの中で利用されるものだよ。AWSサービスが統合されてるからゲートウェイ型と似たような用途で使えるよ。」ってのが正しい理解な気がする。知らんけど。

みんなわかってて書いてんのかなー?(知らないのは僕だけでした)。

AWS CLF 受かった(あたりまえ体操)

試験は1問〇点みたいなのじゃなくて、難易度毎に調整が入る方式だと思う(項目応答理論的な)。

なので単純計算はできないが、仮に単純計算したら、65問中5問も間違えてる計算。

何が駄目だったんだろう。昔はなかった持続可能性周りの範囲でやらかしたのかな。

とりま、SAA目指して頑張りますん(5年くらい前に1回取ったけどとっくの昔に有効期限切れてる)。

Import XXX could not be resolved from sourcePylance

書きたいネタはあるが整理する時間がないので今直面した小ネタを。

VSCode から WSL 2 につないでる状態で、python ライブラリをうまく検知できてなくてワーニングが出た。

これで解決。

maasaablog.com

$ python -c "import site; print (site.getsitepackages())"
['/home/talkeyboid/anaconda3/lib/python3.9/site-packages']

使う予定ないのに Ozone 10 にアップグレードした僕は完全にセールの奴隷(^q^)ついでにプラグイン棚卸

今セールしているので Ozone 9 から 10 にアップグレードしました。使う予定はまだないです。軽く沼ってる気がします。

新機能が使えるぞ!※まだ1秒も使ってない。

ついでにプラグインを棚卸しました。なんか他に買ってる気もするが一旦これだけ。

種別 メーカー ソフト
DAW Ableton Ableton Live 11 Suite
Plugin Native Instruments KOMPLETE 13 Ultimate
Plugin WAVES Diamond 12
Plugin WAVES Sibilance 14
Plugin WAVES Vocal Rider 12
Plugin FabFilter Pro Q3
Plugin iZotope Ozone 10 Advanced
Plugin Antares Autotune Access

それぞれどこにアプリケーション、オーディオファイル、VSTが配置されていて自分で外付けSSDに逃がしたのはどれかとか整理したいんですが大変なのでまたやる気のあるときに(絶対やらないやつ)。

Git Bash で スラッシュを含むパスをコマンドライン引数に指定する

業務環境では WSL2 が使えないので Git Bash で AWS CLI 操作をしていましたが、スラッシュが扱えなかったためメモ。

MSYS側で良しなに Windows パスを扱えるようにしてくれますが、CLI の引数では / はそのまま通してほしいです。

そんなときに MSYS_NO_PATHCONV=1 を指定します。

MSYS_NO_PATHCONV=1 aws logs describe-metric-filters --log-group-name /aws/lambda/hoge-function

以上!

WSL2にAnaconda入れてJupyter動かしたら起動に9分近くかかってうんこ漏れた

導入までは以下の記事ほぼそのままです。※pip 使わず conda 使ってるところだけ違う。元記事の方はうんこ漏らしてません。

kondeneenen.com

インストール

インストーラは一ディレクトリ作成

$ mkdir tmp
$ cd tmp

以下のページより Linux 向けインストーラのパスをコピー

www.anaconda.com

これ

ダウンロード

# URLに上記インストーラのパスを指定
$ wget https://repo.anaconda.com/archive/Anaconda3-2022.10-Linux-x86_64.sh

インストーラ実行

$ bash Anaconda3-2022.10-Linux-x86_64.sh 

Welcome to Anaconda3 2022.10

In order to continue the installation process, please review the license
agreement.
Please, press ENTER to continue
>>> 

##### ここにライセンス文が表示される #####

ライセンスに同意

Do you accept the license terms? [yes|no]
[no] >>> yes

ロケーション選択

Anaconda3 will now be installed into this location:
/home/talkeyboid/anaconda3

  - Press ENTER to confirm the location
  - Press CTRL-C to abort the installation
  - Or specify a different location below

[/home/talkeyboid/anaconda3] >>>

conda init するか

Do you wish the installer to initialize Anaconda3
by running conda init? [yes|no]
[no] >>> yes

/tmp を削除

$ cd ..
$ rm -rf tmp/

パス設定

パス設定し反映

$ echo "export PATH=~/anaconda3/bin:\$PATH" >> ~/.bash_profile
$ source ~/.bash_profile

バージョン確認

$ conda -V
conda 22.9.0

conda init

元記事では conda init bash を実行していますが、インストーラの指示に従い、conda init? >>> yes としたため対応不要です。

念のため確認

$ cat ~/.bashrc
...
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/home/talkeyboid/anaconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
    eval "$__conda_setup"
else
    if [ -f "/home/talkeyboid/anaconda3/etc/profile.d/conda.sh" ]; then
        . "/home/talkeyboid/anaconda3/etc/profile.d/conda.sh"
    else
        export PATH="/home/talkeyboid/anaconda3/bin:$PATH"
    fi
fi
unset __conda_setup
# <<< conda initialize <<<

設定を反映

$ source ~/.bashrc

するとこんな感じでプロンプトに conda 環境名がつく

talkeyboid@talkeyboidsrfc:~$ source ~/.bashrc 
(base) talkeyboid@talkeyboidsrfc:~$ 

conda 環境構築

一旦適当に作る。

$ conda create -n test python=3.9

$ conda info -e
# conda environments:
#
base                  *  /home/talkeyboid/anaconda3
test                     /home/talkeyboid/anaconda3/envs/test

$ conda activate test

Jupyter導入

# 元サイトは pip で入れているが私の環境では conda でインストールする
$ conda install jupyterlab

$ jupyter kernelspec list
Available kernels:
  python3    /home/talkeyboid/anaconda3/envs/test/share/jupyter/kernels/python3

Jupyter起動

$ jupyter lab --NotebookApp.token=''
[W 2023-03-06 21:54:36.226 LabApp] 'token' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[I 2023-03-06 21:54:36.232 ServerApp] jupyterlab | extension was successfully linked.
[I 2023-03-06 21:54:36.238 ServerApp] nbclassic | extension was successfully linked.
[I 2023-03-06 21:54:36.241 ServerApp] Writing Jupyter server cookie secret to /home/talkeyboid/.local/share/jupyter/runtime/jupyter_cookie_secret
[I 2023-03-06 21:54:36.458 ServerApp] notebook_shim | extension was successfully linked.
[W 2023-03-06 21:54:36.475 ServerApp] All authentication is disabled.  Anyone who can connect to this server will be able to run code.
[I 2023-03-06 21:54:36.478 ServerApp] notebook_shim | extension was successfully loaded.
[I 2023-03-06 21:54:36.480 LabApp] JupyterLab extension loaded from /home/talkeyboid/anaconda3/envs/test/lib/python3.9/site-packages/jupyterlab
[I 2023-03-06 21:54:36.480 LabApp] JupyterLab application directory is /home/talkeyboid/anaconda3/envs/test/share/jupyter/lab
[I 2023-03-06 21:54:36.484 ServerApp] jupyterlab | extension was successfully loaded.

  _   _          _      _
 | | | |_ __  __| |__ _| |_ ___
 | |_| | '_ \/ _` / _` |  _/ -_)
  \___/| .__/\__,_\__,_|\__\___|
       |_|
                                                                           
Read the migration plan to Notebook 7 to learn about the new features and the actions to take if you are using extensions.

https://jupyter-notebook.readthedocs.io/en/latest/migrate_to_notebook7.html

Please note that updating to Notebook 7 might break some of your extensions.

[I 2023-03-06 21:54:36.491 ServerApp] nbclassic | extension was successfully loaded.
[I 2023-03-06 21:54:36.492 ServerApp] Serving notebooks from local directory: /home/talkeyboid
[I 2023-03-06 21:54:36.492 ServerApp] Jupyter Server 1.23.4 is running at:
[I 2023-03-06 21:54:36.492 ServerApp] http://localhost:8888/lab
[I 2023-03-06 21:54:36.492 ServerApp]  or http://127.0.0.1:8888/lab
[I 2023-03-06 21:54:36.492 ServerApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).

が、http://localhost:8888/lab もしくは http://localhost:8888 でつながらない。

こんなかんじで pending

設定ファイル周りで何かよくないのかといろいろとググっていたところ、いつのまにか起動してました。あまりに時間がかかってしまっていたので、ググってる途中でちょっとうんこ漏れた。

何回もアクセスしていたからか、起動ログ的には GET がめちゃくちゃ走ってる。22:04~22:13って時間かかりすぎでないか???使い物にならん。

[I 2023-03-06 22:04:20.021 ServerApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).

[I 2023-03-06 22:13:09.644 ServerApp] 302 GET / (127.0.0.1) 31.37ms
[I 2023-03-06 22:13:09.645 ServerApp] 302 GET / (127.0.0.1) 31.54ms
[I 2023-03-06 22:13:09.645 ServerApp] 302 GET / (127.0.0.1) 31.49ms
[I 2023-03-06 22:13:09.645 ServerApp] 302 GET / (127.0.0.1) 31.28ms
[I 2023-03-06 22:13:09.646 ServerApp] 302 GET / (127.0.0.1) 31.20ms
[I 2023-03-06 22:13:09.646 ServerApp] 302 GET / (127.0.0.1) 31.16ms
[I 2023-03-06 22:13:09.651 ServerApp] 302 GET / (127.0.0.1) 35.09ms
[I 2023-03-06 22:13:09.652 ServerApp] 302 GET / (127.0.0.1) 35.22ms
[I 2023-03-06 22:13:09.652 ServerApp] 302 GET / (127.0.0.1) 35.40ms
[I 2023-03-06 22:13:09.664 ServerApp] 302 GET / (127.0.0.1) 45.87ms
[I 2023-03-06 22:13:09.677 ServerApp] 302 GET / (127.0.0.1) 55.90ms

ノートブック動きました。

立ち上がるまでにめちゃ時間かかるのとても前時代的PC感あるのでなんとかしたいですね。