随笔分类 -  python

摘要:THIS IS AN EVOLVING WIKI DOCUMENT. If you find an error, or can fill in an empty box, please fix it! If there's something you'd like to see added, just add it.General Purpose EquivalentsMATLABnumpyNoteshelpfuncinfo(func)orhelp(func)orfunc?(in Ipython)get help on the functionfuncwhichfunc(See 阅读全文
posted @ 2013-10-20 22:00 springbarley
摘要:from pdfminer.pdfinterp import PDFResourceManager, process_pdffrom pdfminer.converter import TextConverterfrom pdfminer.layout import LAParamsimport threading, osclass PdfThread(threading.Thread): def __init__(self, in_queue, doc_txt_dir): threading.Thread.__init__(self) self.in_que... 阅读全文
posted @ 2013-09-30 16:48 springbarley 阅读(1303) 评论(0) 推荐(0)
摘要:iterable:An object capable of returning its members one at a time. Examples of iterables include all sequence types (such as list, str, and tuple) and some non-sequence types like dict and file and objects of any classes you define with an __iter__() or __getitem__() method. Iterables can be used in 阅读全文
posted @ 2013-09-25 14:13 springbarley
摘要:#coding:utf-8import sysreload(sys)sys.setdefaultencoding("utf-8")class TreeNode(object): def __init__(self): self.child = None self.brother = None self.value = None self.already_has_node = False self.value = "" '''if high level node doesn't has a child, than ... 阅读全文
posted @ 2013-08-29 19:12 springbarley 阅读(215) 评论(0) 推荐(0)