This file contains 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
from collections.abc import Awaitable, Callable | |
from typing import TypeVar | |
from bson import ObjectId | |
from strawberry.dataloader import DataLoader | |
T = TypeVar("T") | |
U = TypeVar( | |
"U", str, tuple[str, str] | |
) # the original key type (input), assumed to be a string |
This file contains 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 os | |
import time | |
import requests | |
from playwright.sync_api import sync_playwright, TimeoutError as PlaywrightTimeoutError | |
from tenacity import retry, stop_after_attempt, wait_exponential | |
BASE_URL = "https://rbi.org.in/Scripts/BS_ViewBulletin.aspx" | |
USER_AGENT = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36" |
This file contains 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 base64 | |
from cryptography.hazmat.primitives import serialization | |
from cryptography.hazmat.primitives.asymmetric import ec | |
def generate_webauthn_keys(): | |
# Generate an ECDSA P-256 private key | |
private_key = ec.generate_private_key(ec.SECP256R1()) |