A collection of the most useful Unicode symbols, which are not easily available on common keyboard layouts.
Glyph | Name | USV |
---|---|---|
– | En Dash | U+2013 |
#! /usr/bin/env python3 | |
import argparse | |
import logging | |
import subprocess | |
from pathlib import Path | |
import dbus | |
import requests |
from collections.abc import Callable, Collection, Iterable | |
from enum import Enum | |
from typing import TypeVar | |
class Alignment(Enum): | |
LEFT = "<" | |
CENTER = "^" | |
RIGHT = ">" |
/** | |
* Returns a comparator that compares lists _lexicographically_ using the given [elementComparator]. | |
*/ | |
internal fun <T> lexicographicOrder(elementComparator: Comparator<T>): Comparator<List<T>> = | |
object : Comparator<List<T>> { | |
override fun compare(listA: List<T>, listB: List<T>): Int { | |
val iteratorA = listA.iterator() | |
val iteratorB = listB.iterator() | |
while (iteratorA.hasNext() && iteratorB.hasNext()) { | |
val elementA = iteratorA.next() |
from collections.abc import Iterable | |
from dataclasses import dataclass | |
from enum import Enum | |
from typing import Self | |
_ESC = "\x1b" | |
_CSI = _ESC + "[" | |
def _sgr(codes: Iterable[int]) -> str: |