Photos
-
Tag Cloud
android awk bash bioservices books C CSS dictionary english fedora Firefox gimp git github graphviz HTML ipython latex Linux malloc matplotlib mount pandas PDF perl PHP pypi python R rest rpy rpy2 samtools sed sphinx ssh svn video vim virtualbox virtualenv web services wget xbmc yum
WP Cumulus Flash tag cloud by Roy Tanck requires Flash Player 9 or better.
Follow me
-
Recent Posts
calendar
February 2019 M T W T F S S « Dec 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 Recent Comments
- Anonymous on Python list: difference between append and extend
- Thomas Cokelaer on Solving a Linear Programming problem with Python (Pulp)
- Thomas Cokelaer on python: certificate verified failed
- Thomas Cokelaer on How to sort a dictionary by values in Python
- Set Colorbar Range in matplotlib – PythonCharm on matplotlib: difference between pcolor, pcolormesh and imshow
Archives
- December 2018
- October 2018
- August 2018
- May 2018
- March 2018
- February 2018
- January 2018
- December 2017
- October 2017
- September 2017
- August 2017
- June 2017
- May 2017
- January 2017
- November 2016
- October 2016
- September 2016
- March 2016
- February 2016
- January 2016
- June 2015
- May 2015
- February 2015
- December 2014
- November 2014
- October 2014
- September 2014
- August 2014
- July 2014
- June 2014
- May 2014
- April 2014
- March 2014
- February 2014
- January 2014
- November 2013
- October 2013
- September 2013
- August 2013
- July 2013
- June 2013
- March 2013
- February 2013
- January 2013
- December 2012
- November 2012
- October 2012
- July 2012
- June 2012
- April 2012
- March 2012
- February 2012
- January 2012
- November 2011
- October 2011
- September 2011
- August 2011
- July 2011
- June 2011
- May 2011
- April 2011
- March 2011
Categories
Meta
Tag Archives: python
How to get pypi statistics about package download
Tweet A while ago, I designed pypiview, a Python package used to fetch the number of downloads for a package hosted on pypi website. It used to work decently but according to pypi itself the values stored are not reliable … Continue reading
Difference between __repr__ and __str__ in Python
Tweet When implementing a class in Python, you usually implement the __repr__ and __str__ methods. __str__ should print a readable message __repr__ should print a message that is unambigous (e.g. name of an identifier, class name, etc). You can see … Continue reading
pytest-cov collects no data on Travis
Tweet I recently switched from nosetests to pytest and pytest-cov for one of my Python project (http://easydev-python.readthedocs.io). Locally, everything seemed to work fine and once on Travis, all tests passed as expected. Yet, before the coverage report, I noticed this … Continue reading
Installing Python2.6 in a virtual environment
Tweet First, install python2.6 executable. see previous post if you have issues when compiling (gcc not found). Make sure you have installed python-dev with apt-get or yum. Then, following the instructions on the same topic but for Python 3 in … Continue reading
Installation of Python 2.6 error fixed
Tweet I wanted to install python2.6 in a virtual environment. The first step was to compile python 2.6 executable from the source code. Once the source are extracted, just type:
1 2 |
./configure --prefix=<PATH_WHERE_TO_INSTALL> make |
If you are lucky, everything is smooth and you … Continue reading
New software on pypi: pypiview
Tweet I’ve moved an old code into a new Pypi package and took the opportunity to play around with the badges. The new package called pypiview is now available on pypi. It allows one to easily look at the number … Continue reading
Python function chmod to change permission
Tweet I naively tried the function chmod from the standard python module called os to change the permission of a file:
1 |
os.chmod(filename, 644) |
Checking in the unix command line (ls -l), I got an unexpected result:
1 |
--w----r-T. |
I expected indeed a … Continue reading
Python : How to flush output of print
Tweet Using the sys module, just type:
1 2 |
import sys sys.stdout.flush() |
python argparse issues with the help argument (TypeError: %o format: a number is required, not dict)
Tweet Even though Python has a great documentation, once in a while you get stuck on a single problem more than expected. It happenned to me today with the argparse module, which I thought I knew enough to quickly code … Continue reading
Starting to use Python Pandas library
Tweet Pandas is brilliant. If you are looking to manipulate data in Python, use it. I am refactoring most of my codes with this library. It provides many useful data structures to manipulate data in 2, 3, 4 dimensions and … Continue reading