localectl list-keymaps
loadkeys fr
# setfont ter-132b
kdbrate -d 500 -r 10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import folium | |
import s2geometry as s2 | |
from folium.plugins import Draw | |
def get_grid_coords(min_lat, max_lat, min_lng, max_lng, level, max_cells=0): | |
"""Generate S2 cells covering a specified region at a given level.""" | |
region = s2.S2LatLngRect( | |
s2.S2LatLng.FromDegrees(min_lat, min_lng), | |
s2.S2LatLng.FromDegrees(max_lat, max_lng) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import folium | |
from pathlib import Path | |
from folium.plugins import Draw | |
def display_geometries(list_geometries:list, output_filepath:Path, inverse_lat_lon:bool=True): | |
""" | |
Save the geometries on a map on a html page with an Earth background. | |
Args: | |
list_geometries (list[dict]): List of geometry dicts to plot. | |
output_filepath (Path): Path to save the output html file. |
# IDE
# .vscode/ # commented to share info with others
# MacOS
*.DS_Store
# Virtual env
.venv/
venv/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import psycopg2 # pip install psycopg2-binary | |
from typing import Optional | |
class InterfaceSQL: | |
def __init__(self, database:str, host:str, port:str, user:str, password:str): | |
conn = psycopg2.connect( | |
database=database, | |
host=host, |
NewerOlder