PyMOL
タンパク質とか化学式を可視化するソフト。
pythonのインストールが必要。
インストール
http://biokids.org/?PyMOL%2F%A5%A4%A5%F3%A5%B9%A5%C8%A1%BC%A5%EB
gitデビュー
下記サイトを参考
http://d.hatena.ne.jp/killingout_n-bita/20130324/1364126261
http://d.hatena.ne.jp/snaka72/20100602/1275496817
http://d.hatena.ne.jp/shim0mura/20111212/1323660740
1.基本
#フォルダの初期化 git init #フォルダ内のファイルを監視対象にする git add . #全てのファイルをコミット git commit -a
vimでコメントを記載
#リポジトリの作成 git remote add origin git@github.com:tatabox/test.git #プッシュして変更を反映 git push -u origin master
通常は以下でOK
#コミットとコメント git commit -m "コメント" #プッシュして変更を反映 git push origin master
2.Windowsでの_vimrcの管理方法
http://qiita.com/hide/items/735bb2fc954b17bf410f
#シンボリックリンクの作成 cd C:\Users\user1 cmd /c mklink .vimrc "C:\Users\user1\my_Vim\.vimrc" cmd /c mklink .gvimrc "C:\Users\user1\my_Vim\.gvimrc"
gitのlnコマンドによるシンボリックリンクは
Windowsで機能しないので注意。
3.githubのファイル削除
#ローカルファイル削除 rm ファイル名 #削除内容を伝える git rm ファイル名 git add . git commit -m "comment' git push aaa master
4.リポジトリの複製
git clone リポジトリのURL
vimの環境構築2
参照というかそのまま
http://qiita.com/puriketu99/items/1c32d3f24cc2919203eb
cd ~/vimfiles/bundle
git clone https://github.com/Shougo/neobundle.vim git clone https://github.com/Shougo/vimproc
_vimrcに下記を記載
if has('vim_starting') set runtimepath+=~/vimfiles/bundle/neobundle.vimcall neobundle#begin(expand('~/.vim/bundle/')) NeoBundleFetch 'Shougo/neobundle.vim' call neobundle#end() endif NeoBundle 'Shougo/neobundle.vim' NeoBundle 'Shougo/vimproc' NeoBundle 'VimClojure' NeoBundle 'Shougo/vimshell' NeoBundle 'Shougo/unite.vim' NeoBundle 'Shougo/neocomplete' NeoBundle 'Shougo/neosnippet' NeoBundle 'jpalardy/vim-slime' NeoBundle 'davidhalter/jedi-vim' NeoBundle 'Shougo/vimfiler' filetype plugin indent on " required! filetype indent on syntax on
プラグインのインストール
vin上で:NeoBundleInstall
プラグインのアンインストール
vimrcのNeoBundleの記述を消し、vim上で :NeoBundleClean
Vagrant+VirtualBox環境の構築7(IPython Notebook+CentOS)
IPython Notebookの外部出力
pyQtは下で落とす
http://pkgs.org/centos-6-rhel-6/centos-rhel-x86_64/PyQt4-4.6.2-9.el6.x86_64.rpm/download/
$ sudo yum localinstall PyQt4-4.6.2-9.el6.x86_64.rpm
matplotlib、scipy、numpy等はeasy_installで
$ sudo easy_install numpy scipy tornado pyzmq pandas ipython pygments matplotlib
IPythonの設定
$ ipython profile create myserver $ sudo vi ~/.ipython/profile_myserver/ipython_notebook_config.py
ipython_notebook_config.pyを一部変更
c = get_config() c.IPKernelApp.pylab = 'inline' c.NotebookApp.ip = '*' c.NotebookApp.open_browser = False #ポート指定 c.NotebookApp.port = 9999
CentOSのファイアウォールを切る
$ sudo service iptables stop
IPythonの立ちあげ
$ ipython notebook --prifile=myserver
http://192.168.33.10:9999
ipython notebookがvagrantの外部環境から使用可能。
Vagrant+VirtualBox環境の構築6(CentOS)
nginx + gunicorn + Djangoで
基本ここの通り
http://source.hatenadiary.jp/entry/2013/06/11/132346
gunicornのインストール
$ sudo easy_install gunicorn
nginxのインストール
$ sudo yum install nginx
ログファイル用のフォルダ作成
$ sudo mkdir /etc/logs
nginx.conf ファイルを編集
$ sudo vi /etc/nginx/nginx.conf
nginx.conf
user nginx; worker_processes 1; error_log logs/error.log; pid logs/nginx.pid; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; sendfile on; keepalive_timeout 65; server { listen 80; server_name localhost; location / { proxy_pass http://127.0.0.1:8000; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } } }
djangoのsettings.py設定に追記
$ sudo vi settings.py #INSTALLED_APPSの以下の行を追加 'gunicorn',
CentOSのファイアウォールを切る
$ sudo service iptables stop
djangoをgunicornで実行
$ python2.7 manage.py run_gunicorn 192.168.33.10:8000
http://192.168.33.10:8000
404画面
http://192.168.33.10:8000/admin
管理画面
Vagrant+VirtualBox環境の構築5(Django+Mysql+CentOS)
vagrantfieの下記行にてIPを指定
config.vm.network :private_network, ip: "192.168.33.10"
SentOSのファイアウォールを解除
sudo service iptables stop
これでVagrnt中CentOSのweb画面が確認可能
http://192.168.33.10
Djangoの起動と設定
$ cd /var/www $ django-admin.py startproject opencv $ cd opencv $ sudo vi settings.py #INSTALLED_APPSの以下の行にてコメントを外す 'django.contrib.admin', $sudo vi urls.py #urls.pyの以下の行にてコメントを外す from django.contrib import admin admin.autodiscover() url(r'^admin/', include(admin.site.urls)), $ cd.. $ python2.7 manage.py runserver
http://localhost:8000/admin/
に管理画面が出る。下記記載にて出力IPとポート指定も可
$ python manage.py runserver IPアドレス:ポート
$ easy_install mysql-python
MySQLにユーザー追加
#ログイン $ mysql -u root -p #全権ユーザーの追加 mysql> GRANT ALL ON *.* TO ユーザー名@"localhost"IDENTIFIED BY "パスワード"; Query OK, 0 rows affected (0.00 sec) #反映させる mysql> FLUSH PRIVILEGES; Query OK, 0 rows affected (0.00 sec) #データベースの作成 mysql> create database opencv; Query OK, 1 row affected (0.00 sec)
MySQLの使用に向けたsettings.pyの編集
$ cd /var/www/opencv $ sudo vi settings.py DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'opencv', 'USER': 'ユーザー名', 'PASSWORD': 'パスワード',
同期
$ python manage.py syncdb