Skip to content

Instantly share code, notes, and snippets.

@ksomemo
ksomemo / Untitled1.ipynb
Last active July 24, 2017 02:27
python package での zscore
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ksomemo
ksomemo / interactive.ipynb
Created March 12, 2016 12:17 — forked from anonymous/interactive.ipynb
transform.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ksomemo
ksomemo / ad_block_plus_as_image_blocker.md
Last active August 11, 2017 00:51
画像ブロッカーとしてのAdBlockPlus
  • hostsでblockするとContentsそのものを見れなくて困る
  • 特定画像をBlockするChromeExtensionがない
  • AdBlockPlusにあった
  • 右クリックメニューから要素をBlockでOK
@ksomemo
ksomemo / 0_summary.md
Last active July 24, 2017 02:25
decorator メモ
  • decoratorの復習
  • wrapsってなに?
  • その効果
@ksomemo
ksomemo / listOfUserDefinedFunctions.js
Last active July 24, 2017 02:25
listOfUserDefinedFunctions
// http://stackoverflow.com/questions/493833/list-of-global-user-defined-functions-in-javascript
Object.keys(window).filter(function(x)
{
if (!(window[x] instanceof Function)) return false;
return !/\[native code\]/.test(window[x].toString()) ? true : false;
});
@ksomemo
ksomemo / install_packages_is_introduced_by_R_books.md
Last active August 11, 2017 00:50
install_packages_is_introduced_by_R_books.md

sato book

  • reshape2
  • ggplot2
  • scales
  • plyr
  • foreach
  • ykmeans
  • caret
  • fmsb
  • randomForest
@ksomemo
ksomemo / reuse-argument.sh
Last active August 11, 2017 00:48
直前の引数を再利用
mkdir -p ~/hoge/foo && cd $_
# いままでは、mkdir後にC-pで履歴を再表示してmkdir をcdに変更又は削除して実行していた
@ksomemo
ksomemo / change-codepage-to-utf-8.bat
Last active July 24, 2017 02:26
change codepage to utf-8
chcp 65001
@ksomemo
ksomemo / path_memo.py
Last active August 11, 2017 00:47
Python Append library path and Absolute path
import os
import sys
# library path
# Absolute path
sys.path.append(os.path.abspath(os.path.dirname(__file__) + '/..'))
@ksomemo
ksomemo / a.py
Last active August 11, 2017 00:54
ファイルをM行を分割して処理
import itertools
file_line_num = 3
if __name__ == '__main__':
for i in range(1, 10):
with open("test.txt") as f:
start = file_line_num * (i - 1)
stop = file_line_num * i
for l in itertools.islice(f, start, stop):