Google Shared Drive is for groups of people with Gmail addresses (corporate or personal).
Public folder or limited access link-sharing of folders and files in Shared Drives are possible as with personal Google Drive.
Moving files is done in
bundles of files, not by folder.
Google Drive for desktop works for Shared Drives like individual Google Drive for read/write access.
Google Shared Drives and personal Google Drive can be synced with
rclone,
which is especially handy for HPC and cloud computing.
If using Windows Subsystem for Linux, keep the files on the
native Windows filesystem.
Two of the most important aspects of a build system are generation speed and build/rebuild speed.
For non-trivial projects in any compiled language, build speed can be a significant pain point.
Build speed is the time it takes to first build project targets.
Rebuild speed is the time taken on subsequent builds of a target, where most build artifacts can be reused, but the dependencies and sources must be scanned for changes since last build.
Even for medium projects, the seconds lost rebuilding add up lost productivity for developers.
CMake and Meson are among the fastest generators, while SCons and Autotools are among the slowest.
CMake and Meson have full support for Ninja.
Ninja is generally significantly faster than GNU Make, particularly for the case where only a few out of very many files need to be rebuilt.
Meson is a Python program without external dependencies.
It’s easy to run the latest development snapshot or track Git changes as a result.
pip install meson
Since Meson generates Ninja build files, you will need to
download Ninja.
With Meson, the code build process goes like:
meson setup build
meson compile -C build
CMake has existed since the early 2000’s, and has broad usage.
Build a CMake project like:
HTML plotting is important for communicating key data to colleagues, the general public and policymakers.
HTML plots allow easy sharing of interactive data plots to any web browser.
There are numerous HTML plotting methods available from Python.
These methods are completely open source and work in any web browser.
The HTML file can be shared by several means:
Matplotlib
HTMLWriter
can plot animated sequences.
More powerful HTML plotting capability requires
mpld3.
Virtually any Matplotlib plot can be converted to HTML for display in any web browser.
mpld3 uses HTML and
D3.js
to animate the plots.
mpld3.show() converts any Matplotlib plot to HTML and opens the figure in the web browser.
mpld3.save_html(fig,'myfig.html') method saves figures to HTML files for archiving or uploading as an iframe to a website, etc.
D3.js enabled interactive elements are available from the
mpld3 API.
Note the template_type='simple' keyword for .save_html(), which can increase robustness across web browsers.
The open source
Plotly
library can plot completely offline, without Plotly servers.
Plotly can make offline Python plots that work in any web browser.
Plotly offline plots don’t need IPython/Jupyter, although you can certainly use them as well.
Offline plotting is important as it doesn’t rely on external proprietary services that could prevent future users from making plots.
The
Plotly API
is available for Python, R, Matlab, JavaScript, Scala and a growing number of other programming languages.
Plotly examples
show the simple syntax.
When using plain Python, be sure to use plotly.offline.plot() as plotly.offline.iplot (iplot) will silently fail to do anything!
MyPy
supports
PEP 585 and 604, bringing concise Python 3.10 type annotation syntax to earlier Python versions.
The new type annotation syntax works all supported Python versions, if each file using them has at the top:
from__future__import annotations
Separately,
Numpy 1.20
made the long-awaited Numpy type hinting a reality.
The
benefits
of Python static type checking and
examples
have been discussed at length and widely adopted and funded by major tech companies, especially Dropbox.
Python static type checking enhances code quality now and in the future by defining (constraining) variables and functions (methods).
Type enforcement can be done with assert.
Type hinting is more concise, flexible and readable than assert, with significantly less performance impact.
Type hinting is being continually enhanced in CPython, numerous IDEs and type annotation checkers.
With type hinting, the hint is right at the variable name (e.g. in the function declaration), while assert must occur in the code body.
MyPy is installed and upgraded by:
pip install -U mypy
MyPy static type checker considers the following to be interchangeable (valid) due to
duck typing:
assuming Python package files are under “src/”
Then issue command:
python -m mypy
Note this command checks the package and not the top-level scripts, which must be manually specified.
Configure pyproject.toml
to eliminate nuisance errors or otherwise configure mypy.
It takes a little practice to understand the messages.
Where multiple types are accepted, for example, str and pathlib.Path use typing.Union.
See the examples below.
Unison file synchronizer works like a mashup of Dropbox, rsync and Git, although internally working via its own means.
Unison attempts to remotely sync changes in files between a local and (typically) remote location.
We have used Unison to manage systems on isolated remote networks.
That is, where the remote network is isolated from directly accessing the Internet and so Dropbox etc. aren’t available.
Assuming one trusts Unison, this could be useful for cases where it is desirable to keep files out of the “cloud”.
Unison file synchronizer has executable
downloads
for popular operating systems.
Red Hat is a common Linux distro used for HPC and other high reliability computing environments.
Miniconda
Python works well on Red Hat and many other Linux distros as well as macOS and Windows.
Thanks to
.whl binary wheel
packaging, many packages such as Numpy can be quickly installed via pip without compilation whether using system Python or Miniconda.
Miniconda Python install does not require “sudo”.
Using
EPEL
or
IUS,
requires “sudo”.
One may also load Python 3 with
modules,
commonly used on HPC.
Google’s Search Console is useful for uncovering lagging performance in web pages, including for blogs.
I tend to write terse posts that address very specific issues.
Often, these pages perform well, but I saw a few percent of pages being marked in Search Console as status “crawled - currently not indexed”.
The underlying theme on these pages was they had too little ordinary paragraph text.
If there are too many lists, headers, or preformatted text relative to plain paragraphs, this “not indexed” status is likely to be applied.
A few of these type of pages also suffered from “soft 404” status.
I found these were very short pages that contained text with “error” or “missing”.
I reworded those articles to avoid those terms.
I made sure the titles didn’t include those terms.
I also ensured there were not too many header tags relative to the text–perhaps one header at most per “page” of text.
The fix to these issues is generally to include more meaningful text–be sure an article is at least one or two full paragraphs.
Add context that would help a more novice user understand why you applied that solution or approach.
Avoid sensational or colloquial text as the search engines are smart enough to recognize this as low quality writing.
As always, maintaining good spelling and adequate grammar help the search engine better appraise the quality of your content.
Also consider short (less than 50 character) but meaningful page titles.
For long-lived blogs such as this one, there is inevitably content that is no longer relevant to anyone except for historical purposes.
You may not want to simply delete these posts that you took time to research and share, but realize these old posts are costing your current performance by wasting crawler budget.
The approach I take is to mark these old pages with “noindex” metadata.
That allows reminiscing about old technology such as Blackberry OS 10 without degrading the performance of currently relevant content.
I think of it as a soft deprecation of the content.