Skip to content

Instantly share code, notes, and snippets.

View sunmeat's full-sized avatar
🐈
MEOW

Oleksandr Zahoruiko sunmeat

🐈
MEOW
View GitHub Profile
#define WIN32_LEAN_AND_MEAN
#include <ws2tcpip.h>
#include <windows.h>
#include <iostream>
#include <string>
#include <queue>
#include <map>
#include <chrono>
#include <thread>
#define _WINSOCK_DEPRECATED_NO_WARNINGS
#pragma execution_character_set("utf-8")
#include <ws2tcpip.h>
#include <iostream>
#include <string>
#include <windows.h>
#include <chrono>
#include <vector>
using namespace std;
#define WIN32_LEAN_AND_MEAN
#include <iostream>
#include <string>
#include <windows.h>
#include <ws2tcpip.h>
using namespace std;
#pragma comment (lib, "Ws2_32.lib")
#pragma comment (lib, "Mswsock.lib")
#define WIN32_LEAN_AND_MEAN
#include <iostream>
#include <windows.h>
#include <ws2tcpip.h>
#include <string>
#pragma comment (lib, "Ws2_32.lib")
#define DEFAULT_BUFLEN 512
#define DEFAULT_PORT "27015"
@sunmeat
sunmeat / task.md
Last active April 27, 2026 16:39
ДЗ: знайомство з фреймворком django

Вебдодаток «Інформація про існуючу компанію»

Мета проєкту

Створити простий багатороздільний вебсайт компанії з чіткою структурою URL.

Вимоги до розділів та адрес

Розділ Базова адреса
@sunmeat
sunmeat / different files.py
Created April 21, 2026 09:50
CRUD операції. веб інтерфейс
# app / views.py:
from datetime import datetime
from django.shortcuts import render
from django.http import HttpRequest
from app.models import Author
def home(request):
message = None # повідомлення про успіх/помилку
@sunmeat
sunmeat / main.cpp
Created April 20, 2026 11:36
FTP C++ example MacOS version
#include <iostream>
#include <fstream>
#include <filesystem>
#include <string>
#include <curl/curl.h>
using namespace std;
namespace fs = std::filesystem;
const string ftpHost = "ftp://f33-preview.awardspace.net";
const string ftpUserPwd = "4115733_knd241:*********************"; // замініть на ваш реальний пароль
@sunmeat
sunmeat / main.cpp
Created April 20, 2026 11:28
C++ IMAP example MacOS version
#include <iostream>
#include <fstream>
#include <string>
#include <curl/curl.h>
#include <vector>
#include <sstream>
#include <regex>
using namespace std;
// ====================== ANSI COLORS for macOS / Linux ======================
@sunmeat
sunmeat / main.cpp
Created April 20, 2026 10:30
SmtpClient C++ example MacOS version
// # встановлюємо Homebrew (якщо ще немає)
// /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
// # встановлюємо libcurl (включає заголовки та бібліотеку)
// brew install curl
#include <iostream>
#include <fstream>
#include <sstream>
#include <ctime>
#include <curl/curl.h>
@sunmeat
sunmeat / pq.md
Created April 20, 2026 09:24
python questions

Python

Послідовності

Що таке послідовність

Послідовністю в Python називається ітерований об'єкт, який підтримує ефективний доступ до елементів за допомогою цілочисельних індексів через спеціальний метод __getitem__() та підтримує метод __len__(), що повертає довжину послідовності. До основних вбудованих типів послідовностей належать list, tuple, range, str та bytes.

Послідовності також опціонально можуть реалізовувати методи count(), index(), __contains__() та __reversed__() та інші.