We don’t use favicon.ico because the .ico format is uncompressed ~ 16 kB.
Instead we suggest creating a compressed favicon that works in place of favicon.ico for all web browsers we tried.
These files are typically 1..2 kB instead of 16 kB, which is significant for a text-based website.
favicon.png
favicon-16x16.png
favicon-32x32.png
Then we create an
empty file
favicon.ico that web browsers will ignore, and use the PNG instead.
Bots scan a set of URLs that can clutter the site 404 log.
One can simply ignore these items, apply redirects, return HTTP codes, or
create empty files.
Creating a lot of empty files can be a bit awkward.
Redirection is a server / service specific configuration that can possibly return HTTP error codes.
We choose to
redirect
bots to an empty file.
Pytest
allows clean handling of numerous continuous integration challenges.
Many programs use advanced plotting that may not be desired to test on continuous integration.
For example, one might opt not to install matplotlib as part of CI runs.
We put plotting routines in a separate file to facilitate this, allowing the core module functions to have a bare minimum set of prereqs.
This is useful for HPC, CI and cloud scenarios that either may not plot locally or that may use varied plotting systems depending on whether running on web or local PC.
pytest.importorskip()
is a vital tool to handle to cleanly and clearly handle these scenarios.
Skipping function imports is demonstrated in this example.
Suppose optional module mymod.adv() requires scikit-image, which itself has a lot of prereqs.
One might opt to have CI not install scikit-image, and then use pytest.importorskip() to cleanly skip complicated, optional tests on CI, HPC etc.
Skipping module imports is demonstrated in this example.
Suppose “test_plots.py” has every function requiring Matplotlib.
The whole file may be skipped instead of skipping each function like:
importpytesttry:
importmatplotlibexceptImportError:
pytest.skip("Matplotlib not available", allow_module_level=True)
def ...
Conditional skipping can handle more complicated cases by making a decorator with
pytest.skipif.
importpytestimportos@pytest.mark.skipif(os.name=='nt', reason='only for Unix-like systems')
deftest_unix():
...
If you have more than one function to skip with the same test skip condition, make your own decorator:
Google via the OSSF
introduced
a
Python API
to compute
Criticality Score
of open-source projects.
While there will continue to debate about how exactly to clip and weight parameters, being able to reduce metrics to a single number gives the community a quick first pass to judge which projects need help.
Like
h-index
for academic bibliographies, Criticality tells only part of the picture.
What about the score of fundamental libraries that have a large number of unhandled pull requests and infrequent updates.
Intel vPro AMT is not for directly internet-connected remote PCs.
The operating system firewall does not protect vPro ports, which exist outside the operating system.
Be sure the PC is behind an external firewall.
Exercise great care if making these changes on an already remote PC, as a wrong checkbox hit can necessitate a physical field trip to the PC to correct.
An open-source connection via MeshCommander helps keep Intel AMT robust long-term.
Intel MeshCommander replaces Intel Open Manageability Toolkit.
On local laptop Download and install the free, open-source
Intel Mesh Commander.
Open the “Manageability Commander Tool” and click File → Add → Add Intel AMT computer and type the IP address and vPro username (typically “admin”) and password. Set the password in the remote PC BIOS if you haven’t already.
Click the little plus sign by Network and click on your AMT PC’s name–then in the Connection tab, click Connect. This will take about 5-10 seconds to connect–if Unsuccessful, the button will fall back to saying Connect. If successful, the button will change to say Disconnect.
Go to the Remote Control tab and wait about 10 seconds for the “remote desktop” items to change from “unknown” to the actual state. If Remote Desktop Settings is “Disabled”, click the little box to its right to open a new window.
Click OK and then go back to the Connection tab and click Disconnect. Don’t mess around with any of the other settings unless you know exactly what you’re doing and are willing to drive out to the remote PC to fix it if you mess something up! Close the MeshCommander program.
The
factory Windows OpenSSH server
is robust for secure SSH port forwarding.
Consider SSH ED25519 public key authentication as it is vastly more secure than keyboard passwords.
MSYS2 is useful for end user and developer laptops as well as CI.
Using MSYS2 with Python on GitHub Actions CI requires adding MSYS2 to PATH just like the laptop.
One factor is that MSYS2 is installed to a temporary directory.
Here is an example YaML workflow using MSYS2 with Python.
Note we don’t use MSYS2 Python packages because they tend to be older versions than might be needed.
The packages installed below aren’t specifically needed, it’s just an example of real-life use where I often use Ninja, Gfortran, HDF5, and CMake.
This is a “build on run” package where the “pytest” command ultimately invokes CMake.
We use
GitHub Actions timeout
parameters to avoid accidentally trying to build pip packages from source.
Some older Python projects may have
typing
as a package prerequisite.
This can break Python itself from running.
The “typing” PyPI module is not needed as all currently maintained Python versions have “typing” built in.
Errors can result from having PyPI “typing” installed over factory Python “typing”.
Older hardware, particularly those with spinning hard drives, benefit from disabling unused services just as with any operating system.
On older Macs, Siri can be so slow as to be not that usable anyway.
This change is persistent even after rebooting.
click Apple icon in upper left system menu bar and select System Preferences → Siri
clear the “Enable Ask Siri” checkbox. The Siri icon also disappears from the top right system menu bar.
Developer computer purchases today should have at least a 512 GB hard drive (solid state drive) and preferably 1 TB or larger.
Less than 256 GB hard drive may not be usable for today’s developers.
Particularly for macOS and Windows, where Xcode or Visual Studio respectively take about 50 GB of storage, and other developer libraries and toolchains can easily take another 50-100 GB, this leaves even a 256 GB system drive nearly unusably full.
To help future proof and avoid installing and uninstalling and moving around files, just get a 1 TB or larger PC if a computer is intended for software development.
Computer OEMs make larger storage computers non-linearly increase in price perhaps as a bit of a developer / creator tax.
The workaround for this is to get a computer that has replaceable hard drive, but there’s time and risk involved in swapping hard drives as well, as well as typically larger laptop size.