NLP,Python,Tensorflow

Thumbnail of post image 120
前準備

Tensorflow(GPU版)をpipでインストール。pipのバージョン違いで混乱することがあるため、私はpython -m pipでインストールした。バージョンは1.15にすること。

python -m pip ins ...

Python

Thumbnail of post image 183
import pandas as pdpd.read_csv('hoge.csv')df = df]

ネストされたリストで書くのがポイント

Linux,Python

Thumbnail of post image 031

nohup python hoge.py>/dev/null 2>&1 &

nohupで動かしたジョブの確認と削除

$ xclock 492$ jobs + Running xclock &$ kill ...

Python,Slack

Thumbnail of post image 152

Incoming Webhookをチャンネルにインストールし、TOKENとCHANNEL IDを取得していることが前提条件。

import requestsTOKEN = "xxxxxxxxxxxxxxxxxxx"CHANNEL ...

Python,Slack

Thumbnail of post image 135

Incoming Webhookをチャンネルにインストールし、TOKENとCHANNEL IDを取得していることが前提条件。

import requestsTOKEN = "xxxxxxxxxxxxxxxxxxx"CHANNEL ...

Odrive,Python

Thumbnail of post image 071

Python経由でOnedriveにアップロードする方法として、Microsoftが作成したOnedrive SDKの利用が考えられるが、このSDKは少し扱いにくい。そこで他の方法を探したところ、Odriveというウェブサービスを使っ ...

Python,Tor

Thumbnail of post image 180

Torを使っているか否かをブラウザで確認することができるサイトを利用し、PythonでTorを使っているかどうかを確認するスクリプトを作成。

import urllib.request, urllib.errorfrom bs4 ...

Python,Tor

Thumbnail of post image 098

環境Ubuntu 16.04
Python 3.8.2
現在のIPアドレスを確認

torを導入する前に、現在のIPアドレスを確認してみる。

現在のIPアドレスの取得については、過去記事でまとめたので、参考にされた ...

Python

Thumbnail of post image 030

「Python IPアドレス」などで検索すると、IPを取得する方法がたくさん出てくるのだが、多くのサイトは、ひとつのサイトからの情報をあてにしているものが多い。

ひとつのサイトからの取得だと、IPアドレスを取得するサイトが ...

Pandas,Python

Thumbnail of post image 029
import pandas as pdfrom collections import Counterd = Counter({'A': 1, 'B': 2, 'C': 3})df = pd.DataFrame.from_dict(d, or ...