Install convmv if you don't have it
sudo apt-get install convmv
Convert all files in a directory from NFD to NFC:
convmv -r -f utf8 -t utf8 --nfc --notest .
#!/usr/bin/env python3 | |
# apt-get install -y python3-venv python3-pandas python3-humanfriendly | |
# python3 -venv --system-site-packages --symlinks .venv | |
# .venv/bin/pip install git+https://github.com/wookayin/python-imgcat | |
from pathlib import Path | |
import humanfriendly as hf |
#!/usr/bin/env bash | |
# https://en.wikipedia.org/wiki/ANSI_escape_code | |
print_colors() | |
{ | |
# Print column headers. | |
printf "%-4s " '' ${bgs[@]} | |
echo |
#!/usr/bin/env python3 | |
from curses import wrapper | |
from math import pi, sin, cos | |
def bresenham(x0, y0, x1, y1): | |
""" | |
Bresenham's line algorithm. | |
Yield integer coordinates on the line from (x0, y0) to (x1, y1). |
#!/usr/bin/env python3 | |
""" | |
Read terminal properties and imgcat in Python. | |
References: | |
https://en.wikipedia.org/wiki/ANSI_escape_code | |
https://iterm2.com/documentation-escape-codes.html | |
https://iterm2.com/documentation-images.html | |
""" |
#!/usr/bin/env python3 | |
# Chromium-like browsers cache viewer (Linux, macOS) | |
import argparse | |
import binascii | |
import struct | |
from datetime import datetime | |
from pathlib import Path | |
import traceback |
Install convmv if you don't have it
sudo apt-get install convmv
Convert all files in a directory from NFD to NFC:
convmv -r -f utf8 -t utf8 --nfc --notest .
#!/usr/bin/env python3 | |
from tkinter import Tk, Canvas, Frame, BOTH | |
from typing import List | |
import random | |
root = Tk() | |
root.geometry("600x600") | |
f = Frame() |
#!/usr/bin/env python3 | |
# The Dog problem | |
# https://en.wikipedia.org/wiki/Pursuit_curve | |
import subprocess | |
from tkinter import Tk, Canvas, Frame, BOTH | |
import numpy as np | |
from PIL import Image | |
from pathlib import Path |
#!/usr/bin/env python3 | |
import numpy as np | |
import matplotlib.pyplot as plt | |
from math import radians, degrees, pi, sin, asin, cos, atan2, sqrt, acos | |
EARTH_RADIUS = 6371 | |
def wingman_coord(latitude, longitude, altitude, heading, wingman_angle, wingman_distance): |