Follow me
-
Recent Posts
calendar
December 2024 M T W T F S S 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 29 30 31 Recent Comments
- Stan on python argparse issues with the help argument (TypeError: %o format: a number is required, not dict)
- Cormac on Pandas : how to compare dataframe with None
- LP on AWK: the substr command to select a substring
- jrab on python argparse issues with the help argument (TypeError: %o format: a number is required, not dict)
- How to disable SSL verification for urlretrieve? – Peter's blog on python: certificate verified failed
Archives
Categories
Meta
Tag Archives: python
Fitting distribution by combing R and Python
The following example illustrates how to use R package with Python by using the Rpy2 package. This problem solve in this example is to fit a normal distribution on some data samples. from rpy2.robjects import r from rpy2.robjects.packages import … Continue reading
What is Virtualenv
Virtualenv is a tool to create isolated Python environments. Its usage could be very useful when dependencies and versions are tricky. Imagine you have an application that needs version 1 of a library, but another application requires version 2. If … Continue reading
Python: string substitution using dictionaries
A nice way to populate a string with values is to use a dictionary, which can be defined outside of the print statement. The standard way is to write >>> print "The temperature in %s is %f degrees" % (’celsius’, … Continue reading
Python notes: generators
A new Python notes about Generators.
Python notes: exceptions
Here is the first article in my Python notes about Exceptions.
Python notes
I’ve started to gather Python notes that I took little by little during my different experiments with the language. Here is the main page Python notes. There is also a tinyurl for the Python tutorial link: http://tinyurl.com/d2k7bqe
Sphinx themes and configuration file
In this post, I describe the procedure to create a new CSS theme in Sphinx, which is a tool dedicated to software documentation (and documentation in general). For an example of HTML pages generated automatically with Sphinx, you can look … Continue reading
What is a Python descriptor
In Python, if any of the methods __get__, __set__, and __delete__ is defined for an object, then this object is said to be a descriptor. Descriptors are the mechanism behind properties, methods, static methods, class methods, and super(). Note that … Continue reading
Sphinx and ReST syntax for Python documentation
Sphinx is a tool that ease the creation of documentation for computer languages such as Python but also C/C++. The Sphinx syntax is an extension to the ReST (or RST) syntax. The drawback is that you need to learn another … Continue reading
Python list: difference between append and extend
When manipulating lists, you have access to two methods called append() and extend(). The former appends an object to the end of the list (e.g., another list) while the latter appends each element of the iterable object (e.g., another list) … Continue reading