2017-10-01から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…

Solrのf.<field>.facet.<param>のvalue指定

f.<field>.facet.<param>のvalue指定させる場合、以下の{terms=...,...}を指定すればいい。 curl http://localhost:8983/solr/testurltext/select?indent=on&q=*:*&wt=json&facet=true&facet.field={!terms=value1,value2}category1_name&rows=0 Faceting | Apache Solr Re</param></field>…

Gitでブランチ切って作業して、マージする。

git flowのルールにそって 作業しない場合に $ git branch * master # ブランチカット $ git checkout -b feature-create-api feature-create-api $ git add . $ git commit -am "commit message!" $ git push -u origin feature-create-api $ git checkout …

boostnoteとかいうmarkdownでメモできるアプリ

qiita.com