tail -fみたいに流しながら見たいんだけど、色んなコマンドが出力をバッファしちゃうので、困ったときはそのコマンドにバッファしないオプションが無いか探すのがオヌヌメ。
man command -> bufferとかで検索
--line-buffered
Use line buffering, it can be a performance penality.
$ iostat -x 1 | grep --line-buffered 'sda'
| " VIM Configuration File | |
| " Description: Optimized for C/C++ development, but useful also for other things. | |
| " Author: Gerhard Gappmeier | |
| " | |
| " set UTF-8 encoding | |
| set enc=utf-8 | |
| set fenc=utf-8 | |
| set termencoding=utf-8 | |
| " disable vi compatibility (emulation of old bugs) |
| #!/usr/bin/python | |
| # -*- coding:utf-8 -*- | |
| """ | |
| Idea and code was taken from stackoverflow(). | |
| This sample illustrates how to | |
| + how to pass method of instance method | |
| to multiprocessing(idea and code was introduced | |
| at http://goo.gl/tRHN1D by torek). |
この投稿では、iOSのファイルシステムについて理解し、データを永続化(iCloud含む)する方法を紹介する。尚、サンプルコードは動かない可能性もあるので参考程度にして下さい。
アプリがファイルシステムとやり取り出来る場所は、ほぼアプリのサンドボックス内のディレクトリに制限されている。新しいアプリがインストールされる際、インストーラーはサンドボックス内に複数のコンテナを作成し、図1に示す構成をとる。各コンテナには役割があり、Bundle Containerはアプリのバンドルを保持し、Data Containerはアプリとユーザ両方のデータを保持する。Data Containerは用途毎に、さらに複数のディレクトリに分けられる。アプリは、例えばiCloud Containerのように、実行時に追加のコンテナへのアクセスをリクエストすることもある。
図1. An iOS app operating within its own sandbox
| # License: | |
| # I hereby state this snippet is below "threshold of originality" where applicable (public domain). | |
| # | |
| # Otherwise, since initially posted on Stackoverflow, use as: | |
| # CC-BY-SA 3.0 skyking, Glenn Maynard, Axel Huebl | |
| # http://stackoverflow.com/a/31047259/2719194 | |
| # http://stackoverflow.com/a/4858123/2719194 | |
| import types |
| #!/usr/bin/env python | |
| # -*- coding: UTF-8 -*- | |
| # Roughly based on: http://stackoverflow.com/questions/11443302/compiling-numpy-with-openblas-integration | |
| from __future__ import print_function | |
| import numpy as np | |
| from time import time |