Carriers in numerous countries worldwide have shutdown 2G networks to free spectrum for 4G and 5G services.
Embedded modems such as automotive (OnStar) and alarm systems may again be impacted by these shutdowns.
In developing regions 2G networks may linger for several more years, due to cost-effective legacy devices.
Those designing IoT and other embedded devices with cellular modems should consider LPWA 4G LTE, particularly Cat M1 and NB1 to help ensure global functionality.
Each geopolitical region has unique LTE bands, but often OEM modules with the same pinout have region-specific models.
OEM LTE modules will incorporate at least some bands for each region, so that global LTE roaming for even inexpensive LTE modems will become increasingly common.
A local Git repo can become corrupted in rare circumstances, perhaps doing a git commit just as a computer crashes or loses power.
A common symptom of a corrupted local Git repo is any Git command except for perhaps git diff giving error:
fatal: your current branch appears to be broken
The changes are likely still present, as seen via git diff.
Previous commits that were not pushed to remote are likely present as well in the form of the modified files,
but the historical local Git commit deltas may not be recoverable.
This recovery will in effect “squash” the local commits that weren’t previously pushed to remote.
NOTE: work done on other branches that weren’t pushed to remote may not be retrievable.
Copy the directory tree of the affected local Git repo, preferably on another hard drive or in the cloud.
git clone a fresh copy of the remote Git repo to a new directory
Compare folders to incrementally copy into the new directory the changes from the old corrupted directory.
If there are a large number of changes, consider making the changes via multiple Git commits.
Missing LaTeX fonts can be added via TeXLive or MikTeX.
Using the symbolic fonts is as easy as:
\documentclass[a4paper,12pt]{article}\usepackage{fontawesome5}\begin{document}\faGithub This is a GitHub logo.
\end{document}
This may need to use XeLaTeX.
We use fontawesome5 instead of obsolete fontawesome, which is version 4.
FontAwesome5 is in TeXLive 2018.
TeXLive is popular across operating systems.
Linux users can use system package managers to install groups of TeXLive packages.
Advanced Linux TeXLive users can
independently setup TeXLive
to get the latest packages individually, to save hundreds of megabytes of install space.
The unofficial OpenCV PyPI
wheels
work with pip install methods:
pip install opencv-python
For ARM / Raspberry Pi:
pip install opencv-python
also works for certain ARM platforms like the Raspberry Pi.
OpenCV is trivial and fast to install on a Raspberry Pi via pip as described above.
For the latest extended functionality that hasn’t yet been incorporated into the core package, OpenCV including the
Extra contributed modules
may be obtained by:
(reference) Windows-only OpenCV wheels.
(cpMN where you have Python M.N). contrib includes OpenCV-extra packages.
If ... is not supported on this platform error be sure it’s using desired Python install.
One may have to manually specify the path for the pip command e.g.
We made several test
scripts
to try out the OpenCV install.
Compiling OpenCV yourself allows customizing and optimizing OpenCV for your computer (e.g. using GPU, TBB, OpenCL, etc.).
The conda install opencv and conda install -c conda-forge opencv methods for OpenCV continue to be BROKEN for video/image reading and display.
Use pip install above instead.
If YouTube won’t accept a video upload, or the video never completes “Processing” on YouTube, try re-encoding the video with FFmpeg.
Sometimes lossy conversion is necessary to achieve the YouTube
recommended upload settings.
Periscope video downloads use
MPEG TS container
with .ts file extension.
These .ts files can be played back in VLC or similar to confirm content.
A lossless conversion to YouTube is possible with:
Generating a range of datetime data is a common data analysis and simulation task.
Here we show examples of generating datetime vectors for Python datetime and numpy.datetime64
Python
datetime
is often used as
timezone-naïve
with UTC as the assumed timezone.
This custom
avoids ambiguities
when working with Pandas and Numpy, which are foundational for Python data science.
Generate a range of Python datetime like:
from__future__import annotation
fromdatetimeimport datetime, timedelta
defdatetime_range(start: datetime, end: datetime, step: timedelta) -> list[datetime]:
"""like range() for datetime"""return [start + i * step for i inrange((end - start) // step)]
dt = datetime_range(datetime(2019, 12, 1), datetime(2020, 4, 1), timedelta(days=1))
Matlab
datetime
works much like Python datetime, and is generally recommended.
Matlab plotting functions generally support “datetime” class.
It is sometimes necessary to manipulate Matlab plots involving datetime for the desired result.
After updating an operating system graphics driver while Matlab was open,
an error may occur upon plotting in Matlab like:
MATLAB has experienced a low-level graphics error, and may not have drawn correctly.
Read about what you can do to prevent this issue at Resolving Low-Level Graphics Issues then restart MATLAB.
The solution to this issue typically is, as the message suggests, just restarting Matlab.
A full reboot is not always necessary, but try that if the error persists.
Skipping a test with Meson or CMake by returning error code 77 is a de facto practice.
Sometimes it is only feasible to know a test should be skipped by attempting to run that test.
The
vcgencmd
utility allows reading a few dozen hardware measurements on the Raspberry Pi boards.
CPU Temperature is checked by:
vcgencmd measure_temp
Typical temperatures in office environment, with case:
Pi Model
heatsink
usage
temp [C]
2B
yes
light-moderate
40..45
4B
no
light-moderate
65..70
4B
no
YouTube 720p60
85
A red thermometer icon GPU-superimposed on the Raspberry Pi display output means the Raspberry Pi is overheating and is throttling the CPU and GPU to avoid self-destruction.
Raspberry Pi 0, 1, 2, 3 temperature thresholds:
CPU temp. [C]
icon
throttle
< 80
none
none
80 - 85
CPU
> 85
CPU & GPU
Raspberry Pi 4 temperature thresholds:
CPU temp. [C]
icon
throttle
80 - 85
none
CPU: 1000 MHz
85 - 90
CPU
> 90
CPU & GPU
The current Raspberry Pi CPU clock speed is obtained from
vcgencmd measure_clock arm
The output is in units of Hertz.
The Raspberry Pi CPU clock speed and
power consumption
is dynamic:
clock speed [MHz]
Raspi 2
Raspi 3
Raspi 3+
Raspi 4
idle
600
600
600
600
100% one or more cores
900
1200
1400
1500
Log temperature measurements with crontab -e.
This can periodically log temperature and CPU frequency, e.g. add a line like:
@hourly vcgencmd measure_temp | /usr/bin/logger
logger
writes the measured parameters into the system log.