個人的なメモ

めもめも.

2016-06-05から1日間の記事一覧

ubuntu+gtags+emacsとりあえずメモ

1. globalをインストール apt-get install global2. emacsのinitファイルに下記を追記 (autoload 'gtags-mode "gtags" "" t) (setq gtags-mode-hook '(lambda () (local-set-key "\M-t" 'gtags-find-tag) (local-set-key "\M-r" 'gtags-find-rtag) (local-se…

emacs_init.el

;(setq load-path (cons "~/site-lisp/" load-path)) ; 言語を日本語にする (set-language-environment 'Japanese) ; 極力UTF-8とする (prefer-coding-system 'utf-8) ; 行番号表示 (global-linum-mode t) ; 起動時の大きさ ;(setq initial-frame-alist ; '(…

findコマンドメモ

指定ファイル以外を探索する $ ls a.txt b.txt c.png d.cpp fuga hoge $ find ./ -not -name "*.txt" ./ ./c.png ./d.cpp ./fuga ./hoge 複数のファイル名から探索する find ./ (オプション) -o (オプション) $ ls ./ a.txt b.txt c.png d.cpp $ ls ./*.{txt…

ディレクトリ構造のみをコピー

ファイルの構造が以下のようになっていたとする. $ find ./test ./test ./test/a.txt ./test/b.txt ./test/c.png ./test/d.cpp ./test/fuga ./test/fuga/a.c ./test/hoge ./test/hoge/a.cpp ./test/hoge/hogehogeディレクトリのみをtest2ディレクトリにコピ…

pythonからシェルコマンド実行

import commands cmd = “ls ./" check = commands.getoutput(cmd) # 実行結果をcheckに返す file_list = check.split() # カレントディレクトリのファイルをリストとしてfile_listへ格納.

numpy+ndarray

追加 >>> x = np.array([]) >>> x = np.append(x, [1, 2]) >>> x array([ 1., 2.]) >>> x = np.append(x, [3, 4]) >>> x array([ 1., 2., 3., 4.]) >>> np.append(x, [5, 6, 7, 8], axis=0) array([ 1., 2., 3., 4., 5., 6., 7., 8.]) >>> x = np.append([x]…