Skip to content

Instantly share code, notes, and snippets.


Yousef Azizi yousefazizi1982

View GitHub Profile
yousefazizi1982 /
Created March 25, 2023 19:16 — forked from schedutron/
GUI client script for my chat app
#!/usr/bin/env python3
"""Script for Tkinter GUI chat client."""
from socket import AF_INET, socket, SOCK_STREAM
from threading import Thread
import tkinter
def receive():
"""Handles receiving of messages."""
while True:
yousefazizi1982 /
Created March 24, 2022 00:04 — forked from dmmeteo/
SOLID Principles explained in Python with examples.
Single Responsibility Principle
“…You had one job” — Loki to Skurge in Thor: Ragnarok
A class should have only one job.
If a class has more than one responsibility, it becomes coupled.
A change to one responsibility results to modification of the other responsibility.
class Animal:
def __init__(self, name: str):