20 June 2026
Hey everyone! I've been learning Python for 3 months now and just finished my first real project - a mood tracker that saves entries to a file with automatic dates.
It's simple, but I'm proud of it. Any feedback or suggestions for improvement would be appreciated! 🙏
from datetime import datetime
try:
with open("mood.txt", "r", encoding="utf-8") as file:
for line in file:
line = line.strip()
if line:
history.append(line)
except FileNotFoundError:
pass
while True:
print("1. Add mood entry")
print("2. Show all entries")
print("3. Exit")
choice = input("Choose action: ")
match choice:
case "1":
mood = input("How are you feeling today? ")
today = datetime.now().strftime("%Y-%m-%d")
history.append(f"{today}: {mood}")
print("Entry added!")
case "2":
if history:
for record in history:
print(record)
else:
print("History is empty")
case "3":
with open("mood.txt", "w", encoding="utf-8") as file:
for record in history:
file.write(record + "\n")
print("Goodbye!")
break
case _:
print("Invalid choice. Please enter 1, 2, or 3.")
Asad.Hey everyone! I've been learning Python for 3 months now and just finished my first real project - a mood tracker that saves entries to a file with automatic dates.
It's simple, but I'm proud of it. Any feedback or suggestions for improvement would be appreciated! 🙏
from datetime import datetime
Damn
import can
from datetime import datetime
def sniff_can() -> None:
try:
bus = can.Bus(
interface="socketcan",
channel="can0"
)
print("Listening for CAN messages. Press Ctrl+C to stop.\n")
while True:
message = bus.recv(timeout=1.0)
if message is None:
continue
timestamp = datetime.now().strftime("%H:%M:%S.%f")[:-3]
can_id = f"{message.arbitration_id:08X}"
data = " ".join(f"{byte:02X}" for byte in message.data)
print(
f"{timestamp} | "
f"ID: {can_id} | "
f"DLC: {message.dlc} | "
f"DATA: {data}"
)
except KeyboardInterrupt:
print("\nCAN sniffing stopped.")
except can.CanError as error:
print(f"CAN error: {error}")
finally:
if "bus" in locals():
bus.shutdown()
if name == "main":
sniff_can()
id 8659840034Yall must be smart
Well, I believe that you have to be at some level of intelligence to do what these guys are doing but it is not really far off.
It's a matter of wanting and taking the steps towards it.
I began my journey a few months ago, and I am telling you that you also can.
D!e trying brother 💯
Koshin Cabdullahi CaliWell, I believe that you have to be at some level of intelligence to do what these guys are doing but it is not really far off.
It's a matter of wanting and taking the steps towards it.
I began my journey a few months ago, and I am telling you that you also can.
D!e trying brother 💯
Exactly
D!e trying
id 8659840034Either you succeed or d!e trying
But by saying these people are so smart to do these things, you undervalue thier hardwork and dedication.
Koshin Cabdullahi CaliWell, I believe that you have to be at some level of intelligence to do what these guys are doing but it is not really far off.
It's a matter of wanting and taking the steps towards it.
I began my journey a few months ago, and I am telling you that you also can.
D!e trying brother 💯
Absolutely, AI tools can be game-changers for research, especially for a creative mind like yours—gotta love the combo of tech and art!
AlmogAbsolutely, AI tools can be game-changers for research, especially for a creative mind like yours—gotta love the combo of tech and art!
I am trying to minimize AI tho.
The only way I'd use it, is if it's my last resort.
21 June 2026