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 matplotlib.pyplot as plt | |
from matplotlib import font_manager, rcParams | |
import numpy as np | |
def create_diagram(nicknames, values, parametr): | |
# если шрифт установлен в системе: | |
rcParams['font.family'] = 'Cascadia Code' | |
# если не распознан - указать путь к .ttf: |
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 sentence_transformers import SentenceTransformer | |
import numpy as np | |
import requests | |
import re | |
API = "700454f4-8038-4e29-b064-b7e39d0779fe" | |
model = SentenceTransformer("BAAI/bge-reranker-v2-m3") | |
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 sentence_transformers import SentenceTransformer | |
import numpy as np | |
import requests | |
import re | |
API = "700454f4-8038-4e29-b064-b7e39d0779fe" | |
model = SentenceTransformer("sentence-transformers/paraphrase-mpnet-base-v2") | |
queries = { | |
"max": [ |
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 sentence_transformers import SentenceTransformer | |
import numpy as np | |
import requests | |
import re | |
API = "700454f4-8038-4e29-b064-b7e39d0779fe" | |
model = SentenceTransformer("sentence-transformers/paraphrase-mpnet-base-v2") | |
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 pygame | |
pygame.init() | |
WIDTH, HEIGHT = 900, 600 | |
screen = pygame.display.set_mode((WIDTH, HEIGHT)) | |
# картинки | |
player_img = pygame.image.load("player.png").convert_alpha() | |
tiles = [pygame.image.load(f"tile{i}.png").convert_alpha() |