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 credentials | |
| from time import time | |
| import jwt | |
| import requests | |
| class YandexGPT: | |
| def __init__(self, service_account_id, key_id, private_key, folder_id, default_system_msg=None, |
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
| from math import inf | |
| def levit(graph, start): | |
| min_weight = sum(sum(filter(lambda x: x < 0, row)) for row in graph) - 1 | |
| size = len(graph) | |
| m0 = [] # checked | |
| m1 = [start] # queue | |
| m1_urg = [] # urgent queue | |
| m2 = [i for i in range(size)] # unchecked |