Donee version

This commit is contained in:
stud203998 2026-05-11 00:36:51 +03:00
parent 41612009a0
commit 34ac803ac4
4 changed files with 10 additions and 6 deletions

View File

@ -1,4 +1,8 @@
import os
import requests
from dotenv import load_dotenv
load_dotenv
TOKEN = "27f359e8d73918297d6276b4a0c11237f38ac71e"
headers = {"Authorization": f"token {TOKEN}"}

View File

@ -3,15 +3,15 @@ import requests
from dotenv import load_dotenv
load_dotenv()
TOKEN = os.getenv("GITEA_WRITE_TOKEN")
TOKEN = os.getenv("GITEA_TOKEN")
headers = {"Authorization": f"token {TOKEN}", "Content-Type": "application/json"}
repo_name = "lab3-test-repo-ivanov" # Замените на свою фамилию
headers = {"Authorization": f"token {TOKEN}"}
repo_name = "lab2-Toporov"
data = {
"name": repo_name,
"description": "Создано через API для лабораторной работы 3",
"private": True
"private": False,
}
response = requests.post("https://git.vyatsu.ru/api/v1/user/repos", headers=headers, json=data)

View File

@ -1,7 +1,7 @@
import socket
client = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
client.sendto(b'hello server', ('127.0.0.1', 10102))
client.sendto(b'hello server', ('127.0.0.1', 10104))
data, _ = client.recvfrom(1024)
print(f"Ответ от сервера: {data.decode()}")
client.close()

View File

@ -1,7 +1,7 @@
import socket
server = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
server.bind(('0.0.0.0', 10102))
server.bind(('0.0.0.0', 10104))
print("UDP сервер запущен")
while True: