From a905e87dfc13f3146e9f0671bc6ea474b1f3e8bf Mon Sep 17 00:00:00 2001 From: Kaligotla Sri Datta Sai Vithal Date: Sun, 29 Mar 2026 09:41:19 +0530 Subject: [PATCH 1/2] Rename 2022-11-25_NGC 6744: Extragalactic Close-Up.mp3 to 2022-11-25_NGC 6744-Extragalactic Close-Up.mp3 --- ... 2022-11-25_NGC 6744-Extragalactic Close-Up.mp3} | Bin 1 file changed, 0 insertions(+), 0 deletions(-) rename NASA_Image_Extraction/Astro_Images/{2022-11-25_NGC 6744: Extragalactic Close-Up.mp3 => 2022-11-25_NGC 6744-Extragalactic Close-Up.mp3} (100%) diff --git a/NASA_Image_Extraction/Astro_Images/2022-11-25_NGC 6744: Extragalactic Close-Up.mp3 b/NASA_Image_Extraction/Astro_Images/2022-11-25_NGC 6744-Extragalactic Close-Up.mp3 similarity index 100% rename from NASA_Image_Extraction/Astro_Images/2022-11-25_NGC 6744: Extragalactic Close-Up.mp3 rename to NASA_Image_Extraction/Astro_Images/2022-11-25_NGC 6744-Extragalactic Close-Up.mp3 From b3920ba4af15f7d4f83987f459728b12830ca9d6 Mon Sep 17 00:00:00 2001 From: Sridattasai18 Date: Sun, 29 Mar 2026 10:18:36 +0530 Subject: [PATCH 2/2] Add: Pomodoro Timer - CLI productivity timer with customizable sessions --- Pomodoro_Timer/README.md | 57 +++++++++++++++++ Pomodoro_Timer/pomodoro.py | 125 +++++++++++++++++++++++++++++++++++++ 2 files changed, 182 insertions(+) create mode 100644 Pomodoro_Timer/README.md create mode 100644 Pomodoro_Timer/pomodoro.py diff --git a/Pomodoro_Timer/README.md b/Pomodoro_Timer/README.md new file mode 100644 index 00000000..cc5d2b71 --- /dev/null +++ b/Pomodoro_Timer/README.md @@ -0,0 +1,57 @@ +![Star Badge](https://img.shields.io/static/v1?label=%F0%9F%8C%9F&message=If%20Useful&style=style=flat&color=BC4E99) +![Open Source Love](https://badges.frapsoft.com/os/v1/open-source.svg?v=103) + +# Pomodoro Timer + +## 🛠️ Description + +A simple command-line Pomodoro timer to help you stay focused. It follows the Pomodoro Technique — work for 25 minutes, take a 5 minute break, and after every 4 sessions take a longer 15 minute break. All times are customizable. + +## ⚙️ Languages or Frameworks Used + +You only need Python 3 to run this script. No extra libraries needed — it uses only built-in modules (`time`, `os`, `sys`). + +You can visit [here](https://www.python.org/downloads/) to download Python. + +## 🌟 How to run + +Start with default settings (25 min work / 5 min break / 15 min long break / 4 sessions): + +```sh +python pomodoro.py +``` + +Use custom times (all values in minutes): + +```sh +python pomodoro.py 25 5 15 4 +``` + +``` +Arguments: [work_time] [short_break] [long_break] [number_of_sessions] +``` + +Stop anytime with `Ctrl + C`. + +## 📺 Demo + +``` +============================== + POMODORO TIMER +============================== + + Work: 25 min + Short break: 5 min + Long break: 15 min + Sessions: 4 + +Press Enter to start session 1/4... + +Session 1/4 - WORK +============================== + Time left: 24:37 +``` + +## 🤖 Author + +[Kaligotla Sri Datta Sai Vithal](https://github.com/Sridattasai18) diff --git a/Pomodoro_Timer/pomodoro.py b/Pomodoro_Timer/pomodoro.py new file mode 100644 index 00000000..ebdc673c --- /dev/null +++ b/Pomodoro_Timer/pomodoro.py @@ -0,0 +1,125 @@ +import time # for countdown +import sys # for command line arguments +import os # for clearing the screen + +# default timer settings (in minutes) +WORK_TIME = 25 +SHORT_BREAK = 5 +LONG_BREAK = 15 +SESSIONS_BEFORE_LONG_BREAK = 4 + + +def clear_screen(): + """clear the terminal screen""" + # "cls" on windows, "clear" on mac/linux + os.system("cls" if os.name == "nt" else "clear") + + +def format_time(seconds): + """turn seconds into MM:SS format""" + mins = seconds // 60 + secs = seconds % 60 + return str(mins).zfill(2) + ":" + str(secs).zfill(2) + + +def countdown(minutes, label): + """run a countdown timer and show it in the terminal""" + total_seconds = minutes * 60 + + print("\n" + label) + print("=" * 30) + + while total_seconds > 0: + # show the time remaining + print("\r Time left: " + format_time(total_seconds), end="", flush=True) + time.sleep(1) + total_seconds -= 1 + + # timer finished + print("\r Time left: 00:00") + print("\nDone!") + + # make a beep sound to alert the user + # \a is the bell character, works on most terminals + print("\a") + + +def run_pomodoro(work, short_brk, long_brk, total_rounds): + """run the full pomodoro cycle""" + + clear_screen() + print("=" * 30) + print(" POMODORO TIMER") + print("=" * 30) + print("") + print(" Work: " + str(work) + " min") + print(" Short break: " + str(short_brk) + " min") + print(" Long break: " + str(long_brk) + " min") + print(" Sessions: " + str(total_rounds)) + print("") + + session = 1 + + while session <= total_rounds: + # work session + input("Press Enter to start session " + str(session) + "/" + str(total_rounds) + "...") + clear_screen() + countdown(work, "Session " + str(session) + "/" + str(total_rounds) + " - WORK") + + # check if we're done + if session == total_rounds: + break + + # decide which break to take + if session % SESSIONS_BEFORE_LONG_BREAK == 0: + # every 4th session, take a long break + input("\nPress Enter to start long break...") + clear_screen() + countdown(long_brk, "LONG BREAK - relax!") + else: + # normal short break + input("\nPress Enter to start short break...") + clear_screen() + countdown(short_brk, "SHORT BREAK - stretch!") + + session += 1 + + # all sessions done + print("\n" + "=" * 30) + print(" All " + str(total_rounds) + " sessions complete!") + print(" Great work today!") + print("=" * 30) + + +# --- main program starts here --- + +if __name__ == "__main__": + + # let the user customize times from command line + # usage: python pomodoro.py [work] [short_break] [long_break] [sessions] + if len(sys.argv) > 1 and sys.argv[1] == "--help": + print("Pomodoro Timer") + print("") + print("Usage:") + print(" python pomodoro.py # default (25/5/15, 4 sessions)") + print(" python pomodoro.py 25 5 15 4 # custom times and sessions") + print(" python pomodoro.py [work] [short] [long] [sessions]") + print("") + print("Arguments (all in minutes):") + print(" work - work session length (default: 25)") + print(" short - short break length (default: 5)") + print(" long - long break length (default: 15)") + print(" sessions - number of work sessions (default: 4)") + + else: + # read custom values or use defaults + work = int(sys.argv[1]) if len(sys.argv) > 1 else WORK_TIME + short_brk = int(sys.argv[2]) if len(sys.argv) > 2 else SHORT_BREAK + long_brk = int(sys.argv[3]) if len(sys.argv) > 3 else LONG_BREAK + rounds = int(sys.argv[4]) if len(sys.argv) > 4 else SESSIONS_BEFORE_LONG_BREAK + + try: + run_pomodoro(work, short_brk, long_brk, rounds) + except KeyboardInterrupt: + # user pressed Ctrl+C to stop early + print("\n\nTimer stopped. See you next time!")