Python

Thumbnail of post image 023

with open("text.txt") as f:for line in f:print(line)

withを使いたくなければ,

f = open("text.txt")for line in f:print(line)f. ...

Machine Learning

Thumbnail of post image 058

www.kaggle.com

import osimport numpy as npimport pandas as pdfrom PIL import Imageimport matplotlib.pyplot as pltl ...

Docker

Thumbnail of post image 009

Dockerを使っていて最初に行き詰まるのは,コンテナとホストのファイルの共有をどうするかだろう.

フォルダを共有するためには -v コマンドの後に ホストのフォルダパス : コンテナのフォルダパス を書く.

...

GAN,NLP

Thumbnail of post image 025

長文を生成可能なLeakGANをインストールし,サンプルを動かしてみたのでメモ.本記事では,dockerで作成したコンテナ上でサンプルを動かす手順について紹介.

まずはnvidia-docker2で動作環境を用意する.

論文サマリ

Thumbnail of post image 171

Tracking Multiple Objects Outside the Line of Sight using Speckle Imaging (CVPR2018)

ieeexplore.ieee.org

目的

障害物によ ...

NLP

Thumbnail of post image 134

品詞が日本語でまとめられているので分かりやすい.

www.ibm.com

Pandas,Python

Thumbnail of post image 048

Windowsでpd.read_csvを使うと頻繁にエラーがでる.

エラーがでにくいcsvの読み込み方を見つけたので,メモ.

df = pd.read_csv("./hoge.csv", engine="python ...

Python

Thumbnail of post image 028

import repatterns = "dog|cat|fox"repl = "animal"sentence = "dog, cat, fox, pen."re.sub(patterns, repl, sentence)>> ...

Python

Thumbnail of post image 027

Kaggleを眺めていると見慣れない記法を発見。

x = str(x)for punct in puncts:x = x.replace(punct, f' {punct} ')return x

ん? f’ {p ...

MeCab,Windows

Thumbnail of post image 135

pip install MeCabだけで済むと思ってたのに意外と厄介な手順を踏んだので忘れないようにメモ

有志の方のリポジトリからexeをダウンロード

どうやらまともにMeCabをインストールするにはソースのビルドなど面倒な ...