Downloads · 30 days
0
aligokcek1/test_folder_files
test_folder_files is a machine learning model from aligokcek1. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
Workshop 3 - 08.03.2026 Ali Gokcek - 2021400012 Tested my program by myself with another MacOS computer. Readme and inline comments were extended and the code got licensed for open-sourcing (will make it public after…
Downloads · 30 days
0
Access
Public
Updated Apr 6, 2026
Repo size
15 MB
Likes
0
Public
Click a slice to open those files.
.pptx12 MB · 80%
From the Hugging Face model README
Workshop 3 - 08.03.2026 Ali Gokcek - 2021400012 Tested my program by myself with another MacOS computer. Readme and inline comments were extended and the code got licensed for open-sourcing (will make it public after the deadline).
P2P chat application over local WiFi using Python. Peer discovery uses UDP broadcast; messages use TCP unicast.
| Type | Transport | Fields | Purpose |
|---|---|---|---|
ASK | UDP broadcast | SENDER_IP | Announce presence to subnet |
REPLY | TCP unicast | RECEIVER_NAME, RECEIVER_IP | Respond to discovery |
MESSAGE | TCP unicast | SENDER_IP, SENDER_NAME, PAYLOAD (max 2 KB) | Send a chat message |
├── config.py # Tunable constants (port, timeouts, intervals, CIDR range)
├── network.py # NetworkManager — UDP broadcast, TCP send/receive, listeners
├── p2p_chat.py # P2PChat — protocol handlers, peer management, CLI (entry point)
└── requirements.txt
ipconfig getifaddr en0 for IP detection)python3 p2p_chat.py
| Command | Description |
|---|---|
/peers | List known peers |
/send <name@ip> <msg> | Send a message to a peer |
/help | Show help |
/quit | Exit |
Your name: alice
Identity : alice@192.168.1.10
Port : 12487
> /peers
- bob@192.168.1.42
> /send bob@192.168.1.42 Hello!
You → bob: Hello!
[-] Peer left: bob@192.168.1.42
> /quit
Constants can be adjusted in config.py:
| Constant | Default | Description |
|---|---|---|
PORT | 12487 | Port used for both UDP broadcast and TCP unicast |
MAX_PAYLOAD_BYTES | 2048 | Maximum message payload size in bytes |
SEND_TIMEOUT_SEC | 3 | TCP connect/send timeout in seconds |
CIDR_RANGE | 24 | Subnet mask used to compute the broadcast address |
BROADCAST_INTERVAL | 10 | Seconds between automatic ASK broadcasts |
PEER_TIMEOUT | 30 | Seconds of silence before a peer is evicted |
REAPER_INTERVAL | 5 | How often the reaper checks for stale peers |
BSD 2-Clause © 2026 Ali Gökçek — see LICENSE for full text.