Tips and Traps¶
The command-line tool of some (e.g., network) applications might be slow to authenticate. If you use pexect to automate such a command-line tool, it is best to wait for sometime after sending password using
child.sendline(passwd)
. If the authentication has ouput on both success and failure, a smart way is to wait for the success or failure message to come out.
IPython Is the Best Shell
IPython is the Best Shell!
-
Use IPython as much as possible.
- IPython has virtues of both shell and Python.
- You should avoid using shell scripts for complicate tasks any way.
-
If you do want to use a Unix/Linux shell, I'd suggest you stick to Bash unless Linux distributions start …
Python Alternatives to Shell
Extracting PDF Pages Using the Python Package PyPDF
- The Python package PyPDF can be used to extract pages from a PDF file. The function aiutil.pdf.extract_pages is a wrapper over PyPDF which makes it even easier to extract pages from a PDF file.
- Stirling-PDF is is a robust, locally hosted web-based PDF manipulation tool using Docker.
Read Tensorboard Logs
Using pandas.read_csv¶
This approaches requires you to have a running TensorBoard which is serving the data you want to read.
Check the checkbox "Show data download links". See highlighted in the top-left corner of the screenshot below for an example.
Select an experimentation whose you'd like to download. See highlighted in the bottom-right corner of the screenshot for an example.