Pip is a package management system for installing and managing Python software packages. To enable auto completion for
pip in zsh, the documentation of pip suggests adding the following line to
eval "`pip completion --zsh`"
However, merely having this line would not enable auto completion for
pip3. To enable auto completion for
pip3 as well, add the following line after the line above:
compctl -K _pip_completion pip3
Backslash escaping is common in programming. Sometimes we may let a file go through a few filters or template engines, such as markdown, quik, etc. and things become even worse if we are writing the template files from a string which requires backslash escaping for any literal backslashes appearing in the string. On Windows, things are more horrible than on Unices (You know why, right? Hint: path separator). Then, if you need a “real” backslash in the final output, you may end up with four or eight or sixteen backslashes in the original file. This is horrible. To avoid this situation, I wrote a short preprocessing script
backbackslash.py in Python to double or quadruple or octuple or zzzuple your backslashes.
It is common for an scientific program to load an ASCII format matrix file, i.e. an ASCII text file consisting of lines of float numbers separated by whitespaces. In this post, I am gonna show my code (C++ and Python) to load a matrix from an ASCII file.
This post was updated on Feb 11, 2013, since the old way never works now.
Travis CI is a hosted continuous integration service for the open source community, helping run tests for your GitHub projects for every single push and pull request. However, by the time this post is written, Travis CI has not officially supported Jython, a Python interpreter written in Java. This post will help you setup a Jython testing environment for a Python project on Travis CI.