Word wrapping in nano text editor can make scripts and files fail to run/parse properly.
A simple edit can goof up a config or script by adding unwanted newlines.
These settings are in general good for nano on any operating system.
Disable text wrap in nano by adding to ~/.nanorc
set nowrap
A suggested ~/.nanorc contains the following for good defaults including Python coding:
set constantshow
set tabsize 4set nowrap
set tabstospaces
constantshow: show line and column of cursor position (on old nano version as in Red Hat 7, this option may not be recognized)
tabsize 4, tabstospaces: make tabs into 4 spaces
nowrap: disable long-line text wrapping
Nano syntax highlighting is enabled with
include statements
in ~/.nanorc.
WINE creates serial port
softlinks(
automatically.
Serial port mapping is managed via
WINEPREFIX=~/.wine wine regedit
Be sure to include the WINEPREFIX (default is ~/.wine)
Which WINE serial port to use: find the WINE serial port corresponding to the Linux serial port device name by watch log output from:
dmesg -w
when plugging in the serial ↔ USB adapter.
Using WINEPREFIX, start the WINE registry editor:
WINEPREFIX=~/.wine wine regedit
Configure the port–if the device is seen at /dev/ttyUSB0, and you want it to appear to WINE on COM1, edit HKEY_LOCAL_MACHINE\Software\Wine\Ports to have a new string entry named COM1 with value/dev/ttyUSB0.
Verify this setting (but do not edit) by:
ls ~/.wine/dosdevices
where again ~/.wine is the location of your WINEPREFIX.
These programs use syntax similar to the $1000 Matlab Mapping and Aerospace Toolboxes, while being independently developed as open-source software.
We use continuous integration on each package to help ensure quality results.
Instead of low-quality screen-shots a PDF to get the images, use Poppler to extract the original high-resolution images from the PDF.
Note: only raster images can be exported with Poppler.
Examples of PDF image extraction tasks:
List all PDF images:
pdfimages -list in.pdf
Extract PDF images from all pages, dumping all images in mydoc.pdf to the same directory.
Filenames start with out-.
There might be a lot of images.
pdfimages -all in.pdf out
Extract PDF images from specific pages: example is for page 3 only:
We have created Python scripts in
LibreOffice Utils
that recursively search for files matching a glob pattern (such as *.docx) and convert or print these input documents.
They use LibreOffice in headless (console) mode, just a single Terminal command.
doc2pdf.py: recursively converts directories containing DOC, DOCX, RTF or other word processing files to PDF.
doc2print.py: recursively print documents to the default printer
Python code using xarray.open_dataset() or xarray.open_dataarray() or similar functions reading from NetCDF4 use an
LRU cache
that automatically closes unneeded files.
As of xarray 0.11.0, the obsolete autoclose=True option should no longer be used.
Problems fixed by LRU cache: the LRU cache used to open NetCDF4 files with xarray fixes these problems, and gives high performance:
random segmentation fault while reading NetCDF4 .nc files, where the same file is reopened in the program.
OSError from too many open files, where even increasing ulimit doesn’t help