{"id":26296210,"url":"https://github.com/rohancyberops/calculator","last_synced_at":"2025-03-15T04:17:16.735Z","repository":{"id":275968550,"uuid":"927775577","full_name":"RohanCyberOps/Calculator","owner":"RohanCyberOps","description":"Welcome to the Calculator Project! This interactive calculator app is built using Python.","archived":false,"fork":false,"pushed_at":"2025-02-09T13:34:13.000Z","size":79,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-10T19:51:28.071Z","etag":null,"topics":["calculator","gui","pygame","python","soundeffects","tkinter"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RohanCyberOps.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-05T14:24:55.000Z","updated_at":"2025-02-25T15:51:44.000Z","dependencies_parsed_at":"2025-02-05T15:36:29.300Z","dependency_job_id":null,"html_url":"https://github.com/RohanCyberOps/Calculator","commit_stats":null,"previous_names":["rohancyberops/calculator"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RohanCyberOps%2FCalculator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RohanCyberOps%2FCalculator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RohanCyberOps%2FCalculator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RohanCyberOps%2FCalculator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RohanCyberOps","download_url":"https://codeload.github.com/RohanCyberOps/Calculator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243681043,"owners_count":20330155,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["calculator","gui","pygame","python","soundeffects","tkinter"],"created_at":"2025-03-15T04:17:16.181Z","updated_at":"2025-03-15T04:17:16.719Z","avatar_url":"https://github.com/RohanCyberOps.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n---\n\n# 🎉 **Calculator Project** 🧮\n\n## 🚀 **Overview**\n\nWelcome to the **Calculator Project**! This interactive calculator app is built using **Python**, featuring:\n\n- **GUI** with **Tkinter**.\n- **Sound effects** using **pygame**.\n- **Light and Dark themes** for a better user experience.\n\nThis calculator supports essential arithmetic operations such as **Addition**, **Subtraction**, **Multiplication**, and **Division**.\n\n![Calculator Screenshot](Calc.png)  ![Calculator Screenshot](Light.png)  \n*Above is the Calculator's GUI Interface.*\n\n## 🌟 **Features**\n\n- ➕ **Basic arithmetic operations**: Add, subtract, multiply, and divide.\n- 🖥️ **Interactive GUI** powered by **Tkinter**.\n- 🎶 **Sound effects** for each button click, powered by **pygame**.\n- 🌈 **Light and Dark themes** to switch between a brighter or darker interface.\n\n## 🛠️ **Installation Guide**\n\n### **1. Prerequisites**\n\nMake sure you have **Python 3.x** installed on your system. Download it from the [official Python website](https://www.python.org/downloads/).\n\n### **2. Setup the Project**\n\nClone the repository:\n\n```bash\ngit clone https://github.com/RohanCyberOps/calculator.git\n```\n\nNavigate to the project folder:\n\n```bash\ncd calculator\n```\n\nCreate a virtual environment:\n\n```bash\npython -m venv .venv\n```\n\nActivate the virtual environment:\n- **For Windows**:\n  ```bash\n  .venv\\Scripts\\activate\n  ```\n\nInstall the required dependencies:\n\n```bash\npip install -r requirements.txt\n```\n\n### **3. Dependencies**\n\n- **pygame**: For sound effects.\n- **tkinter**: For the graphical user interface (GUI).\n\n## 🚀 **Running the Calculator**\n\nTo run the calculator, use the following command:\n\n```bash\npython Calc.py\n```\n\nThis will launch the calculator with a simple, user-friendly interface.\n\n---\n\n## 🔊 **Sound Effects**\n\nMake sure you have the **`click.wav`** sound file in the same directory as `Calc.py` for the button click sound to work.\n\n---\n\n## 💡 **Themes**\n\n- 🌞 **Light Theme**: The default theme with bright, easy-to-read colors.\n- 🌚 **Dark Theme**: A more relaxed, dark-themed interface that reduces eye strain in low-light conditions.\n\n### **Switching Themes**\n\nTo toggle between **Light** and **Dark** themes:\n- A button in the UI allows you to switch themes dynamically.\n- The background and button colors will change accordingly to provide a smooth transition.\n\n---\n\n## 📝 **Usage**\n\n- 🔢 Click number buttons to enter digits.\n- ➗ Use operation buttons (`+`, `-`, `*`, `/`) to perform calculations.\n- 🟰 Click the `=` button to get the result.\n- ❌ Click the `C` button to clear the current input.\n- 🔈 Toggle sound effects using the sound icon.\n- 🌞 Switch between **Light** and **Dark** themes using the theme toggle button.\n\n---\n\n## 📄 **License**\n\nThis project is licensed under the **MIT License**. Feel free to use and modify it as you like! Check the [LICENSE](LICENSE) file for more details.\n\n---\n\n### **Example Theme Toggle Code**\n\nHere’s an example of how you can implement the light and dark themes in Tkinter:\n\n```python\nimport tkinter as tk\nfrom tkinter import messagebox\n\n# Function to switch themes\ndef toggle_theme():\n    if root.option_get('theme', 'light') == 'light':\n        root.tk_setPalette(background='#333333', foreground='#FFFFFF')\n        for widget in root.winfo_children():\n            widget.config(bg='#333333', fg='#FFFFFF')\n        root.option_add('*Button.bg', '#555555')\n        root.option_add('*Button.fg', '#FFFFFF')\n        root.option_add('*Button.activeBackground', '#666666')\n        root.option_add('*Button.activeForeground', '#FFFFFF')\n        root.option_add('*Font', 'Arial 14 bold')\n        root.option_add('*theme', 'dark')\n    else:\n        root.tk_setPalette(background='#FFFFFF', foreground='#000000')\n        for widget in root.winfo_children():\n            widget.config(bg='#FFFFFF', fg='#000000')\n        root.option_add('*Button.bg', '#DDDDDD')\n        root.option_add('*Button.fg', '#000000')\n        root.option_add('*Button.activeBackground', '#CCCCCC')\n        root.option_add('*Button.activeForeground', '#000000')\n        root.option_add('*Font', 'Arial 14 bold')\n        root.option_add('*theme', 'light')\n\n# Create the main window\nroot = tk.Tk()\nroot.title(\"Calculator\")\nroot.geometry(\"400x500\")\n\n# Create theme toggle button\ntoggle_button = tk.Button(root, text=\"Switch Theme\", command=toggle_theme)\ntoggle_button.pack(pady=10)\n\n# Run the application\nroot.mainloop()\n```\n\nThis code snippet shows how you can dynamically switch between themes by updating widget colors and styles. You can expand on this by adjusting specific widgets' properties to make the theme switch smoother.\n\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frohancyberops%2Fcalculator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frohancyberops%2Fcalculator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frohancyberops%2Fcalculator/lists"}