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
"""A collection of graph coloring algorithms | |
The problem of assigning colors to the vertices of a graph such that no two adjacent vertices have the same color. | |
""" | |
import random | |
import typing | |
from collections import defaultdict | |
import networkx |
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
artifacts | |
bad anatomy | |
bad proportions | |
blurry | |
cloned face | |
cropped | |
deformed | |
dehydrated | |
disfigured | |
duplicate |
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 numpy.typing as np_typing | |
Vector = np_typing.NDArray[np.float64] | |
Matrix = np_typing.NDArray[np.float64] | |
def extrinsics_to_rotmat_and_posvec(E: Matrix) -> tuple[Matrix, Vector]: | |
R = E[:, :3] |
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 numpy.typing as np_typing | |
try: | |
import cv2 as opencv | |
has_opencv = True | |
except ModuleNotFoundError: | |
has_opencv = False | |
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 time | |
import keyboard | |
def get_pressed_keys() -> set[str]: | |
"""It obtains the pressed keyboard keys""" | |
keyboard._listener.start_if_necessary() | |
with keyboard._pressed_events_lock: |
NewerOlder