今日 | 04/25 | 04/24 | 04/23 | 04/22 | 04/21 | 04/20 | 全参加数 | |
---|---|---|---|---|---|---|---|---|
総合ランキング(IN) | 圏外 | 圏外 | 圏外 | 圏外 | 圏外 | 圏外 | 圏外 | 1,034,361サイト |
INポイント | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0/週 |
OUTポイント | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0/週 |
PVポイント | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0/週 |
IT技術ブログ | 圏外 | 圏外 | 圏外 | 圏外 | 圏外 | 圏外 | 圏外 | 9,760サイト |
IT技術メモ | 圏外 | 圏外 | 圏外 | 圏外 | 圏外 | 圏外 | 圏外 | 1,577サイト |
Python | 圏外 | 圏外 | 圏外 | 圏外 | 圏外 | 圏外 | 圏外 | 245サイト |
IT技術情報 | 圏外 | 圏外 | 圏外 | 圏外 | 圏外 | 圏外 | 圏外 | 766サイト |
今日 | 04/25 | 04/24 | 04/23 | 04/22 | 04/21 | 04/20 | 全参加数 | |
---|---|---|---|---|---|---|---|---|
総合ランキング(OUT) | 圏外 | 圏外 | 圏外 | 圏外 | 圏外 | 圏外 | 圏外 | 1,034,361サイト |
INポイント | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0/週 |
OUTポイント | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0/週 |
PVポイント | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0/週 |
IT技術ブログ | 圏外 | 圏外 | 圏外 | 圏外 | 圏外 | 圏外 | 圏外 | 9,760サイト |
IT技術メモ | 圏外 | 圏外 | 圏外 | 圏外 | 圏外 | 圏外 | 圏外 | 1,577サイト |
Python | 圏外 | 圏外 | 圏外 | 圏外 | 圏外 | 圏外 | 圏外 | 245サイト |
IT技術情報 | 圏外 | 圏外 | 圏外 | 圏外 | 圏外 | 圏外 | 圏外 | 766サイト |
今日 | 04/25 | 04/24 | 04/23 | 04/22 | 04/21 | 04/20 | 全参加数 | |
---|---|---|---|---|---|---|---|---|
総合ランキング(PV) | 圏外 | 圏外 | 圏外 | 圏外 | 圏外 | 圏外 | 圏外 | 1,034,361サイト |
INポイント | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0/週 |
OUTポイント | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0/週 |
PVポイント | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0/週 |
IT技術ブログ | 圏外 | 圏外 | 圏外 | 圏外 | 圏外 | 圏外 | 圏外 | 9,760サイト |
IT技術メモ | 圏外 | 圏外 | 圏外 | 圏外 | 圏外 | 圏外 | 圏外 | 1,577サイト |
Python | 圏外 | 圏外 | 圏外 | 圏外 | 圏外 | 圏外 | 圏外 | 245サイト |
IT技術情報 | 圏外 | 圏外 | 圏外 | 圏外 | 圏外 | 圏外 | 圏外 | 766サイト |
正しいトークンを入力しているにも関わらずinvalid credential[Jupyter]
https://vasteelab.com/entry/2020/03/19/1403407vasteelab.comvasteelab.com
再起動すると8888でないポートになる問題の対策[Jupyter]
https://vasteelab.com/entry/2020/03/19/135648vasteelab.comvasteelab.com
バージョンを指定してインストール[python][tensorflow]
pip install tensorflow-gpu==1.11.0
DataFrameから複数列を抽出[Python][Pandas]
import pandas as pd df = pd.read_csv("./train.csv") df = df[["time","date"]]
import pickle import numpy as np arr = np.zeros(100) with open("arr.pickle", "wb") as f: pickle.dump(arr, f)
自作ELMoで単語をEmbeddingした後,Numpyに戻す[Flair][NLP]
from flair.embeddings import ELMoEmbeddings from flair.data import Sentence # ELMoのモデルは各自で用意 options = '/home/ubuntu/elmo-embeddings/elmo_options.json' weights = '/home/ubuntu/elmo-embeddings/elmo_weights.hdf5' elmo = ELMoEmbeddings('custom', options_file = options, weight_file = weights) sentence =…
import datetime dt = datetime.datetime.now() dt = dt.strftime('%Y-%m-%d_%H%M%S') df.to_csv(dt + "_data.csv") >> 2020-03-03_160611_data.csv
空のDataFrameに1行ずつデータを追加[pandas]
import pandas as pd df = pd.DataFrame(columns=["Temp", "Time"]) for i in range(5): tmp_series = pd.Series([i, i*i], index=df) df = tmp_series.append(tmp_series, ignore_index=True) print(df) ↓結果 Temp Time 0 0 0 1 1 1 2 2 4 3 3 9 4 4 16
コマンドラインでNvidia-driverをインストールする4行で[GPU]
# 以前にインストールしたことがある場合は以下の2行を追加で実行 sudo apt-get purge nvidia-* sudo apt-get purge cuda-* sudo add-apt-repository ppa:graphics-drivers/ppa sudo apt-get update # recommendと書いてあるバージョンを確認 ubuntu-drivers devices # nvidia-430は各自で読み替える sudo apt-get install nvidia-430
LightsailにおけるSSL証明の更新[Lightsail]
lightsail.aws.amazon.com あとで自動更新の手順を追加する
pathlibを使うとglobもopenも使わずにテキスト処理ができる[Python]
これまで特定のフォルダ内にあるテキストファイルを処理するときは、以下のようにglobをインポートして、ファイルパスのリストを作成した後に、with openでテキストを読み込むということをしていた。 from glob import glob src = "./input_txt/*.txt" for txt in glob(src): with open(txt, "r") as f: f.read() パス指定の時にアスタリスクが入ったり、with openによる無駄なfが発生したり、無駄なインシデントが発生したりし、コードが汚い。 一方、pathlibをインポートすると、以下のようにコー…
Raspi 3B+に外付けHDDをつなげてNextCloudでファイルサーバーを作成[NextCloud]
まずは下記のサイトを参考にRaspiにUbuntu server 18を導入した. gihyo.jp 次に下記のブログを参考に外付けHDDをRaspiにマウント マウントは/mediaディレクトリにすること. qiita.com ここからNext Cloudのインストールに移る. snapのインストール sudo apt-get install snapd NextCloudのインストール sudo snap install nextcloud /mediaディレクトリへ接続 以下のコマンドが重要. NextCloudに/mediaディレクトリを認識させるのだ.外付けHDDのマウントは,/me…
2枚のプロットを連続して出力する方法[Matplotlib]
plt.scatter(transformed_pca[:,0], transformed_pca[:,1]) plt.xlim(-0.1,1.1) plt.ylim(-0.1,1.1) plt.savefig('./pca.png') plt.figure(2) plt.scatter(transformed_tsne[:,0], transformed_tsne[:,1]) plt.xlim(-0.1,1.1) plt.ylim(-0.1,1.1) plt.savefig('./tsne.png') plt.figure(1)にすると,1枚目に2枚目のデータがかぶさる. なので,1枚目と2…
Flairで自前のELMoモデルを読み込む方法[Flair]
from flair.embeddings import ELMoEmbeddings from flair.data import Sentence sentence = Sentence(phrase) # Preparating ELMo options = './elmo_options.json' weights = './elmo_weights.hdf5' embedding = ELMoEmbeddings('custom', options_file = options, weight_file = weights) embedding.embed(sentence)
docker run -it --name "hoge" -v /home/ubuntu:/root/tmp -p 8080:80 hoge
Skype会議の招待はHTML形式でないとリンクが取れない[Skype]
Outlookで のボタンを押すと,簡単にSkype会議を設定できるのだが, デフォルト設定のテキスト形式でメールを送ると,以下のように文字化けしてしまう. こういうときは,ファイル > オプション. > メール でHTML形式に切り替えてみよう. HTML形式にすると,問題無く会議室へのリンクが送れる.
コマンドプロンプトからファイルエクスプローラーを開く方法[Mac][Windows]
カレントディレクトリでエクスプローラーを開くためのコマンドを紹介. WindowsとMacでコマンドが異なる. for windows explorer . for mac open .
sudo pythonでnot foundになる時はpythonの絶対パスを調べよう[Python]
sudo python xxx.pyでスクリプトを実行した時,ライブラリが見つからないことがあった. こういう時はwhichコマンドを使って,普段のpythonの絶対パスを調べる. which python > /home/ubuntu/.pyenv/xxx/python そして得た絶対パスを使ってスクリプトを動かしたみよう. /home/ubuntu/.pyenv/xxx/python xxx.py こうすると,普段使っているpythonのライブラリがsudoでも使える.
EntityRulerを使って深層学習ベースのNERにルールを追加[sciSpacy]
import spacy from spacy.pipeline import EntityRuler nlp = spacy.load("en_core_sci_sm") patterns = [{"label": "ORG", "pattern": "Jeffrey Hinton"}, {"label": "ORG", "pattern": "University of Toronto"}, {"label": "ORG", "pattern": "Google"}] ruler = EntityRuler(nlp, overwrite_ents=True) ruler.add_patte…
@inproceedings{suzuki2019, title={Hoge Hoge Title}, author={Taro Suzuki and Jiro Suzuki and Saburo Suzuki and others}, booktitle={15th Hoge Hoge Conference}, year={2019} } authorの所で,and othersと打つと,et al. になる. 3人以上を省略して書くことが多いみたい.
「ブログリーダー」を活用して、Vasteeさんをフォローしませんか?