Skip to content

Instantly share code, notes, and snippets.

Python環境構築 anaconda tensorflow-gpu

# 環境を作る
conda create -y -n env名 tensorflow-gpu keras ipykernel pandas matplotlib scikit-learn seaborn
conda install -y -c conda-forge category_encoders
# jupyter-notebookを起動可能にする  
conda activate env名
python -m ipykernel install --user --name env名

Visual Studio Code (VS Code) の各種設定・使用法

  • OS: Windows 10

使用方法

基本コマンド

  • Ctrl + shift + p: vs code 上のコマンドプロンプトを開ける.
  • Ctrl + p: エディタ上での操作コマンドプロンプトを選択できる. ファイルを開くこともできる.
@watermouth
watermouth / memos_on_pandas.md
Last active April 13, 2019 11:21
pandas.DataFrame: Indexing and Selecting Data

Indexing and Selecting Data についてのメモ

ソース

http://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html

Indexing and Selecting Data

" The default vimrc file.
"
" Maintainer: Bram Moolenaar <[email protected]>
" Last change: 2017 Jun 13
"
" This is loaded if no vimrc file was found.
" Except when Vim is run with "-u NONE" or "-C".
" Individual settings can be reverted with ":set option&".
" Other commands can be reverted as mentioned below.
@watermouth
watermouth / 20180723.md
Last active July 23, 2018 07:49
cplusplus tips

When you use abs, don't forget to write include cmath

#include <cmath>

これを付けずにstd::absを(doubleに対して)使うとコンパイルエラーになったりならなかったりする。

@watermouth
watermouth / 20180709_01.md
Last active July 9, 2018 04:00
char配列からstring文字列の生成に失敗した例(\0の付け忘れ)
  • create meshgrid data and plot contour
import numpy as np
import matplotlib
import matplotlib.pyplot as plt

x = np.linspace(-np.pi, np.pi, 360) # linearly spaced numbers
y = np.linspace(-1,1,100) # linearly spaced numbers
xx, yy = np.meshgrid(x, y)

Scikit Learn

Useful sources

API basics

  • methods: fit, transform, predict
  • IO: numpy.ndarray with the shape that has sample data number in the first placeholder. ex. (number_of_samples, feature_dim).
    some classes expect 1D array as y. ex. SGDRegressor
  • gistのバックアップについて
    gistは1つのgist毎にrepositoryが作られる。従って複数のgistを作成した場合は、別々のrepositoryになる。 バックアップをとるのであれば、すべてのgistに対してとる必要がある。 個別にrepositoryをクローンすることはできるが、すべてを対象にする公式の機能はないようだ。