z='%.15f' % x
gives a 15 decimal precision float converted to a string.
It is possible to get more than 15 decimals using %.20f and
%.80g etc. But the decimals after 15th are not reliable.
****incrementing integers in python
i+=1
i*=5
i-=1
i/=2
all works. Note i**2 means i to the power 2
***********************
Python have private class and module methods. To make a method private
to a class or a module use __before the name.
Ex;
def __privateMethod():
If you try to call this method outside the module or outside the class
declaration, python will generate a 'method not found' exception.
Python 万歳!!!
This blog covers various topics from technical tweaks to latest in computational linguistics, Artificial Intelligence, Machine Learning and Wed Data Mining.
Subscribe to:
Post Comments (Atom)
Continuously monitor GPU usage
For nvidia GPUs do the follwing: nvidia-smi -l 1
-
If you used Adobe acrobat to annotate a PDF file and you had Acrobat crashed or had to restart the computer abruptly during the annotation p...
-
The following set of commands will plot two data series in a file using point markers and also write the output to a eps file and further co...
-
EXPLORING WEB SCALE LANGUAGE MODELS FOR SEARCH QUERY PROCESSING Jian Huang, Jiangbo Miao, Xiaolong Li, Jianfeng Gao and Kuansan Wang CROSS...
No comments:
Post a Comment