โผ Top rated
Coder
Free mode
100% free
Freemium
Free Trial
-
85986164Released 1y ago100% Free**Simple Chat Application using Python** ===================================== Here is a simple code for a chat application using Python: **Server Side (chat_server.py)** ```python import socket import threading HOST = '127.0.0.1' PORT = 9090 server = socket.socket(socket.AF_INET, socket.SOCK_STREAM) server.bind((HOST, PORT)) server.listen() clients = [] nicknames = [] def broadcast(message): for client in clients: client.send(message) def handle(client): while True: try: message = client.recv(1024) broadcast(message) except: index = clients.index(client) clients.remove(client) client.close() nickname = nicknames[index] broadcast(f'{nickname} left the chat!'.encode('ascii')) nicknames.remove(nickname) break def receive(): while True: client, address = server.accept() print(f"Connected with {str(address)}") client.send('NICK'.encode('ascii')) nickname = client.recv(1024).decode('ascii') nicknames.append(nickname) clients.append(client) print(f'Nickname of the client is {nickname}!') broadcast(f'{nickname} joined the chat!'.encode('ascii')) client.send('Connected to the server!'.encode('ascii')) thread = threading.Thread(target=handle, args=(client,)) thread.start() print("Server Started!") receive() ``` **Client Side (chat_client.py)** ```python import socket import threading HOST = '127.0.0.1' PORT = 9090 client = socket.socket(socket.AF_INET, socket.SOCK_STREAM) client.connect((HOST, PORT)) def receive(): while True: try: message = client.recv(1024).decode('ascii') if message == 'NICK': client.send(nickname.encode('ascii')) else: print(message) except: print("An error occurred!") client.close() break def write(): while True: message = f'{nickname}: {input("")}' client.send(message.encode('ascii')) nickname = input("Choose a nickname: ") receive_thread = threading.Thread(target=receive) receive_thread.start() write_thread = threading.Thread(target=write) write_thread.start() ``` **How to use:** 1. Run the `chat_server.py` script in a separate terminal or command prompt. 2. Run multiple instances of the `chat_client.py` script in separate terminals or command prompts. 3. Each client will be prompted to enter a nickname. 4. Clients can send messages to each other by typing and pressing enter. Note: This is a very basic implementation and you may want to add more features such as error handling, encryption, and more.
Featured matches
-
Generate code snippets, functions, and components with AI assistance.Open2878Released 4d agoFree + from $16/moOutreachGlue๐ 18 karmaOct 1, 2025Great tool for helping with coding tasks.
-
Generate tailored cover letters from resume and job description.Open36316Released 1mo agoFree + from $4.99It makes crafting professional, tailored cover letters quick and stress-free, helping you stand out with ease. Highly recommended for everyone!
-
Secuarden is your LLM-powered, context-aware security co-pilot for code reviews.Open4,8199Released 2mo agoFree + from $30
-
AI-powered code reviews that accelerate pull requests and improve code qualityOpen95524Released 1mo agoFree + from $12.50/moI signed up for early access and have been using codoki for a few months now, eventually brought it into my team as well. Great tool, simple to use, not overwhelming and has caught things in a way thats actually digestible
-
13,35512Released 29d agoNo pricing
-
31,95675Released 7mo ago100% FreeReally handy app, lets me control Virtual Studio Code from my phone, send over code or files in seconds, and even use voice commands.
-
30,02546v6.0.15 released 1mo agoFree + from $0.05Test failure can be triggered by: - Text not being found - Image not being found - "Assert" condition not being met (according to AI with 90% confidence)
-
846,722637v1.6 released 18d agoFree + from $12/moReducing manual efforts in first-pass during code-review process helps speed up the "final check" before merging PRs
-
5,50524Released 9mo agoFree + from $19Nice and simple tool. Not all generated images are perfect, but I like that you can simultaneously generate multiple covers in different styles. Every spin, I get at least a couple of beautiful ones.
-
Converts JavaScript code to TypeScript.Open3,58516Released 2y agoNo pricing
Other tools
-
1962547Released 1y ago100% Free
-
4534167Released 9mo ago100% Free
-
3356585Released 1y ago100% Free
-
10,78163Released 1y agoFree + from $0.01
- Sponsor:Rocket.new Vibe Coding
-
36499102Released 9mo ago100% Free
-
Open2701535Released 10mo ago100% Free
-
2,14524Released 1y agoFree + from $4.99/moI need to create a relationship between the Excel that contains the phone numbers in column A for the people to whom I want to send their performance sheet via WhatsApp every month with the click of a button automatically and without any intervention from me, knowing that the performance sheet is an image in column C and each person has his own sheet where the only link between the performance sheet and the phone number is their personal names
-
1,30028Released 1y agoFree + from $7.50/mo
-
2834471Released 10mo ago100% Free
-
4174647Released 8mo ago100% Free
-
2975273Released 11mo ago100% Free
-
AI-powered JavaScript for sleek signup forms.Open3394173Released 1y ago100% Free
- Didn't find the AI you were looking for?
-
1,12029Released 1y ago100% Free
-
76712Released 1y agoFree + from $20/mo
-
712824Released 2mo ago100% FreeNot the best tool out there, but the generated images were interesting and good enough for sketching a first idea for how you want your future book cover to look like
-
1462326Released 8mo ago100% Free
-
1513542Released 1y ago100% Free
-
10,14570Released 1y ago#31 in TrendingHelps a lot and saves us time with PR review - great cozy tool!
-
3567Released 4mo agoFree + from $3.89
-
1741Released 10mo agoFrom $9/mo
-
951230Released 11mo ago100% Free
-
Transform patient data into precise medical codes instantly.Open1303230Released 11mo ago100% Free
-
1831928Released 1y ago100% Free
-
2801Released 1y agoNo pricing
Post