This week in tabs

Some interesting data, maths and programming related content I stumbled across recently.

NumPy logo

The NumPy paper! Charles R. Harris et. al. publish a paper about NumPy in Nature. NumPy is the foundation of pretty much every Python data related library and tool so cite liberally link.

Barry Render highlights some of the difficulties suppliers are currently having with PPE inventory Article

Laura Labert discussed a paper she and a student recently published which describes a discrete event simulation approach to planning an election during the current COVID-19 pandemic. Recommendations include more staff and a sperate queue for those deemed high-risk. link.

Python 3.9

Python 3.9 beta is out link. A few of the new features it will bring:

PEP 584: Add Union Operators To dict The | union and update |= operators are now available for dictionaries.

# Union
d3 = d1 | d2

# Update
# becomes
d1 |= d2

PEP 585: Type Hinting Generics In Standard Collections

Standard collection types are now generic allowing them to be used in type hints. This has been possible since 3.7 by importing annotations from future but this update ensures external tools such as Mypy will behave as expected.

from __future__ import annotations

def find(haystack: dict[str, list[int]]) -> int:
	return 0

PEP 593: Flexible function and variable annotations

Annotated type is added to the typing module to allow metadata to be applied to existing types. The example below shows two ints annotated with c information.

UnsignedShort = Annotated[int, struct2.ctype('H')]
SignedChar = Annotated[int, struct2.ctype('b')]

PEP 616: String methods to remove prefixes and suffixes

Two new string methods added:

> "python".removeprefix("py") # "thon"
> "python".removesuffix("on") # "pyth"

PEP 617: New PEG parser for CPython

A behind the scenes change, but I am very interested in parsing techniques so its nice to see Python get this update.

(Side note: this reminded me of the great work Alessandro Warth did on OMeta a few years ago as part of his PhD. It turns out, for me, “a few years ago” now equals 13 :grimacing: )

“The algorithm”

Wired Cover

“Sargent’s videos are intentionally lo-fi affairs. There’s often a slide show that might include images of Copernicus (deluded), astronauts in space (faked), or Antarctica (made off-limits by a cabal of governments to hide Earth’s edge), which appear onscreen as he speaks in a chill, avuncular voice-over …. Crucial to his success, he says, was YouTube’s recommendation system” - Wired

A recent episode of the Not So Standard Deviations discussed how “the algorithm” was the reason for TikToks valuation link.

When discussed in the context of YouTube it is often blamed for the rise of bizarre conspiracy theories such as a belief in flat earth theories, QAnon and the rise of the far right. A recent episode of the real story by the BBC world service went into more detail on the QAnon conspiracy link. The rabbit hole podcast from the New York times was recommended as a more in-depth review of the subject link .

And finally, Wired discusses the issues YouTube have had using AI to moderate content link [via].


  • The ICML (International Conference on Machine Learning) talks are now online link.
  • CPPcon finished recently and its videos are also appearing on its YouTube channel link
  • Markus Loning shows off sktime, a machine learning library for time series, at PyData Fest Amsterdam link
  • All the videos from this years excellent JuliaConf are now also online link.