- when you paste your python code into vim, the indent will be crazy. but if you run the command in the normal mode first:
:set paste
Everything will be fine.
| $ java -Xms4096m -Xmx4096m -jar jTessBoxEditor.jar | |
| $ tesseract num.font.exp0.tif num.font.exp0 batch.nochop makebox | |
| # 使用jTessBoxEditor打开并编辑num.font.exp0.tif | |
| $ vim font_properties | |
| # font 0 0 0 0 0 | |
| $ tesseract num.font.exp0.tif num.font.exp0 nobatch box.train |
| def catch_exception(origin_func): | |
| def wrapper(self=None, *args, **kwargs): | |
| print('start') | |
| try: | |
| u = origin_func(self, *args, **kwargs) | |
| return u | |
| except Exception: | |
| self.z() | |
| return 'an Exception raised.' | |
| return wrapper |
| class XXXItem(Item): | |
| name = Field() | |
| age = Field() | |
| def __repr__(self): | |
| return '========data stored===========' |
| import logging | |
| from selenium.webdriver.remote.remote_connection import LOGGER | |
| LOGGER.setLevel(logging.WARNING) |
| /*If you want line numbers only for code cells, there is a simpler approach. Select a code cell, open the Chrome/Firefox JavaScript console, type the following lines:*/ | |
| ```javascript | |
| var cell = Jupyter.notebook.get_selected_cell(); | |
| var config = cell.config; | |
| var patch = { | |
| CodeCell:{ | |
| cm_config:{lineNumbers:true} | |
| } | |
| } |