Switch between compilers e.g. g++-7 and g++-8 with simple commands.
Note: We suggest NOT using sudo, but rather to make the links under ~/.local/bin, which should already be in your PATH (or start using it as in step 1).
(one-time) Setup shell to use ~/.local/bin instead of system-wide /usr.
This is generally beneficial in any case.
update-alternatives works with virtually any program including
Python.
Compiler version priority order: last number of update-alternatives --install is priority.
The highest priority number is used in “automatic” update-alternatives mode.
Troubleshooting: If accidentally reversed the order of the link and target or if used sudo in /usr/bin then may need to reinstall the compiler.
Like Python, Fortran does not understand tilde ~ in commands like open().
Just like in Python and some Matlab functions, an expanduser() procedure is needed.
We provide this functionality in
fortran-filesystem expanduser().
The shell typically expands ~ itself.
It becomes an issue when reading an absolute path involving ~ from say a config file using Fortran and then trying to open that filename read from the config file.
Numerous Python packages use PyTest extensively.
Upon apt install a package that depends on python-astropy, python-pytest is also installed.
The system version of a package is typically several minor versions behind for stable Linux distros like Ubuntu.
To find which specific package is responsible for a package being installed, use a command like:
Ubuntu Gnome Agent remembers SSH private key passwords until you log out.
If someone knows an Ubuntu user password, they also have access to any SSH private keys loaded since last logon.
This also fixes error upon trying to use ssh or sshfs:
GPSTk Python
examples
require installing GPSTk for Python.
GPSTk is a complicated program that is more difficult to install than typical Python programs.
Having a good website template helps your website performance substantially (> 10%) by speeding up the site and making it more mobile-friendly.
Mobile-friendly websites have been important (including for low-bandwidth users on any device) and feasible since the late 1990s with CSS.
As Google has moved to a
mobile-first web crawler,
the important of being mobile-friendly is of critical importance for virtually all websites.
Using appropriate layout elements in the page help your visitors and search engines understand the content better, boosting engagement rates and SERPP (search engine results page position).
The Wordpress Markdown
syntax reference
applies equally well to Jekyll and other website renderers that accept Markdown input.
Almost 100% of website presenation can be done with Markdown.
Only use HTML directly to draw text arrows ↔, give detailed control of a few percent of images, and highlight text (e.g. red warning text).
Liquid generates almost all figures, table of contents, and image galleries.
HTML5 math character:
Math characters directly in HTML5
Not all of these work in Jekyll Markdown, test them in the local preview first.
The
Benchmarks Game
uses deep expert optimizations to exploit every advantage of each language.
The benchmarks I’ve adapted from the
Julia micro-benchmarks
are done in the way a general scientist or engineer competent in the language, but not an advanced expert in the language would write them.
Emphasis is on keeping the benchmarks written with priority on simplicity and length, where programmer time is far more important than CPU time.
Jules Kouatchou runs
benchmarks on massive clusters
comparing Julia, Python, Fortran, etc.
A prime purpose of these benchmarks is given ease of programming for a canonical task (say Mandelbrot), which languages have distinct runtime performance benefits.
Julia’s growing advantage is the performance of compiled languages with the relative ease of a scripted language.
The majority of analysts scripting in engineering and science are working in Python, with Matlab in second place.
The stable Julia 1.0 release finally brings the promise of API stability that was an adoption blocker in earlier Julia releases.
Julia allows abstract expression of formulas, ideas, and arrays in ways not feasible in other major analysis applications.
This allows advanced analysts unique, performant capabilities with Julia.
Since Julia is readily called from Python, Julia work can be exploited from more popular packages.
Python often is “close enough” in performance to compiled languages like Fortran and C, by virtue of numeric libraries Numpy, Numba and the like.
For particular tasks, Tensorflow, OpenCV, and directly loading Fortran libraries with f2py or ctypes minimizes Python’s performance penalty.
This was not the case when Julia was conceived in 2009 and first released in 2012.
Thanks to Anaconda, Intel MKL and PyCUDA, momentum and performance are solidly behind Python for scientific and engineering computing for the next several years at least.
Cython has Python-like syntax that is compiled to .c code that is much larger than the original Python code and isn’t very readable.
However, substantial speed increases can result.
Don’t convert the entire program to Cython!
Just the slow functions.
PyPy does sophisticated analysis of Python code and can also offer massive speedups, without changes to existing code.
We have created a multi-code language
benchmark suite.
Fortran is comparable to Python with MKL, Matlab, Julia.
With single-precision float, Python Cuda can be 1000+ times faster than Python, Matlab, Julia, and Fortran.
However, the usual “price” of GPUs is the slow I/O.
If large arrays need to be moved constantly on and off the GPU, special strategies may be necessary to get a speed advantage.
For iterative algorithms, it’s worthwhile to use Numba or Cython with Python, to get Fortran-like speeds from Python, comparable with Matlab at the given test.
L3 Harris Geospatial IDL is used mostly by astronomers.
IDL can be replaced by
GDL,
the free open-source IDL-compatible program.
A better choice would be to move from IDL/GDL to Python or Julia in many cases.
Open source codecs are important to everyone as license fees erode the ability to provide free content without some form of subscription or sponsorship, which can lead to filtering of content.
Here are a couple updates for the end of 2018.
In the early 2000’s,
Speex
by Xiph.org (now making Opus) was great for dialup modem streaming of voice content.
The Opus codec effectively replaces Speex and the
latest Opus release
further enhances performance.