TensorDatasetで生画像をTensor化して読み込む[PyTorch]

from glob import globfrom PIL import Imageimport numpy as npimport torchimport torch.utils.data as data_utilsfrom torchv ...
Windows版 AWS CLIで(‘Connection aborted.’, error(10060,…がでたときの対処法[AWS]

エラー発生
Windows PowerShellでaws s3 lsを打つと以下のエラーが出た.
> aws s3 ls('Connection aborted.', error(10060, ...#長いので省略対処法# ...Linux起動時にunexpected inconsistency run fsck manuallyが出た時の対処法[Linux]

fsck -t ext3/dev/sda1
上のコマンドを打って,y(yes)を連打し,再起動すると意外とシンプルに解決した.
/dev/sda1の部分は,修復の必要があるディレクトリを示している.各自の環境に合わせて替えて ...
Pythonでhtmlのファイルを読み込む方法[Python][Beautifulsoup]

from bs4 import BeautifulSoupimport relinks = []html_path = "./hoge.html"with open(html_path) as f:html = f.read()soup = ...
Pythonでテキストファイルから1行づつ読み込んで処理を行う[Python]

fname = "url.txt"with open(fname) as f:for line in f:contents = requests.get(line)time.sleep(1.5)
Pythonで範囲を指定して乱数を生成[Python][Numpy]

time.sleep(*) の変数をランダムに変えたかったときに使った方法を記す。
import numpy as npnp.random.randint(10, 20)>> 14ちなみに記法としては以下のよう ...
Neo4jでグラフを一括削除する便利なコマンド[Neo4j]

ノードとエッジを全て削除するときは下のコマンドを打つ。
MATCH (n) OPTIONAL MATCH (n)--() DELETE n,rちなみにノードとエッジを出現させるときには下のコマンド。
MATCH (n ...MobaXtermでEC2インスタンス上のDockerコンテナとポートフォワーディング[MobaXterm][EC2][AWS]

本記事は,前回の記事の続きです.
vastee.hatenablog.com
前回の記事では,EC2のインスタンスにjupyterを介してアクセスする為に,MobaXtermのポートフォワーディング機能を使った ...
MobaXtermでEC2インスタンスとポートフォワーディング[MobaXterm][EC2][AWS]

EC2のインスタンスにjupyterを介してアクセスしたかったので,MobaXtermのポートフォワーディング機能を使った.
設定が非常に簡単なのでぜひ試してほしい.
MobaXtermでの設定お手持ちのノート ...
JuliaでStringをIntにキャスト[Julia]

parse(Int64, "64")>> 64