Latex, pgfplots - x axis labels and multiples of pi for trigonometric functions
How 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, graphs on millimeter paper
In a Latex document, how to create graphs on a millimeter paper ? How to automate millimeter paper backgrounds using Tex macros ?
PNG image files creation from schemas in TeX/LaTex documents
In 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 ?
MathJax, Macros and Packages. Tex simplified commands
CSS, auto numbering elements : headings, lists, pagination
InfluxDB v2, Flux language and SQL databases
Great 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.toUse cases and specific considerations about data types conversions.
InfluxDB - Flux language, advanced features
The 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 v2 : Flux language, quick reference guide and cheat sheet
InfluxDB v2 Flux language, quick reference guide and cheat sheet. Querying data, filters, windowing, joins, pivots, histograms, map, reduce, SQL data sources…
Ubuntu - Self-signed certificates with its own certification authority
Using 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…).
InfluxDB - Moving from InfluxQL to Flux language
Moving 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 - Migration to version 2
InfluxDB 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.
MySQL 8, cloning instances for replication using CLONE statement
The 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, binary log file position based replication. Getting started, Quick setup
MySQL 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
- read only mode per database, new feature as of MySQL 8.0.22.
Locales on Ubuntu, languages configuration
In 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.
Python - Understanding args, kwargs in functions
Beginning in Python, we encounter code examples with the syntaxes
**kwargsin function arguments. Used to other languages : what’s that ? pointers in Python ?
**kwargsallow multiple arguments and named arguments to be passed to a function. Nothing really rocket science. In this article,
**kwargsexplained through simple examples, and at the same time, a quick word about the unpacking operators * and **.
Python - Practical Handbook, Quick reference guide
A Python cheat sheet on some packages, quick reference guide to be completed over time :
- Handling JSON data
- Programs arguments (argparse)
- INI files (configparser), YAML files (PyYAML)
- HTTP requests (packages requests and httplib2) …
MathJax - Tex : Quick Reference Guide
More efficient than a long tutorial, examples of MathJax / Tex equations in the most common situations.
- Piecewise functions
- Centering equations on the sign =
- Numbering equations, bookmarks and hyperlinks
- And more to come by the time…
Using CSS variables to change a page style without reloading
Find and Grep utilities
The powerful find and grep utilities on Unix/Linux : usage and practical examples. Beyond the basic cases, the examples address more complex needs with sometimes the power of regular expressions. A few examples covered : deleting files based on criteria, computing the size of images in a directory, finding invalid symbolic links. This paper is quite old (first version in 2002) but is enriched by the time with examples of interest to remember.
awk, nawk and gawk utilities - Tutorial
The awk, nawk and gawk (GNU Awk) utilities are very easy to use text file parsers. They handle efficiently text files of data delimited by a character. With an easy syntax to understand, operations for filtering rows, filtering columns, enriching content, converting formats, computing aggregates (averages, sums for example), etc. become child’s play with these utilities. awk, gawk and nawk differ only in a few very advanced features. awk is the utility to use without hesitation to parse very efficiently in seconds complex log files for example. Getting started with the nawk utility through examples, and contrary to common beliefs it is also available on Windows platforms.