du -sh ./* | sort -h
-s
Gives only the total of each element-h
Human readable values./*
all element in your current location (you can change that part for a specific locationsort -h
Sort the element by size (bottom = largest)
import geoplot | |
import contextily as cx | |
import geopandas as gpd | |
import matplotlib.pyplot as plt | |
from pathlib import Path | |
from shapely.geometry import shape | |
def display_available_geometries(list_geometries:list[dict], output_filepath:Path): |
import time | |
import torch | |
from torch.utils.data import Dataset, DataLoader | |
from tqdm import tqdm | |
import pandas as pd | |
import matplotlib.pyplot as plt | |
from fourm.data.dummy_dataset import DummyDataset | |
def check_dataloader_speed(dataset:Dataset, |
du -sh ./* | sort -h
-s
Gives only the total of each element-h
Human readable values./*
all element in your current location (you can change that part for a specific locationsort -h
Sort the element by size (bottom = largest)docker run --rm -v "$PWD:/pwd" busybox rm -rf /pwd/<element>
busybox
)/pwd
in the container/pwd/<element>
)--rm
)import logging | |
logger = logging.getLogger(__name__) | |
def extract_json_from_string(text:str) -> dict: | |
"""Convert a text containing a JSON or python dict into a python dict. | |
:param str text: | |
:raises ValueError: If the string does not contains a valid json | |
:return dict: |
alias lps="lps -dF" | |
alias ls="ls --color" | |
alias ll="ls -alFhv --group-directories-first" | |
alias df="df -h" | |
umask 0002 | |
# UV ------------------------------------------------ | |
. "$HOME/.cargo/env" |
Flask
Flask-SocketIO
gunicorn[gevent]
git clone <url>
git config --global user.name "Name"
git config --global user.email [email protected]
import time | |
import ntplib | |
import logging | |
logger = logging.getLogger(__name__) | |
def get_current_utc_time() -> float: | |
logger.debug('Requesting current UTC time') | |
response = ntplib.NTPClient().request('pool.ntp.org') | |
logger.debug(f'UTC time : {response.tx_time} | {time.strftime('%Y-%m-%dT%H-%M-%S',time.gmtime(response.tx_time))}') |