Announcements

Python, matplotlib. Installation in a virtual environment and X11 forwarding

pythonOn Ubuntu, a Python 3 script running Matplotlib to display a graph with X11 forwarding fails. Matplotlib needs a graphical backend. The Python distribution must be reconfigured in order to be able to use the tkinter module which interacts with the Tcl/Tk graphical features.

Python, matplotlib. Installation in a virtual environment and X11 forwarding

Latex, PgfPlots - Filling areas under and between curves

latexIn some circumstances, areas need to be highlighted. The fillbetween library of the PgfPlots package, very easy to use, fill areas : between 2 curves or between a curve and the horizontal axis. An area can be splitted into segments depending on the intersections of the curves in order to set a different style for each filled area.

Latex, PgfPlots - Filling areas under and between curves

MathJax 3 - Advanced Javascript rendering methods

javascriptHow to render MathJax equations after user input, raw tex code injection or content added dynamically. For more interactive content, 2 functions to know using MathJax 3 : typesetPromise and tex2chtmlPromise.

MathJax 3 - Advanced Javascript rendering methods

Latex, PgfPlots - Curves and polar coordinates

latexFor commodity reasons, curves can be defined using polar coordinates. How to display curves defined in polar coordinates using Latex and PgfPlots package ? Several plotting techniques: with the polar library of PgfPlots in degrees or radians or in a cartesian grid.

Latex, PgfPlots - Curves and polar coordinates

Javascript - Importing HTML blocks, fetch

javascriptFor static HTML blocks (headers, footers…), we search an easy way to import HTML code from files. There was an easy way (<link rel="import" href="footer.html">) BUT this specification has been deprecated. What is the alternative ? Use the javascript fetch method.

Javascript - Importing HTML blocks, fetch

Latex, tkz-tab package. Tables of signs and variations

latexHow to draw beautiful tables of signs and variations for math publications using Latex and the powerful tkz-tab package ? Once we understand the mechanism of the three main macros to know (tkzTabInit, tkzTabLine, tkzTabVar), a table of signs and variations is built in few minutes.

Latex, tkz-tab package. Tables of signs and variations

Latex, pgfplots - x axis labels and multiples of pi for trigonometric functions

latexHow to set x axis labels to multiples of pi, including fractions, for trigonometric functions ? Defining the xtick and xticklabels properties gives the right rendering easily.

Latex, pgfplots - x axis labels and multiples of pi for trigonometric functions

Latex, graphs on millimeter paper

latexIn a Latex document, how to create graphs on a millimeter paper ? How to automate millimeter paper backgrounds using Tex macros ?

Latex, graphs on millimeter paper

PNG image files creation from schemas in TeX/LaTex documents

latexIn scientific publications, sophisticated schemas are created in Latex documents using packages (circuitikz for electric circuits, chemfig for chemical molecules…). How to create png image files from schemas in Latex documents using MiKTeX and TexMaker ?

PNG image files creation from schemas in TeX/LaTex documents

MathJax, Macros and Packages. Tex simplified commands

mathjaxNot used to Latex, using HTML and the MathJax javascript library to publish content containing mathematical expressions, one is quickly faced to heavy and repetitive syntaxes. To automate, standardize and simplify Tex commands, the MathJax javascript library supports Tex macros. Some concrete examples for beginners, beyond the "Hello World" examples to put text in bold.

MathJax, Macros and Packages. Tex simplified commands

CSS, auto numbering elements : headings, lists, pagination

cssAuto numbering headings using Word, OpenOffice… is well known since decades. How to achieve it when publishing HTML pages ? CSS is powerful, CSS can do the job. Always investigate CSS features before starting a development (Javascript…), often CSS is able to cover very easily a need.

CSS, auto numbering elements : headings, lists, pagination

InfluxDB v2, Flux language and SQL databases

