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
Starting to use Python Pandas library
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 more. … Continue reading
Line starting ‘ …’ is malformed! error
Playing with a Python wrapper of an R package, I suddenly got this error after a trivial change of the code: Line starting ‘<!DOCTYPE html> …’ is malformed!Line starting ‘<!DOCTYPE html> …’ is malformed! Wondering for a couple of minutes … Continue reading
Profiling Python with valgrind
1. Under Linux, install valgrind as follows (Fedora): sudo yum install valgrind kcachegrindsudo yum install valgrind kcachegrind and pyprof2calltree: pip install pyprof2calltreepip install pyprof2calltree 2. create a Python script (let us call it run.py) 3. Create the file containing the … Continue reading
Python: Error: new-line character – how to open the file in universal-newline mode ?
I was playing with the CSV module from the Python standard library. Typically using a code such as: import csv import zipfile zip = zipfile.ZipFile("file.zip") zipdata = zip.open("ExistingFile.csv") data_iter = csv.reader(zipdata, delimiter=",") data_iter.next() import csv import zipfile zip = zipfile.ZipFile("file.zip") … Continue reading
Python: list of empty lists creates references not copy
In Python, you can create a list with an element repeated N times quite easily with the following syntax: >>> a = [1] * 5 >>> print(a) [1,1,1,1,1] >>> a = [1] * 5 >>> print(a) [1,1,1,1,1] Here we create … Continue reading
Accessing Life Science Web Services from Python
In a previous post, I started to discuss about Web Services in Life Science and what a maze it is to navigate between them. Some Web Services provides Python code to access to their databases but not all of them. … Continue reading
Posted in biology, Life Science
Tagged bioservices, kegg, python, uniprot, web services
Leave a comment
Python: pip installation
References: http://www.pip-installer.org/en/latest/installing.html The installation of pip depends on your system. For instance under ubuntu it is as easy as sudo apt-get install python-pipsudo apt-get install python-pip Another way to install it if you are familiar with virtualenv tool consists in … Continue reading
Python header
This post is about what to put on top of your Python script. You may have seen Python script starting with something like: #!/usr/local/bin/python # coding: latin-1#!/usr/local/bin/python # coding: latin-1 and wonder what it is useful for or do you … Continue reading
Raspberry pi: first steps
My first raspberry pi arrived !! I pluged in a USB mouse and keyboard, the SD card I bought at the same time (it has already a linux system on it), a hdmi cable to the first screen I found … Continue reading
How use R to build permutation or combination
In a previous post, I used itertools in Python to create combination and permutation using the standard module itertools. What about using R language to perform the same task. The permutation function allows you to get permutation of N values … Continue reading