add enrollment diagrams
This commit is contained in:
@@ -1,8 +1,5 @@
|
||||
from dataclasses import dataclass
|
||||
from uuid import UUID, uuid4
|
||||
|
||||
import numpy as np
|
||||
|
||||
from src.customer_cipher import CustomerCipher
|
||||
from src.models import NKodePolicy
|
||||
from src.user import User
|
||||
|
||||
@@ -28,3 +28,7 @@ def keypad_md_table(keypad_list: np.ndarray, keypad_size: KeypadSize) -> str:
|
||||
table += "|".join([str(prop) for prop in keypad[key]])
|
||||
table += "|"
|
||||
return table
|
||||
|
||||
def select_keys_with_passcode_values(user_passcode_idxs: list[int], keypad: np.ndarray, props_per_key: int) -> list[int]:
|
||||
indices = [np.where(keypad == prop)[0][0] for prop in user_passcode_idxs]
|
||||
return [int(index // props_per_key) for index in indices]
|
||||
|
||||
Reference in New Issue
Block a user