influxdbGreat new feature of the InfluxDB v2 time series databases and its Flux language : the gateways to SQL databases engines (PostgreSQL, MySQL, Microsoft SQL Server…). From InfluxDB, to interact with SQL databases, 2 straightforward functions : sql.from and sql.to Use cases and specific considerations about data types conversions.

InfluxDB v2, Flux language and SQL databases

InfluxDB - Flux language, advanced features

influxdbThe new Flux language introduced in InfluxDB v2 addresses many InfluxQL language limitations. Overview of advanced Flux features : joins, pivots, histograms, computed columns (map), custom aggregate functions (reduce). In most topics, real use cases are discussed : joining data when timestamps differ by a few seconds, simulating outer joins waiting for the new join methods to come (left, right…), building histograms without cumulative data but the difference…

InfluxDB - Flux language, advanced features

InfluxDB v2 : Flux language, quick reference guide and cheat sheet

influxdbInfluxDB v2 Flux language, quick reference guide and cheat sheet. Querying data, filters, windowing, joins, pivots, histograms, map, reduce, SQL data sources…

InfluxDB v2 : Flux language, quick reference guide and cheat sheet

Ubuntu - Self-signed certificates with its own certification authority

ubuntuUsing self-signed certificates, without a certificate authority, "x509: certificate signed by unknown authority" errors are raised when using command lines for very specific needs (curl…). For self-signed certificates, it is quite possible to create its own tiny certificate authority (CA) in order to avoid using options which prevent the SSL complete chain check up to the certificate authority (curl --insecure, influx --skip-verify…).

Ubuntu - Self-signed certificates with its own certification authority

InfluxDB - Moving from InfluxQL to Flux language

influxdbMoving from InfluxQL (SQL-Like) to InfluxDB v2 Flux language is confusing at the beginning, but you learn the mechanics very quickly. An overview of the migration of existing InfluxQL queries to Flux (filters, windowing, copying data, etc.).

InfluxDB - Moving from InfluxQL to Flux language

InfluxDB - Migration to version 2

influxdbInfluxDB v2 has been released in November 2020. Upgrading from InfluxDB v1.8 to InfluxDB v2 is quite easy, bear in mind :
  • A database + retention policy is a bucket in version 2.
  • Backward compatibility with 1.x API is guaranteed, but only for authenticated 1.x users.
  • Continuous queries must be migrated to Flux tasks.
  • InfluQL is replaced by Flux language.
  • Native support of OpenTSDB, Graphite… protocols is removed, Telegraf must be implemented.
An overview of the migration before being able to take full advantage of the Flux language features (joins, pivots, SQL packages…)

InfluxDB - Migration to version 2

MySQL 8, cloning instances for replication using CLONE statement

mysqlThe number of manual steps to setup a replication is high, especially when the source server databases snapshot is performed. As of MySQL 8.0.17, the new CLONE plugin simplifies the replica provisioning. Some limitations to notice, otherwise the CLONE plugin is easy to use and cloning operations can even be monitored. Very useful for duplicating environments, not only for replication.

MySQL 8, cloning instances for replication using CLONE statement

MySQL 8, binary log file position based replication. Getting started, Quick setup

mysqlMySQL 8, binary log file position based replication. Getting started, Quick setup. Some MySQL 8 particularities are discussed :
  • terminology is being modified in MySQL products, change impacting mostly replication.
  • side effect on replication of the new caching_sha2_password authentication plugin.
  • read only mode per database, new feature as of MySQL 8.0.22.

MySQL 8, binary log file position based replication. Getting started, Quick setup

Locales on Ubuntu, languages configuration

ubuntuIn most programming languages, it is convenient to use locale settings for displaying numbers, dates… Locale settings avoid developing functions to format data. The major inconvenient : locale settings are OS dependent. If a requested locale is not installed on the OS where the program runs, formatting will fail or will fallback to default settings. A quick overview about locale settings on Ubuntu : installation, temporary or permanent modification.

Locales on Ubuntu, languages configuration