2013-12-01から1ヶ月間の記事一覧

matplotlibの使い方

http://w.livedoor.jp/met-python/d/matplotlib#content_2_8それっぽいアプリができそう。imtools.py import os from PIL import Image from numpy import * def get_imlist(path): return [os.path.join(path,f) for f in os.listdir(path) if f.endswith('…

Macでsedを使う

デフォルトのsedはエラーを吐くのでgnu-sed(gsed)を使うらしい。 http://www.absolute-keitarou.net/blog/?p=586 $ brew install gnu-sedalias sed="gsed" しておいた。

C++でファイルを読み込んで16進ダンプするコード

これ自体に意味は無いけど色んな要素が入ってて勉強になる。 #include <iostream> #include <fstream> #include <string> #include <cstdlib> using namespace std; const int PAGE_WIDTH = 16; const int PAGE_HEIGHT = 16; const int PAGE_SIZE = PAGE_WIDTH * PAGE_HEIGHT; class DumpFile { p</cstdlib></string></fstream></iostream>…