Linux

curlについて

man curlでもいいが便利だったので、サイトを転載。 qiita.com

workon(mkvirtualenv)について

qiita.com

Apacheのサーバについて

djangoにてrunserverは自動更新するが、apacheはされない。 $ ps aux | grep python $ ps aux | grep httpd $ sudo /usr/local/apache24/bin/apachectl help $ sudo /usr/local/apache24/bin/apachectl graceful すると変更が反映される。 apache勉強しない…

Failed cleaning build dir for cryptographyについて

pipでcryptographyをインストールしようとした時に起こったエラー。 stackoverflowにあった。 $ pip install cryptography Failed cleaning build dir for cryptography !! stackoverflow.com

Linuxの-neや-eqの意味についてまとめてた

便利なサイトがあったため、転載。 linux if command shellscript.sunone.me

Dockerやら「png、jpgの違い」やら

paiza.hatenablog.com www.gizmodo.jp

ssh-agentの使い方とVim、Gitの習慣(pushとpull以外の確認)

qiita.com qiita.com gitの習慣 $ git status →Gitのbranchや状況の確認 $ git branch →branchを確認する $ git log →Gitの変更履歴の確認 $ git fetch →Gitのpullしたときにどう変化するか確認 $ git diff →Gitの前回との変更点の確認(commitの前) $ git …

これ便利 $変数(シェル)

kajitiluna.hatenablog.com

Curlコマンド便利ツール

pythonのsocketやsubprocessを勉強していくにあたり、curlでアクセスすることが重要だったので載せる。 qiita.com

Linuxのサーバ負荷や使用率を調査する

DiskのIOを確認するとき便利(fioなど) nbisco.hatenablog.com tasuku.hatenablog.jp ついでにメモリも www.math.kobe-u.ac.jp コマンド集(CPU、メモリ、DISK) easyramble.com

VBAによるtsvファイルのExcel変換(Mac編)

FileFormat numbers in Mac Excel These are the main file formats in Windows Excel 2007-2016: 51 = xlOpenXMLWorkbook (without macro's in 2007-2016, xlsx) 52 = xlOpenXMLWorkbookMacroEnabled (with or without macro's in 2007-2016, xlsm) 50 = xl…

Pythonで一億行のtsvファイルを作成する(高速化)

以下の課題に対して、コードを作成した。ちなみにargparseはまどろっこしいので、Clickを使用している。 百万行のファイルでおよそ39秒かかった。ここからの改善のしようがわからない。 1億行のrowを持つtsvファイルを出力するプログラムを作成せよ。 カラム…

git cloneのブランチ指定とSQL集約とline_profiler(バラバラ)

git cloneのブランチ指定 $ git clone -b ブランチ名 https://リポジトリのアドレス $ git commit -a -m "任意のコメント" //コミット (-aオプションは変更を自動検出してくれる) $ git branch //今いるブランチを確認 $ git checkout ブランチ名 *ブランチ…

API繰り返し出力

#bin/sh for i in `seq 0 N`; do curl "http://~~?l=100&o=${i}" | jq .result.classify_list[] | jq -r "to_entries | [.[].value] | @csv" >> output.csv done

JSON API→CSVにて

jqを用いてAPI取得から curl 'url名' | jq .項目名1.項目名2[] | jq -r "to_entries | [.[].value] | @csv" >> test.csv これでいける!

CentOS7 仮想環境構築

CentOS7(minimal)をインストールした USB挿入 $ su # diskutil list # diskutil unmountDisk /dev/disk4 $ cd ~ $ ls $ cd Downloads/ $ ls $ sudo dd if=./CentOS-7-x86_64-Minimal-1511.iso of=/dev/disk2 bs=4028 $ sudo dd if=./CentOS-7-x86_64-Minimal…