Kaggle api 要点だけ

インストールpip install kaggle
kaggleを入力すると、ユーザ情報を登録するよう求められ、そのパスも表示される。
トークンはkaggleにwebログインし、my account >> create ...
apt install npmでエラーがでるとき[npm]

パッケージが足りていないことが原因だった。以下を打った後に、sudo apt install npmで無事インストール成功。
sudo apt install nodejs-dev node-gyp libssl1.0-devs ...AWS EC2にNeo4j環境を構築[Neo4j]

本記事では、データをグラフとして管理するためのWebアプリケーションであるNeo4jをAWS EC2にインストールするまでの手順を示します。
実行環境Instance-type: g4dn.8xlargeOS: Ubun ...
train_test_splitに関する調査[sklearn]

from sklearn.model_selection import train_test_splitX = y = X_train, X_test, y_train, y_test = train_test_split(X, y, te ...
id列を文字列に戻す[keras][Tokenize]

# Importing libraryfrom keras.preprocessing.text import Tokenizer# My textstexts = # Creating a tokenizertokenizer = Tok ...
break pointを入れたままスクリプトを消すとdoes not existエラーがでる[Cloud9]

Cloud9でデバッグをしていると、突然、存在しないはずのスクリプトによってエラーが起こった。調べてみると、エラー文で表示されているのは、過去に消去したスクリプトだった。現在デバッグしているスクリプトには関係ないはずなのになぜエラーが ...
AttributeError: ‘Model’ object has no attribute ‘_get_distribution_strategy'[Keras][Tensorboard]

先に解決方法
importの仕方を見直す。
以降だらだらと経緯を書くkerasでtensorboardを使おうとしたら、AttributeError: ‘Model’ object has no at ...
[Python]正規表現でXMLタグを抽出

re.findall(r"<ce:section.+?>(.+?)</ce:section>", txt)
.+?を使うことによって、最小文字列にマッチングするようにした。
[Python]実行時間を計測

import timet1 = time.time()"""ここに処理を書く"""t2 = time.time()elapsed_time = t2-t1print(f"elapsed time: {elapsed_time/3600} h ...
EntityRulerを使って深層学習ベースのNERにルールを追加[sciSpacy]

本記事では、Spacyにおける標準のNER(en_core_sci_sm)に、ルールを追加する方法について紹介する。これができると、NERの結果が少し物足りないときにルールで微調整することができるため、覚えておくと便利だと思う。