2015-01-01から1年間の記事一覧
.xbb file contains the boundingbox information of its corresponding file. When LaTeX returns an error message "XXX.xbb" not found, we should generate .xbb file by executing the following command: extractbb XXX.pdf
[code lang="python"] import hoge edit the hoge.py reload(hoge) [/code] You might have an experience that iPython/Anaconda seems to ignore your update on a script file. No matter how many times you edited and saved, iPython/Anaconda returns…
There are two functions, os.listdir and glob.glob, for the purpose. os.listdir loads all the filenames in the specified directory. [code lang="python"] import os filelist = os.listdir('dirName/') [/code] glob.glob loads all the filenames i…
[code lang="python"] import numpy generate a 10x3 matrix with random values M = numpy.random.random*1 mean along row resulting a 3x1 vector meanRow = M.mean(axis=0) mean along column resulting a 10x1 vector meanCol = M.mean(axis=1) [/code]…
[code lang="bash"] conda install -c https://conda.binstar.org/tlatorre -y pygame conda install pyopengl [/code]
Pythonのオブジェクトは変更可能(mutable)なものと変更不可能(immutable)なものがある.変更可能なオブジェクトは関数内での変更が関数外でも有効となる. mutable: 辞書,リスト immutable: 数値,文字列,タプル
English notes is below the Japanese one. OpenCV 3.0.0をPython 2.7から使うためのインストール手順 Pythonのインストール Python-OpenCVを動かすには,Python本体に加えて少なくともNumPy, MatPlotLibのインストールが必要. 1.1. Anacondaのインストール…
Python Scientific Lecture Notes(英語): Python初心者向け.コード付き.iPythonの使用を仮定.NumPy, SciPy, Sympy, Scikit-image, Traits, scikit-learnについても扱ってる. 1の一部和訳されたもの: Matplotlib tutorial(英語): MatPlotLibに関する説明…
The goal is to use Python with OpenCV under Ubuntu 14.04. The first step is to install Python and its packages. I installed a Python package manager Anaconda. [code lang="bash"] wget https://3230d63b5fc54e62148e-c95ac804525aac4b6dba79b00b3…
A involve/include B: B is all component or some component of A. A consist of B: B is all component of A.
OpenCV ver. 3.0 was released. I tried to compile OpenCV with VTK again and again and finally could compile it. The key was compile VTK with BUILD_SHARED_LIBS on compile OpenCV with VTK That's it!!
I made a repository of C++ code that runs polynomial fitting by linear least squares.
Run CMake Run Visual Studio as a superuser Open gflags.sln with Visual Studio Batch build ALL_BUILD, INSTALL, and RUN_TESTS The result is as folllows: ------ Rebuild All started: Project: INSTALL, Configuration: Release x64 ------ -- Insta…
[code lang="bash"] cmake .. -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Debug nmake [/code]
[code language="bash"] sudo apt-get install texlive-lang-cjk uplatex -shell-escape %s.tex pbibtex %s.tex uplatex -shell-escape %s.tex uplatex -shell-escape %s.tex dvidfmx %s.dvi [/code]
DocumentRoot /var/www/html Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all RailsBaseURI /redmine PassengerResolveSymlinksInDocumentRoot on
Follow the installation guide. Assuming that LAMP and other dependencies have been installed. The following code might need to be executed as a superuser. [code language="bash"] cd /var/www/html wget http://download.dokuwiki.org/src/dokuwi…
Visual Studio 2013 for Windows Desktop Jp|En Boost pre-built binary We can select the install directory, say BOOST_DIR. I chose boost_1_55_0-msvc-12.0-64.exe because msvc-12.0 means VS2013, my PC is 64bit, and my ubuntu PC uses 1.54 (the p…
Blitz++ code: http://sourceforge.net/projects/blitz/ rank: up to 11 type: dense operation: - slicing ITensor well-documented code: https://github.com/ITensor/ITensor rank: type: operation: BTAS code: https://github.com/BTAS/BTAS rank: any …
software & updates > Other Softwares check "Canonical Partners" and Canonical "Partners (Source Code)" sudo apt-get update sudo apt-get -yV install skype
make a script, git-meld.sh #!/bin/bash meld "$2" "$5" > /dev/null 2>&1 put the script in the bin directory sudo mv git-meld.sh /usr/local/bin/ sudo chmod +x /usr/local/bin/git-meld.sh add diff settings in the $HOME/.gitconfig [diff] extern…
count_if counts the number of elements that satisfies the specified condition. The result is like the following: 79, 55, 57, 44, 0, 14, -5, 52, 86, 95, -7, 100, 5, -5, 95, 19, 63, 59, 40, 51, numNegative = 3 numNonNegative = 17 numZero = 1…
[code lang="cpp"] Eigen::MatrixXd M = Eigen::MatrixXd(3,10); // make each column homogeneous Eigen::MatrixXd Mh = M.colwise().homogeneous(); // make each column dehomogeneous Eigen::MatrixXd Md = Mh.colwise().hnormalized().topRows(Mh.rows(…
#pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #include <Eigen/Geometry> #pragma GCC diagnostic pop</eigen/geometry>
A friend of mine told me how to make cv::findHomography more stable. The solution is very easy, comment lines 91-121 of module/calib3d/fundam.cpp and then compile. The unstability is due to the new algorithm to compute the homography. From…
sudo ./install # to enable the installer mkdir sudo apt-get install matlab-support # add matlab to the launcher
C++11 functions std::to_string(X) converts X to std::string. std::stoi(str) converts std::string str to int type data std::stof(str) converts std::string str to float type data std::stod(str) converts std::string str to double type data
bronchus - bronchi: 気管支(単複) alveolus - alveoli: 肺胞(単複)
std::iota: assigns successive values to a container include <numeric> std::iota( v.begin, v.end(), val ); // v[0] = val; // v[v.end()-1] = val + v.size()-1; std::random_shuffle: randomizes the order of elements of random access containers. include <algorithm></algorithm></numeric>…
A commit can be linked to an issue by adding issue ID at the beginning of commit message. The following command links the commit to an issue, whose ID is 1. git commit -m "#1 brabrabra"