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 numpy as np | |
import matplotlib | |
def find_extreme_vertices_of_sampled_quadrilateral(points: np.ndarray) -> np.ndarray: # points.shape: [:, 2] | |
assert points.ndim == 2 and points.shape[-1] == 2 | |
min_x, min_y = min(points[:, 0]), min(points[:, 1]) | |
max_x, max_y = max(points[:, 0]), max(points[:, 1]) | |
is_min_x = np.isclose(points[:, 0], min_x) | |
min_y_at_min_x, max_y_at_min_x = min(points[is_min_x][..., 1]), max(points[is_min_x][..., 1]) |
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
__author__ = "Elad Nachmias" | |
__email__ = "[email protected]" | |
__date__ = "2023-10-19" | |
import copy | |
import dataclasses | |
from typing import Tuple, Optional | |
import numpy as np |
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
__author__ = "Elad Nachmias" | |
__email__ = "[email protected]" | |
__date__ = "2023-10-19" | |
import sys | |
import time | |
import uuid | |
import logging | |
import threading | |
import traceback |
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
__author__ = "Elad Nachmias" | |
__email__ = "[email protected]" | |
__date__ = "2023-10-19" | |
import time | |
from typing import Generic, List, Optional, TypeVar | |
import asyncio | |
import threading | |
import ray |
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
__author__ = "Elad Nachmias" | |
__email__ = "[email protected]" | |
__date__ = "2023-10-19" | |
import threading | |
import queue | |
import time | |
import lzma | |
import pickle | |
from concurrent.futures import CancelledError |
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
__author__ = "Elad Nachmias" | |
__email__ = "[email protected]" | |
__date__ = "2023-10-18" | |
import multiprocessing | |
import os | |
import signal | |
import time | |
import psutil | |
import warnings |
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
__author__ = "Elad Nachmias" | |
__email__ = "[email protected]" | |
__date__ = "2023-10-18" | |
from typing import Dict, Any | |
def access_nested_dict_by_dot_key( | |
dct: Dict, key: str, create_missing: bool = False, replace_nones: bool = False) -> Any: | |
""" |
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
__author__ = "Elad Nachmias" | |
__email__ = "[email protected]" | |
__date__ = "2023-10-18" | |
import copy | |
from typing import Any, Tuple | |
import dataclasses | |
import numpy as np |
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
__author__ = "Elad Nachmias" | |
__email__ = "[email protected]" | |
__date__ = "2023-10-18" | |
import dataclasses | |
import itertools | |
import sys | |
import traceback | |
import linecache | |
from traceback import StackSummary, walk_tb, FrameSummary |
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
__author__ = "Elad Nachmias" | |
__email__ = "[email protected]" | |
__date__ = "2023-10-18" | |
from operator import lt | |
from dataclasses import dataclass | |
from typing import TypeVar, MutableMapping, Generic, List, Dict, Iterable, Tuple, Any, Callable, Optional, Collection | |
# Note: The key & value are kept as generic types. |
NewerOlder