apt install npmでエラーがでるとき[npm]
![Thumbnail of post image 130](https://i0.wp.com/vasteelab.com/wp-content/uploads/2020/07/xps-4TBSG2Oqu0Q-unsplash.jpg?resize=150%2C150&ssl=1)
パッケージが足りていないことが原因だった。以下を打った後に、sudo apt install npmで無事インストール成功。
sudo apt install nodejs-dev node-gyp libssl1.0-devs ...AWS EC2にNeo4j環境を構築[Neo4j]
![Thumbnail of post image 091](https://i0.wp.com/vasteelab.com/wp-content/uploads/2020/07/taylor-heery-71sp4JBYO-U-unsplash-2.jpg?resize=150%2C150&ssl=1)
本記事では、データをグラフとして管理するためのWebアプリケーションであるNeo4jをAWS EC2にインストールするまでの手順を示します。
実行環境Instance-type: g4dn.8xlargeOS: Ubun ...
train_test_splitに関する調査[sklearn]
![Thumbnail of post image 103](https://i0.wp.com/vasteelab.com/wp-content/uploads/2020/07/sambazon-qfIVXu7nxGU-unsplash.jpg?resize=150%2C150&ssl=1)
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]
![Thumbnail of post image 167](https://i0.wp.com/vasteelab.com/wp-content/uploads/2020/07/piotr-wilk-Kc-OBw1fMJg-unsplash.jpg?resize=150%2C150&ssl=1)
# Importing libraryfrom keras.preprocessing.text import Tokenizer# My textstexts = # Creating a tokenizertokenizer = Tok ...
break pointを入れたままスクリプトを消すとdoes not existエラーがでる[Cloud9]
![Thumbnail of post image 089](https://i0.wp.com/vasteelab.com/wp-content/uploads/2020/07/brooke-lark-HlNcigvUi4Q-unsplash.jpg?resize=150%2C150&ssl=1)
Cloud9でデバッグをしていると、突然、存在しないはずのスクリプトによってエラーが起こった。調べてみると、エラー文で表示されているのは、過去に消去したスクリプトだった。現在デバッグしているスクリプトには関係ないはずなのになぜエラーが ...
リストからDataFrameを生成[Pandas]
![Thumbnail of post image 151](https://i0.wp.com/vasteelab.com/wp-content/uploads/2020/07/sidekix-media-FsgWEVacLU-unsplash.jpg?resize=150%2C150&ssl=1)
本記事では,値をデータフレームを入力し,そのあとカラム名とインデックス名を決める流れで生成を行う方法を紹介.
それぞれの列をリストとし,その2次元リストからDataFrameを作成する場合pd.DataFrameの際,転置 ...
EC2で作成したインスタンスは起動していないときにも課金される[AWS]
![Thumbnail of post image 131](https://i0.wp.com/vasteelab.com/wp-content/uploads/2020/07/lex-sirikiat-nV19ucDBbs8-unsplash.jpg?resize=150%2C150&ssl=1)
EC2が従量課金制なのは、多くの人が知っていると思う。しかし、インスタンスを停止しているときに、EBSにかかる料金に関して考える人は少数だろう。
EBSとはインスタンスの記憶領域のことで、デスクトップPCで考えると、SSD ...
AttributeError: ‘Model’ object has no attribute ‘_get_distribution_strategy'[Keras][Tensorboard]
![Thumbnail of post image 047](https://i0.wp.com/vasteelab.com/wp-content/uploads/2020/07/samuel-yongbo-kwon-wrQsfMKwElI-unsplash.jpg?resize=150%2C150&ssl=1)
先に解決方法
importの仕方を見直す。
以降だらだらと経緯を書くkerasでtensorboardを使おうとしたら、AttributeError: ‘Model’ object has no at ...
[Python]正規表現でXMLタグを抽出
![Thumbnail of post image 186](https://i0.wp.com/vasteelab.com/wp-content/uploads/2020/07/anna-sullivan-IUXR0sqs-mY-unsplash.jpg?resize=150%2C150&ssl=1)
re.findall(r"<ce:section.+?>(.+?)</ce:section>", txt)
.+?を使うことによって、最小文字列にマッチングするようにした。
[Python]実行時間を計測
![Thumbnail of post image 038](https://i0.wp.com/vasteelab.com/wp-content/uploads/2020/07/debby-hudson-hWVVtG0d8jM-unsplash.jpg?resize=150%2C150&ssl=1)
import timet1 = time.time()"""ここに処理を書く"""t2 = time.time()elapsed_time = t2-t1print(f"elapsed time: {elapsed_time/3600} h ...