2017-10-30から1日間の記事一覧

Bashの[ -e /home/... ]による確認

[ -e filepath ] Returns true if file exists. [ -x filepath ] Returns true if file exists and executable. [ -S filepath ] Returns true if file exists and its a socket file. [ expr1 -a expr2 ] Returns true if both the expression is true. [ e…

Pythonのコードの計測について(line-profiler)

@profile def fizzbuzz(n): if n % 3 == 0 and n % 5 == 0: return 'FizzBuzz' $ kernprof -l fizzbuzz.py 1 2 Fizz ...(省略)... 97 98 Fizz Wrote profile results to fizzbuzz.py.lprof $ python -m line_profiler fizzbuzz.py.lprof Timer unit: 1e-06 s…