Skip to content

Instantly share code, notes, and snippets.

@mutomasa
mutomasa / plot_each_feature_by_target.py
Created October 12, 2020 08:28
ターゲットごとに8つの特徴量を表示する
#ターゲットごとに8つの特徴量を表示する
fig,axes = plt.subplots(4,2,figsize=(10,20))
ax = axes.ravel()
for i in range(8):
ax[i].hist(survived_data.iloc[:,i],bins=15,color='#66bd63',alpha=.5)
ax[i].hist(not_survived_data.iloc[:,i],bins=15,color='#f46d43',alpha=.5)
ax[i].set_title(survived_data.columns[i])
ax[i].set_yticks(())
ax[0].set_xlabel("Feature magnitude")
@mutomasa
mutomasa / displot.py
Created October 12, 2020 08:24
distplot(ヒストグラム)を描く
sns.distplot(df[df['Survived']==1]['Fare'],kde=False,rug=False,bins=10,label='Survived')
sns.distplot(df[df['Survived']==0]['Fare'],kde=False,rug=False,bins=10,label='Death')
plt.legend()
@mutomasa
mutomasa / countplot.py
Created October 12, 2020 08:23
countplotを描く
sns.countplot('Pclass',data=df,hue='Survived')
@mutomasa
mutomasa / heatmap.py
Created October 12, 2020 08:22
ヒートマップを描く
heatmap_data = df[['Age','Pclass','Fare','Survived']]
sns.heatmap(heatmap_data.corr(), annot=True, fmt='.2f', cmap='summer')
@mutomasa
mutomasa / pairplot.py
Created October 12, 2020 08:19
pairplotを描く
sns.pairplot(df[["Survived", "Pclass", "SibSp", "Parch", "Age", "Fare"]], hue="Survived")
plt.show()
@mutomasa
mutomasa / gist:6052077
Created July 22, 2013 07:56
The list of technical tools on Windows which I utilize.
## admittedly,I can't make use of Windows{XP,7,8}.
## but,some tools are required to be good at workplace sometimes.
## categories are not sorted.
## 2013/07/22 Ver1.0
.Sysinternals
・fping
・WinMerge
・NetEnum
・Xnview
@mutomasa
mutomasa / easy use of shell_scripting
Created January 11, 2013 20:40
シェルスクリプトのネタ(自戒を込めて)
##動機##
シェルスクリプトってなんだか難しくね.
サービス監視スクリプトなどのルーティンワークなどは
テンプレ化しようよ。
##
@mutomasa
mutomasa / get_wind.rb
Created November 11, 2012 11:39 — forked from cockscomb/get_wind.rb
Getting per 10 minutes wind data from Kishocho.
# encoding: UTF-8
require 'csv'
require 'date'
require_relative 'kishocho'
include Kishocho
# puts Kishocho.get_10_min_data(1192, Date.new(2010, 5, 1))
@mutomasa
mutomasa / get_wind.rb
Created November 11, 2012 11:38 — forked from cockscomb/get_wind.rb
Getting per 10 minutes wind data from Kishocho.
# encoding: UTF-8
require 'csv'
require 'date'
require_relative 'kishocho'
include Kishocho
# puts Kishocho.get_10_min_data(1192, Date.new(2010, 5, 1))
@mutomasa
mutomasa / gist:6301aa086e7f41a91c31
Created November 11, 2012 11:24
enable keepalive for perfomance by using ab.
ab -k -n 100 -c 5 http://example.com/
ab -k -n 1000 -c 100 http://example.com/