Skip to content

Instantly share code, notes, and snippets.

Avatar
🏂

Higuchi kokoro zerebom

🏂
View GitHub Profile
@zerebom
zerebom / 00_timeseries.md
Last active Sep 16, 2020
Kaggle snippets
View 00_timeseries.md

pandas

time split

test_df = df2[df2['arrival_date'] > datetime.datetime(2017,6,30)].reset_index()
train_df = df2[(df2['arrival_date'] > datetime.datetime(2016,5,30))&(df2['arrival_date'] < datetime.datetime(2016,8,30))].reset_index()

to_timedate

@zerebom
zerebom / 00_readme.md
Last active Apr 15, 2020
shell script
View 00_readme.md

ゴミ箱を空にする

#ゴミ箱の場所
find ~ -name "Trash"
#ゴミ箱の中身確認
ls -al ~/.local/share/Trash/files
#全部消す
sudo rm -rf ~/.local/share/Trash/files/*
sudo rm -rf ~/.local/share/Trash/info/*
View 00_readme.md

This repository describe 'SimpleITK' which python module is inheritence by 3D voxel image processing module 'ITK'

@zerebom
zerebom / encode_categorical.py
Last active Mar 22, 2020
reduce_mem_usage description
View encode_categorical.py
def encode_categorical(df, cols):
for col in cols:
# Leave NaN as it is.
le = LabelEncoder()
not_null = df[col][df[col].notnull()]
df[col] = pd.Series(le.fit_transform(not_null), index=not_null.index)
return df