Python

Thumbnail of post image 138

import collectionsimport matplotlib.pyplot as pltl = c = collections.Counter(l)plt.bar(list(c.keys()), list(c.values())) ...

Flair

Thumbnail of post image 113

自作データを使って2回以上の学習を回したときにハマったのでまとめる.

筆者が自作データでNERの学習を行なったときに,1回目に学習したモデルを2回目の学習に引き継ぎたいと思った.

しかしながら,その方法は公式ド ...

Python

Thumbnail of post image 089

Python3.6から使えるようになったf-stringを使って,スマートにパスを生成しよう.

かっこ悪いパスの生成from datetime import datetimenow = datetime.now().strfti ...

Git

Thumbnail of post image 072

git hub の最新版のコードを使いたいときのコマンド.

以下に,NLPライブラリFlairの最新版をインストールするときのコマンドを示す.

インストール前にflairがあっても,最新版に更新してくれる.

AWS,EC2

Thumbnail of post image 068

apt update を実行して以下のエラー

こんな時は,df -h で容量を調べてみよう.きっとディスクがパンパンになっているはずだ.

Error writing to output file - write (2 ...

Latex

Thumbnail of post image 182

\citetと\citepでは,括弧の位置が異なる.

*を付けるとet al.で省略しない.

\citeと\citet, \citepの使い分けはまだわからない.

\citet{jon90} --> ...

Latex

Thumbnail of post image 068

問題: \ref で参照すると不要なドットが付く

電◯情報通信学会の日本語原稿を執筆していると,章番号を\refで参照した際に,不要なドットがついてしまう.

\ref{sec:conclusion}章でまとめと今後の課題を述べる. ...

Docker

Thumbnail of post image 150

docker exec -it my-container/bin/bash

あるコンテナで学習を回すと,そのコンテナが結果出力で占有させてしまったので上のコマンドで,
2つ目のコンソールを立ちあげて,学習とLinuxの設定を同時 ...

Jupyter

Thumbnail of post image 143

jupyter lab --no-browser --port=8888 --ip=0.0.0.0 --allow-root &

Control+C を押してもサーバーが止まることは無くなる.

しかし,Jupyter ...

JupyterLab

Thumbnail of post image 151

pip install jupyterlab

Node.jsの導入

curl -sL | sudo -E bash -sudo apt-get install -y nodejs

Variable Inspectorの導入