Python

Thumbnail of post image 148

In : from nltk.corpus import stopwordsIn : stopWords = stopwords.words('english')In : stopWordsOut: In: len(stopWords)Ou ...

AWS

Thumbnail of post image 024

AWS CLIの設定が既にされていることが前提の話。

まだの方は下のリンクを参考に設定してください。

docs.aws.amazon.com

S3にあるファイルのダウンロード

構文:

aws s ...

Keras,Tensorflow

Thumbnail of post image 008

環境
Anacondaをインストール
Anaconda Navigatorを開いて新しい環境を作る
Tensorflowのインストール
Kerasのインストール
環境OS: Windows10(64bit) ...

Grove,Python,RaspberryPi

Thumbnail of post image 113

Groveとは?
用意したもの
GrovePi+シールドをRaspberry Piに取り付ける
GrovePiのソースコードをダウンロード&インストール
GrovePi+シールドにLEDモジュールを取り付ける ...

Python

Thumbnail of post image 155

# 必要なモジュールのインポートimport BeautifulSoupimport retry:# Python 3from urllib import requestexcept ImportError:# Python 2import ...

Python

Thumbnail of post image 054

なんでこんなことするの?

CNNで学習するために、画像ファイルをTrainingとValidationに分けたかったから。

画像ファイルを7:3に分けるスクリプトfrom glob import globfrom os.path ...

Python

Thumbnail of post image 153

In: from PIL import ImageIn: img_pil = Image.open("hoge.png")In: img_pil.mode Out: 'RGBA'In: img_pil = img_pil.convert(" ...