main 5675c6daa7f7 cached
227 files
284.9 KB
75.2k tokens
271 symbols
1 requests
Download .txt
Showing preview only (329K chars total). Download the full file or copy to clipboard to get everything.
Repository: king04aman/All-In-One-Python-Projects
Branch: main
Commit: 5675c6daa7f7
Files: 227
Total size: 284.9 KB

Directory structure:
gitextract_lpystzk0/

├── .github/
│   ├── ISSUE_TEMPLATE/
│   │   ├── PROJECT_SUGGESTION_TEMPLATE.md
│   │   ├── bug_report.md
│   │   ├── config.yml
│   │   ├── feature_request.md
│   │   └── other_issue.md
│   ├── PROJECT_SUGGESTION_TEMPLATE.md
│   ├── pull_request_template.md
│   └── workflows/
│       ├── generate-project-list.yml
│       └── welcome.yml
├── Age Calculator/
│   ├── calculate.py
│   └── runtime.txt
├── Alarm Bot/
│   ├── main.py
│   ├── requirements.txt
│   └── runtime.txt
├── Ascii Art Generator/
│   ├── generate.py
│   ├── requirements.txt
│   └── runtime.txt
├── Audio Book Generator/
│   ├── main.py
│   ├── requirements.txt
│   └── runtime.txt
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── CountDown Timer/
│   ├── main.py
│   ├── requirements.txt
│   └── runtime.txt
├── Currency Converter/
│   ├── main.py
│   ├── requirements.txt
│   └── runtime.txt
├── Custom GPT/
│   ├── README.md
│   ├── data/
│   │   └── data.txt
│   ├── example-env
│   └── main.py
├── Customizable_Workout_Playlist_Generator/
│   ├── README_SONG.md
│   ├── hiit_playlist.json
│   ├── playlist.py
│   └── requirements.txt
├── Digital Clock/
│   ├── main.py
│   ├── requirements.txt
│   └── runtime.txt
├── Example README.md
├── Expense Splitter/
│   ├── README.md
│   ├── main.py
│   └── runtme.txt
├── Extractive Text Summarization/
│   ├── readme.md
│   ├── requirements.txt
│   └── summary.py
├── Facebook Video Downloader/
│   ├── main.py
│   ├── requirements.txt
│   └── runtime.txt
├── Gauss Elimination with Partial Pivoting/
│   ├── README.md
│   ├── main.py
│   └── runtime.txt
├── Geographic Distance/
│   ├── README.md
│   ├── geographic_distance.py
│   ├── requirements.txt
│   ├── runtime.txt
│   └── test_geographic_distance.py
├── Gesture-Based-Game-Controller/
│   ├── main.py
│   ├── readme.md
│   ├── requirements.txt
│   └── runtime.txt
├── Handwritten-Assignments/
│   ├── main.py
│   ├── requirements.txt
│   └── runtime.txt
├── Headlight Detection/
│   ├── headlightDetection.py
│   ├── requirements.txt
│   └── runtime.txt
├── Helmet Detection/
│   ├── main.py
│   ├── requirements.txt
│   └── runtime.txt
├── Image Compression/
│   ├── main.py
│   ├── requirements.txt
│   └── runtime.txt
├── ImageSize Reducer/
│   ├── reduce.py
│   ├── requirements.txt
│   └── runtime.txt
├── Img-Steganograpy/
│   ├── main.py
│   ├── requirements.txt
│   └── runtime.txt
├── LICENSE
├── Learn-FastAPI/
│   ├── FastAPI-CURD.py
│   ├── FastAPI-Tutorial.py
│   └── README.md
├── Mental Health chatbot/
│   ├── Mental_health_bot.py
│   ├── README_BOT.md
│   └── requirements.txt
├── Merge PDFs/
│   ├── merge.py
│   ├── requirements.txt
│   └── runtime.txt
├── MobileNumber Tracker/
│   ├── requirements.txt
│   ├── runtime.txt
│   └── track.py
├── Mood Based Music Recommender/
│   ├── Emosic-Spoti.py
│   ├── README.md
│   └── requirement.txt
├── Movie Scraper/
│   ├── requirements.txt
│   ├── runtime.txt
│   └── scrape.py
├── My-Personal-Journal/
│   ├── README.md
│   ├── app.py
│   ├── database.py
│   ├── journal_app.py
│   ├── requirements.txt
│   ├── static/
│   │   └── style.css
│   ├── templates/
│   │   ├── add.html
│   │   ├── index.html
│   │   ├── search.html
│   │   ├── search_results.html
│   │   └── tags.html
│   └── ui.py
├── Notepad/
│   ├── main.py
│   ├── requirements.txt
│   └── runtime.txt
├── OCR Image-to-Text Conversion/
│   ├── README.md
│   ├── main.py
│   └── requirements.txt
├── PROJECTS.md
├── Password Generator/
│   ├── main.py
│   ├── requirements.txt
│   └── runtime.txt
├── Plagiarism-Checker/
│   ├── main.py
│   ├── requirements.txt
│   ├── runtime.txt
│   ├── test1.txt
│   └── test2.txt
├── Pomodoro Timer/
│   ├── README.md
│   ├── main.py
│   └── runtime.txt
├── QR Code Generator/
│   ├── advanceQrGenerator.py
│   ├── basicQrGenerator.py
│   ├── requirements.txt
│   └── runtime.txt
├── README.md
├── Random Movie Selector/
│   ├── main.py
│   ├── requirements.txt
│   └── runtime.txt
├── Random Quotes Generator/
│   ├── quotes.py
│   ├── requirements.txt
│   └── runtime.txt
├── Real-Time Cryptocurrency Price Tracker/
│   ├── Readme.md
│   ├── main.py
│   ├── requirements.txt
│   └── runtime.txt
├── Recipe Finder with Meal Planner/
│   ├── Readme.md
│   ├── main.py
│   └── runtime.txt
├── Resume Builder/
│   ├── README.md
│   ├── requirements.txt
│   └── resume_builder.py
├── Simple Assistant/
│   ├── assistant.py
│   ├── raj_mistry01/
│   │   ├── Readme.md
│   │   ├── main.py
│   │   └── requirements.txt
│   ├── requirements.txt
│   └── runtime.txt
├── Snake-Game/
│   ├── README.md
│   ├── Snake.py
│   ├── data.py
│   ├── data.txt
│   ├── food.py
│   ├── main.py
│   └── scoreboard.py
├── Speech To Text/
│   ├── main.py
│   ├── requirements.txt
│   └── runtime.txt
├── Spell Checker/
│   ├── main.py
│   ├── requirements.txt
│   └── runtime.txt
├── Telegram Bot/
│   ├── main.py
│   ├── requirements.txt
│   └── runtime.txt
├── Text Summarizer/
│   ├── README.md
│   ├── requirements.txt
│   ├── runtime.txt
│   ├── sample.csv
│   └── text_summarizer.py
├── Text To Speech/
│   ├── README.md
│   ├── requirements.txt
│   ├── runtime.txt
│   └── text_to_speech.py
├── Text to Morse Code/
│   ├── main.py
│   └── runtime.txt
├── Text_Adventure_Game/
│   ├── readme.md
│   └── text_adventure_game.py
├── Tic-Tac-Toc using AI (min-max)/
│   ├── README.md
│   ├── requirements.txt
│   └── tic_tac_toc.py
├── To Do List/
│   ├── README.md
│   ├── RithwikBejadi/
│   │   └── To Do App/
│   │       ├── README.md
│   │       ├── To_Do_AppTkInter.py
│   │       ├── requirements.txt
│   │       └── runtime.txt
│   ├── main.py
│   ├── requirement.txt
│   └── runtime.txt
├── Translator/
│   ├── requirements.txt
│   ├── runtime.txt
│   └── translate.py
├── URL Sortener/
│   ├── main.py
│   ├── requirements.txt
│   └── runtime.txt
├── Validate-Email/
│   ├── runtime.txt
│   └── validate.py
├── Video Processor/
│   ├── README.md
│   ├── requirements.txt
│   └── video_processor.py
├── Video To Audio/
│   ├── main.py
│   ├── requirement.txt
│   └── runtime.txt
├── Weather Alert/
│   ├── README.md
│   ├── main.py
│   ├── requirement.txt
│   └── runtime.txt
├── Word_frequency_counter/
│   ├── README.md
│   ├── main.py
│   ├── requirments.txt
│   └── runtime.txt
├── Youtube Video Downloader/
│   ├── Readme.md
│   ├── main.py
│   ├── requirements.txt
│   └── runtime.txt
└── personal-finance-tracker/
    ├── README.md
    ├── database.py
    ├── main.py
    ├── savings.py
    ├── tracker.py
    └── visualization.py

================================================
FILE CONTENTS
================================================

================================================
FILE: .github/ISSUE_TEMPLATE/PROJECT_SUGGESTION_TEMPLATE.md
================================================
---
name: Project Suggestion
about: Propose an idea for a new project
title: ""
labels: "Project Suggestion"
assignees: ""
---

### Project Suggestion Title
_A concise title for your project suggestion._

### Description
_Provide a detailed description of the project idea or feature you would like to propose._

### Benefits
_Explain how this project or feature would benefit the community or improve the existing repository._

### Implementation Ideas
_Offer any initial thoughts on how the project could be implemented, including potential technologies or approaches._

### Additional Context
_Include any other relevant information, links, or references that might help._

### Suggested Contributors
_If you have specific contributors in mind who might be interested in this project, please list them here._


================================================
FILE: .github/ISSUE_TEMPLATE/bug_report.md
================================================
---
name: "Bug Report"
about: "Report a bug or issue."
title: "Bug Report Title"
labels: ["bug", "help wanted"]
---

## Description
Please describe the bug you encountered, including steps to reproduce it.

## Steps to Reproduce
1. Step 1
2. Step 2
3. Step 3 ...

## Expected Behavior
What did you expect to happen?

## Actual Behavior
What actually happened?

## Additional Context
Add any other context about the problem, screenshots, or logs that might be helpful.


================================================
FILE: .github/ISSUE_TEMPLATE/config.yml
================================================
blank_issues_enabled: false 
contact: false 

templates:
  - name: "Project Suggestion"
    description: "Propose an idea for a new project."
    title: "Project Suggestion Title"
    labels: ["Project Suggestion"]
  
  - name: "Bug Report"
    description: "Report a bug or issue."
    title: "Bug Report Title"
    labels: ["bug", "help wanted"]
  
  - name: "Feature Request"
    description: "Request a new feature or enhancement."
    title: "Feature Request Title"
    labels: ["feature", "enhancement"]

  - name: "Other"
    description: "Use this template for any other issues or inquiries."
    title: "Other Issue Title"
    labels: ["question", "others"]

choose_template:
  title: "Choose an Issue Template"
  description: "Please select one of the templates below to create your issue."


================================================
FILE: .github/ISSUE_TEMPLATE/feature_request.md
================================================
---
name: "Feature Request"
about: "Request a new feature or enhancement."
title: "Feature Request Title"
labels: ["feature", "enhancement"]
---

## Feature Description
Please describe the feature you would like to request.

## Use Cases
How will this feature be used? Please provide examples.

## Additional Context
Add any other context about the feature request, including design ideas or potential impacts.


================================================
FILE: .github/ISSUE_TEMPLATE/other_issue.md
================================================
---
name: "Other"
about: "Use this template for any other issues or inquiries."
title: "Other Issue Title"
labels: ["question", "other"]
---

## Description
Please provide a detailed description of your inquiry or issue.

## Context
Add any relevant context or background information that may help in addressing your request.

## Additional Information
If applicable, include any additional information, screenshots, or references.


================================================
FILE: .github/PROJECT_SUGGESTION_TEMPLATE.md
================================================
### Project Suggestion Title
_A concise title for your project suggestion._

### Description
_Provide a detailed description of the project idea or feature you would like to propose._

### Benefits
_Explain how this project or feature would benefit the community or improve the existing repository._

### Implementation Ideas
_Offer any initial thoughts on how the project could be implemented, including potential technologies or approaches._

### Additional Context
_Include any other relevant information, links, or references that might help._

### Suggested Contributors
_If you have specific contributors in mind who might be interested in this project, please list them here._


================================================
FILE: .github/pull_request_template.md
================================================
### Developer Checklist
- [ ] Adhered to the guidelines outlined in the README & Contributing file.
- [ ] Maintained the correct directory structure (e.g., ProjectName/...yourfiles).
- [ ] Please ensure to include a README file for enhanced project clarity.
- [ ] Starred ⭐ the repository (optional).

### Summary
###### _Please provide a brief summary here._

### Screenshot
###### _Attach any relevant screenshots or GIFs here._

### Live Project Link
###### _Include a link to the live project here._


================================================
FILE: .github/workflows/generate-project-list.yml
================================================
name: Generate Project List

on:
  push:
    branches:
      - main

jobs:
  generate-list:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout code
        uses: actions/checkout@v3
        with:
          token: ${{ secrets.ACTION_TOKEN }}
          persist-credentials: true

      - name: Fetch latest changes
        run: git fetch origin

      - name: Merge changes
        run: |
          git merge origin/main || echo "No new changes to merge or merge conflict"

      - name: Generate project list
        run: |
          exclude_dirs=(.github)
          exclude_files=("LICENSE" "README.md" "CONTRIBUTING.md" "Example README.md" "CODE_OF_CONDUCT.md" "PROJECTS.md")

          projects=()
          for dir in */; do
            if [[ ! " ${exclude_dirs[@]} " =~ " ${dir%/} " ]]; then
              projects+=("$dir")
            fi
          done

          echo "# Project List" > PROJECTS.md
          echo "" >> PROJECTS.md

          for project in "${projects[@]}"; do
            project_name=${project%/}
            safe_project_name=${project_name// /%20}
            echo "* [$project_name](https://github.com/king04aman/All-In-One-Python-Projects/tree/main/$safe_project_name)" >> PROJECTS.md
          done

          for file in "${exclude_files[@]}"; do
            sed -i "/$file/d" PROJECTS.md
          done

          # Debug output to check the content of PROJECTS.md
          cat PROJECTS.md

      - name: Commit project list
        run: |
          git config --global user.email "github-actions[bot]@users.noreply.github.com"
          git config --global user.name "github-actions[bot]"
          git add PROJECTS.md
          if ! git diff --cached --exit-code; then
            git commit -m "Update project list"
            git push --force-with-lease
          else
            echo "No changes to commit."
          fi
        env:
          GITHUB_TOKEN: ${{ secrets.ACTION_TOKEN }}


================================================
FILE: .github/workflows/welcome.yml
================================================
name: Welcome Comments

permissions:
  actions: write
  attestations: write
  checks: write
  contents: write
  deployments: write
  id-token: write
  issues: write
  discussions: write
  packages: write
  pages: write
  pull-requests: write
  repository-projects: write
  security-events: write
  statuses: write

on:
  issues:
    types: [opened, closed]
  pull_request_target:
    types: [opened, closed]

jobs:
  welcomer:
    runs-on: ubuntu-latest
    steps:
      - name: Auto Welcome on Issues or PRs
        uses: actions/github-script@v6
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}
          script: |
            const author = context.payload.sender.login;
            const commentBody = (message) => `👋 @${author} 👋\n\n${message}`;

            if (context.eventName === 'issues') {
              const issue = context.payload.issue;

              if (context.payload.action === 'opened') {
                const message = `We're thrilled to see you opening an issue! Your input is valuable to us. Don’t forget to fill out our issue template for the best experience. We will look into it soon.`;
                github.rest.issues.createComment({
                  issue_number: issue.number,
                  owner: context.repo.owner,
                  repo: context.repo.repo,
                  body: commentBody(message),
                });
              } else if (context.payload.action === 'closed') {
                const message = `Thanks for closing the issue! We appreciate your updates.`;
                github.rest.issues.createComment({
                  issue_number: issue.number,
                  owner: context.repo.owner,
                  repo: context.repo.repo,
                  body: commentBody(message),
                });
              }
            } else if (context.eventName === 'pull_request_target') {
              const pr = context.payload.pull_request;

              if (context.payload.action === 'opened') {
                const message = `We're delighted to have your pull request! Please take a moment to check our contributing guidelines and ensure you've filled out the PR template for a smooth process. We will review it soon.`;
                github.rest.issues.createComment({
                  issue_number: pr.number,
                  owner: context.repo.owner,
                  repo: context.repo.repo,
                  body: commentBody(message),
                });
              } else if (context.payload.action === 'closed') {
            		const message = pr.merged 
                  ? `🎉 You've just merged your pull request! We're excited to have you in our community. Keep up the fantastic contributions to the project!`
                  : `Thanks for closing the pull request! Your contributions are valuable to us.`;
                
                github.rest.issues.createComment({
                  issue_number: pr.number,
                  owner: context.repo.owner,
                  repo: context.repo.repo,
                  body: commentBody(message),
                });
              }
            }


================================================
FILE: Age Calculator/calculate.py
================================================
import time
from calendar import isleap

def judge_leap_year(year):
    if isleap(year):
        return True
    else:
        return False

def month_days(month, leap_year):
    if month in [1, 3, 5, 7, 8, 10, 12]:
        return 31
    elif month in [4, 6, 9, 11]:
        return 30
    elif month == 2 and leap_year:
        return 29
    elif month == 2 and (not leap_year):
        return 28


name = input("Please enter your name: ")
age = input("Please enter your age: ")
localtime = time.localtime(time.time())

year = int(age)
month = year * 12 + localtime.tm_mon
day = 0

begin_year = int(localtime.tm_year) - year
end_year = begin_year + year

for y in range(begin_year, end_year):
    if (judge_leap_year(y)):
        day = day + 366
    else:
        day = day + 365

leap_year = judge_leap_year(localtime.tm_year)
for m in range(1, localtime.tm_mon):
    day = day + month_days(m, leap_year)

day = day + localtime.tm_mday
print("\n\t%s's age is %d years or " % (name, year), end="")
print("%d months or %d days" % (month, day))


================================================
FILE: Age Calculator/runtime.txt
================================================
python-3.10.7

================================================
FILE: Alarm Bot/main.py
================================================
from tkinter import *
import datetime
import time
import winsound
from threading import *

root = Tk()
root.geometry("400x200")

def Threading():
	t1=Thread(target=alarm)
	t1.start()

def alarm():
	while True:
		set_alarm_time = f"{hour.get()}:{minute.get()}:{second.get()}"
		time.sleep(1)
		current_time = datetime.datetime.now().strftime("%H:%M:%S")
		print(current_time,set_alarm_time)

		if current_time == set_alarm_time:
			print("Time to Wake up")
			winsound.PlaySound("sound.wav",winsound.SND_ASYNC)

Label(root,text="Alarm Clock",font=("Helvetica 20 bold"),fg="red").pack(pady=10)
Label(root,text="Set Time",font=("Helvetica 15 bold")).pack()

frame = Frame(root)
frame.pack()

hour = StringVar(root)
hours = ('00', '01', '02', '03', '04', '05', '06', '07',
		'08', '09', '10', '11', '12', '13', '14', '15',
		'16', '17', '18', '19', '20', '21', '22', '23', '24'
		)
hour.set(hours[0])

hrs = OptionMenu(frame, hour, *hours)
hrs.pack(side=LEFT)

minute = StringVar(root)
minutes = ('00', '01', '02', '03', '04', '05', '06', '07',
		'08', '09', '10', '11', '12', '13', '14', '15',
		'16', '17', '18', '19', '20', '21', '22', '23',
		'24', '25', '26', '27', '28', '29', '30', '31',
		'32', '33', '34', '35', '36', '37', '38', '39',
		'40', '41', '42', '43', '44', '45', '46', '47',
		'48', '49', '50', '51', '52', '53', '54', '55',
		'56', '57', '58', '59', '60')
minute.set(minutes[0])

mins = OptionMenu(frame, minute, *minutes)
mins.pack(side=LEFT)

second = StringVar(root)
seconds = ('00', '01', '02', '03', '04', '05', '06', '07',
		'08', '09', '10', '11', '12', '13', '14', '15',
		'16', '17', '18', '19', '20', '21', '22', '23',
		'24', '25', '26', '27', '28', '29', '30', '31',
		'32', '33', '34', '35', '36', '37', '38', '39',
		'40', '41', '42', '43', '44', '45', '46', '47',
		'48', '49', '50', '51', '52', '53', '54', '55',
		'56', '57', '58', '59', '60')
second.set(seconds[0])

secs = OptionMenu(frame, second, *seconds)
secs.pack(side=LEFT)

Button(root,text="Set Alarm",font=("Helvetica 15"),command=Threading).pack(pady=20)
root.mainloop()


================================================
FILE: Alarm Bot/runtime.txt
================================================
python-3.10.7

================================================
FILE: Ascii Art Generator/generate.py
================================================
import cv2
import numpy as np
import sys

symbols_list = ["#", "-", "*", ".", "+", "o"]
threshold_list = [0, 50, 100, 150, 200]

def print_out_ascii(array):
    for row in array:
        for e in row:
            print(symbols_list[int(e) % len(symbols_list)], end="")
        print()


def img_to_ascii(image):
    height, width = image.shape
    new_width = int(width / 20) 
    new_height = int(height / 40)

    resized_image = cv2.resize(image, (new_width, new_height),)

    thresh_image = np.zeros(resized_image.shape)

    for i, threshold in enumerate(threshold_list):
        thresh_image[resized_image > threshold] = i
    return thresh_image


if __name__ == "__main__":

    if len(sys.argv) < 2:
        print("Image Path not specified : Using sample_image.png\n")
        image_path = "sample_image.png"

    if len(sys.argv) == 2:
        print("Using {} as Image Path\n".format(sys.argv[1]))
        image_path = sys.argv[1]

    image = cv2.imread(image_path, 0)
    ascii_art = img_to_ascii(image)
    print_out_ascii(ascii_art)
    

================================================
FILE: Ascii Art Generator/runtime.txt
================================================
python-3.10.7

================================================
FILE: Audio Book Generator/main.py
================================================
from gtts import gTTS
import PyPDF2

pdf_File = open('name.pdf', 'rb') 

pdf_Reader = PyPDF2.PdfFileReader(pdf_File)
count = pdf_Reader.numPages
textList = []

for i in range(count):
   try:
    page = pdf_Reader.getPage(i)    
    textList.append(page.extractText())
   except:
       pass

textString = " ".join(textList)
print(textString)
language = 'en'

myAudio = gTTS(text=textString, lang=language, slow=False)
myAudio.save("Audio.mp3")


================================================
FILE: Audio Book Generator/runtime.txt
================================================
python-3.10.7

================================================
FILE: CODE_OF_CONDUCT.md
================================================
# Code of Conduct
*As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.*

*We are committed to creating a welcoming and inclusive environment for all people, regardless of their background or identity. We expect all members of our community, including contributors, users, and maintainers, to abide by this Code of Conduct.*

## Our Standards
- Examples of behavior that contributes to creating a positive environment include:
    - Be respectful of others and their opinions
    - Refrain from using discriminatory language or behavior
    - Avoid engaging in personal attacks or harassment
    - Help create a safe and positive environment for everyone
    - Follow the project's guidelines and procedures

- Examples of unacceptable behavior by participants include:
    - Harassment or discrimination of any kind
    - Threats, bullying, or violence
    - Sharing of private information without consent
    - Plagiarism or infringement of intellectual property rights
    - Any other behavior that is deemed unacceptable by the project maintainers

## Our Responsibilities
- Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
- Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.

## Consequences
- If you engage in behavior that violates this Code of Conduct, you may be asked to stop, or other appropriate action may be taken. 
- If any unacceptable behavior will be determined by the project maintainers, and may include:
  - Warning
  - Removal from the project or community
  - Reporting to appropriate authorities

## Reporting
- If you witness or experience conduct that violates this Code of Conduct, please contact us immediately on [Linkedin](https://linkedin.com/in/king04aman/). We will take all reports seriously and will work to resolve the issue as quickly as possible.

## Attribution
- This Code of Conduct is adapted from the Contributor Covenant, version 1.4, available at [https://www.contributor-covenant.org/version/1/4/code-of-conduct.html](https://www.contributor-covenant.org/version/1/4/code-of-conduct.html)


================================================
FILE: CONTRIBUTING.md
================================================
# Contributing Guidelines 
*Thank you for your interest in contributing to this Python project! We welcome and appreciate contributions of all kinds, from bug reports and feature requests to documentation and code improvements.*

## How to Contribute
*Here are some ways you can contribute:*
- [Report an issue](https://docs.github.com/en/issues/tracking-your-work-with-issues/creating-an-issue)
- [Suggest a feature](CONTRIBUTING.md)
- Improve the documentation
- [Contribute code](CODE_OF_CONDUCT.md)

## Reporting Issues
*When reporting an issue, please include the following:*
- A clear and descriptive title
- A detailed description of the issue, including steps to reproduce the problem
- Screenshots or other relevant media
- The version of the project and dependencies you are using
- The operating system and version you are using

## Suggest a feature
*To suggest a new feature, please open an issue on GitHub and provide a detailed description of what you would like to see added, and why it would be useful.*

## Improve the documentation
*We welcome improvements to the documentation, whether they're typo fixes, explanations of complex concepts, or examples of how to use the software. To make changes to the documentation, please fork the repository, make your changes, and submit a pull request.*

## Contribute code Guidelines
*If you're interested in contributing code to the project, please follow these guidelines:*

- Fork the repository. This creates a copy of the code that you can work on without affecting the original project.
- Create a new branch. Use a descriptive name that reflects the changes you plan to make.
- Make your changes. Keep your code clean, well-organized, and easy to read. Follow the project's existing coding style as closely as possible.
- Test your changes. Make sure your changes don't break existing functionality and that they work as expected.
- Submit a pull request. Once you've made your changes and tested them, submit a pull request. Please provide a clear and concise description of your changes and why they're needed.
- Add documentation. Add documentation to the README.md file and to the code files.

## Pull Request Guidelines
- Fork the repository and create a new branch for your changes.
- Follow the existing code style and conventions.
- Include tests for any new code.
- Make sure all tests pass before submitting the pull request.
- Do not include changes to the README or other documentation in the same pull request as code changes.

## Code of Conduct
*Please note that this project is released with a Code of Conduct. By participating in this project you agree to abide by its terms.*

## License
This project is licensed under the terms of the MIT license.

## Thank you!
Thank you for your interest in contributing to this project! We appreciate your help and look forward to working with you.


================================================
FILE: CountDown Timer/main.py
================================================
from tkinter import *
import tkinter as tk

class Application(Frame):
    def __init__(self,master):
        super(Application,self).__init__(master)
        self.pack()
        self.createWidgets()
        
        self.master.geometry("300x200")
        self._alarm_id = None
        self._paused = False
        self._starttime = 0
    
    # def startTimer(self):

    def createWidgets(self):

        self.someFrame = Frame(self)
        self.time_var = StringVar()
        self.input_time = tk.Entry(self, width=25, font=('Calibri',12), textvariable = self.time_var)
        # Adding placeholder
        self.input_time.insert(0, "Enter Time in seconds")
        self.input_time.pack(padx=10,pady=(30,10))
        #using bind method
        self.input_time.bind("<Button-1>", self.enter)
        
        self.startButton = Button(self.someFrame, text="Start", font=('Helvetica',12), bg='green', fg='white', command=self.startTime)
        self.startButton.pack(side=LEFT, padx=5)

        self.pauseButton = Button(self.someFrame, text="Pause", font=('Helvetica',12), bg='azure', command=self.pauseTime)
        self.pauseButton.pack(side=LEFT, padx=5)

        self.resetButton = Button(self.someFrame, text="Reset", font=('Helvetica',12), bg='azure', command=self.resetTime)
        self.resetButton.pack(side=LEFT, padx=5)

        self.closeButton = Button(self.someFrame, text="Close", font=('Helvetica',12), bg='red',fg='white', command=self.closeApp)
        self.closeButton.pack(side=LEFT, padx=5)
        self.someFrame.pack(side=TOP)

        self.labelvariable = StringVar()
        self.labelvariable.set("")

        self.thelabel = Label(self,textvariable = self.labelvariable,font=('Helvetica',50))
        self.thelabel.pack(side=TOP)

    # Removes placeholder text in the Entry widget
    def enter(self,*args):
        self.input_time.delete(0, 'end')
        
    # Resume function
    def startTime(self):
        self.get_time = self.time_var.get()
        try:
            self.time_in_int = int(self.get_time)
        except:
            self.time_in_int = 0
        self._starttime = self.time_in_int
        self._paused = False
        if self._alarm_id is None:
            self.countdown(self._starttime)

    # Pause function
    def pauseTime(self):
        if self._alarm_id is not None:
            self._paused = True

    # Reset function
    def resetTime(self):
        if self._alarm_id is not None:
            self.master.after_cancel(self._alarm_id)
            self._alarm_id = None
            self._paused = False
            self.countdown(0)
            self._paused = True
    
    def closeApp(self):
        self.master.destroy()

    def countdown(self, timeInSeconds, start=True):
        if timeInSeconds == 0:
            self._starttime=0
            self.labelvariable.set("0")
            return
        if start:
            self._starttime = timeInSeconds
        if self._paused:
            self._alarm_id = self.master.after(1000, self.countdown, timeInSeconds, False)
        else:
            app.labelvariable.set(timeInSeconds)
            self._alarm_id = self.master.after(1000, self.countdown, timeInSeconds-1, False)


if __name__ == '__main__':
    root = Tk()
    root.title("Countdown Timer")
    app = Application(root)
    root.mainloop()
 


================================================
FILE: CountDown Timer/runtime.txt
================================================
python-3.10.7

================================================
FILE: Currency Converter/main.py
================================================
import requests

class Currency_convertor:
	rates = {}
	def __init__(self, url):
		data = requests.get(url).json()
		self.rates = data["rates"]

	def convert(self, from_currency, to_currency, amount):
		initial_amount = amount
		if from_currency != 'EUR' :
			amount = amount / self.rates[from_currency]

		amount = round(amount * self.rates[to_currency], 2)
		print('{} {} = {} {}'.format(initial_amount, from_currency, amount, to_currency))

if __name__ == "__main__":
	url = str.__add__('http://data.fixer.io/api/latest?access_key=', YOUR_ACCESS_KEY)
	c = Currency_convertor(url)
	amount = int(input("Amount: "))
	from_country = input("From Country: ")
	to_country = input("TO Country: ")

	c.convert(from_country, to_country, amount)


================================================
FILE: Currency Converter/runtime.txt
================================================
python-3.10.7

================================================
FILE: Custom GPT/README.md
================================================
# Conversational Retrieval with LangChain and OpenAI

This directory contains a Python script that implements a conversational retrieval system using LangChain and OpenAI's API. The script allows users to query a collection of documents and receive responses based on the retrieved information.

## Features

- Load documents from a specified directory.
- Create and persist a vector store index for efficient querying.
- Engage in conversational interactions, maintaining chat history.
- Easily exit the program.

## Requirements

- Python 3.7+
- Required packages:
  - `openai`
  - `langchain`
  - `chromadb`

You can install the required packages using pip:

```bash
pip install openai langchain chromadb
```
## Setup
1. Clone the Repository:
    ```bash
    git clone https://github.com/king04aman/custom-gpt.git
    cd your_repository
    ```
2. Set the OpenAI API Key:
Replace `your_api_key_here` in the script with your actual OpenAI API key. You can also set the environment variable directly in your terminal:
    ```bash
    export OPENAI_API_KEY="your_api_key_here"
    ```
3. Prepare Your Data:
Place your documents in a folder named `data/`. The script will load all documents from this directory.

## Usage
Run the script from the command line:
```bash
python main.py
```
### Command Line Arguments
You can provide an initial query as a command line argument:
```bash
python main.py "Your initial query here"
```
### Interactive Mode
If no initial query is provided, the script will prompt you to enter queries interactively. Type your question and press Enter to get a response. Type `quit`, `q`, or exit to `exit` the program.

### Persistence
- Set the `PERSIST` variable to `True` in the script to enable saving the vector store index to disk for reuse in future sessions.
- The index will be saved in a directory named `persist/`.

## Example
```bash
Prompt (type 'quit' to exit): What is the significance of data persistence?
Response: [Your response here based on the documents]
```

## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## Contributing
Feel free to submit issues or pull requests. Contributions are welcome!


================================================
FILE: Custom GPT/data/data.txt
================================================


================================================
FILE: Custom GPT/example-env
================================================
OPENAI_API_KEY = "your_api_key"

================================================
FILE: Custom GPT/main.py
================================================
import os
import openai
import sys
from langchain.chains import ConversationalRetrievalChain
from langchain.chat_models import ChatOpenAI
from langchain.document_loaders import DirectoryLoader
from langchain.embeddings import OpenAIEmbeddings
from langchain.indexes import VectorstoreIndexCreator
from langchain.indexes.vectorstore import VectorStoreIndexWrapper
from langchain.vectorstores import Chroma


os.environ["OPENAI_API_KEY"] = "your_api_key_here"
PERSIST = False

query = sys.argv[1] if len(sys.argv) > 1 else None

if PERSIST and os.path.exists("persist"):
    print("Reusing index...\n")
    vectorstore = Chroma(persist_directory="persist", embedding_function=OpenAIEmbeddings())
    index = VectorStoreIndexWrapper(vectorstore=vectorstore)
else:
    loader = DirectoryLoader("data/")
    index = VectorstoreIndexCreator(vectorstore_kwargs={"persist_directory": "persist"}).from_loaders([loader]) if PERSIST else VectorstoreIndexCreator().from_loaders([loader])

chain = ConversationalRetrievalChain.from_llm(
    llm=ChatOpenAI(model="gpt-3.5-turbo"),
    retriever=index.vectorstore.as_retriever(search_kwargs={"k": 1}),
)

chat_history = []

while True:
    if not query:
        query = input("Prompt (type 'quit' to exit): ")
    if query.lower() in ['quit', 'q', 'exit']:
        print("Exiting the program...")
        sys.exit()
    
    result = chain({"question": query, "chat_history": chat_history})
    
    print("Response:", result['answer'])

    chat_history.append((query, result['answer']))
    query = None 


================================================
FILE: Customizable_Workout_Playlist_Generator/README_SONG.md
================================================
# Customizable Workout Playlist Generator

This Python application generates customized workout playlists based on user preferences, including workout type, duration, preferred genres, and BPM range. It can use a local song database or integrate with popular music streaming services like Spotify, Apple Music, and YouTube Music.

## Features

- Generate playlists for various workout types (e.g., HIIT, yoga, cardio)
- Customize playlist duration
- Filter songs by genre and BPM range
- Integration with Spotify, Apple Music, and YouTube Music (API keys required)
- Save and load playlists in JSON format

## Requirements

- Python 3.6+
- Required Python packages (see `requirements.txt`)

## Installation

1. Clone this repository:
   ```
   git clone https://github.com/Ashutoshdas-dev/All-In-One-Python-Projects.git
   cd Customizable_Workout_Playlist_Generator
   ```

2. Install the required packages:
   ```
   pip install -r requirements.txt
   ```

3. Set up API credentials for the music services you want to use (Spotify, Apple Music, or YouTube Music).

## Usage

1. Run the main script:
   ```
   python playlist.py
   ```

2. Follow the prompts to:
   - Choose a music source (local database, Spotify, Apple Music, or YouTube Music)
   - Enter workout type, duration, preferred genres, and BPM range
   - Generate and view the playlist
   - Save the playlist to a JSON file (optional)

3. Repeat the process to generate multiple playlists or exit the program.

## API Integration

To use the music streaming service integrations, you'll need to set up API credentials:

- Spotify: Set up a Spotify Developer account and create an app to get your client ID and client secret.
- Apple Music: Obtain an Apple Developer account and set up MusicKit.
- YouTube Music: No authentication is required for basic usage.

Update the respective client classes in `playlist.py` with your API credentials.


================================================
FILE: Customizable_Workout_Playlist_Generator/hiit_playlist.json
================================================
[
  {
    "title": "Lose Yourself",
    "artist": "Eminem",
    "duration": 326,
    "bpm": 171,
    "genre": "hip-hop"
  },
  {
    "title": "Till I Collapse",
    "artist": "Eminem",
    "duration": 297,
    "bpm": 171,
    "genre": "hip-hop"
  },
  {
    "title": "God's Plan",
    "artist": "Drake",
    "duration": 198,
    "bpm": 154,
    "genre": "hip-hop"
  },
  {
    "title": "Blinding Lights",
    "artist": "The Weeknd",
    "duration": 200,
    "bpm": 171,
    "genre": "pop"
  },
  {
    "title": "Sicko Mode",
    "artist": "Travis Scott",
    "duration": 312,
    "bpm": 155,
    "genre": "hip-hop"
  },
  {
    "title": "In the End",
    "artist": "Linkin Park",
    "duration": 217,
    "bpm": 105,
    "genre": "rock"
  },
  {
    "title": "HUMBLE.",
    "artist": "Kendrick Lamar",
    "duration": 177,
    "bpm": 150,
    "genre": "hip-hop"
  },
  {
    "title": "Shape of You",
    "artist": "Ed Sheeran",
    "duration": 233,
    "bpm": 96,
    "genre": "pop"
  },
  {
    "title": "Rockstar",
    "artist": "Post Malone",
    "duration": 218,
    "bpm": 80,
    "genre": "hip-hop"
  },
  {
    "title": "Senorita",
    "artist": "Shawn Mendes",
    "duration": 190,
    "bpm": 117,
    "genre": "pop"
  },
  {
    "title": "Bad Guy",
    "artist": "Billie Eilish",
    "duration": 194,
    "bpm": 135,
    "genre": "pop"
  },
  {
    "title": "Believer",
    "artist": "Imagine Dragons",
    "duration": 204,
    "bpm": 125,
    "genre": "rock"
  },
  {
    "title": "Old Town Road",
    "artist": "Lil Nas X",
    "duration": 157,
    "bpm": 136,
    "genre": "hip-hop"
  },
  {
    "title": "7 Rings",
    "artist": "Ariana Grande",
    "duration": 178,
    "bpm": 70,
    "genre": "pop"
  },
  {
    "title": "Sunflower",
    "artist": "Post Malone",
    "duration": 158,
    "bpm": 90,
    "genre": "hip-hop"
  },
  {
    "title": "No Tears Left to Cry",
    "artist": "Ariana Grande",
    "duration": 206,
    "bpm": 122,
    "genre": "pop"
  },
  {
    "title": "Lucid Dreams",
    "artist": "Juice WRLD",
    "duration": 239,
    "bpm": 84,
    "genre": "hip-hop"
  },
  {
    "title": "Memories",
    "artist": "Maroon 5",
    "duration": 189,
    "bpm": 91,
    "genre": "pop"
  },
  {
    "title": "Savage Love",
    "artist": "Jawsh 685 & Jason Derulo",
    "duration": 171,
    "bpm": 96,
    "genre": "pop"
  },
  {
    "title": "Levitating",
    "artist": "Dua Lipa",
    "duration": 203,
    "bpm": 103,
    "genre": "pop"
  },
  {
    "title": "One Dance",
    "artist": "Drake",
    "duration": 173,
    "bpm": 104,
    "genre": "afrobeats"
  },
  {
    "title": "Stressed Out",
    "artist": "Twenty One Pilots",
    "duration": 185,
    "bpm": 85,
    "genre": "alternative"
  },
  {
    "title": "Radioactive",
    "artist": "Imagine Dragons",
    "duration": 186,
    "bpm": 136,
    "genre": "rock"
  },
  {
    "title": "Rolling in the Deep",
    "artist": "Adele",
    "duration": 228,
    "bpm": 105,
    "genre": "pop"
  },
  {
    "title": "Closer",
    "artist": "The Chainsmokers",
    "duration": 244,
    "bpm": 95,
    "genre": "electronic"
  },
  {
    "title": "Shake It Off",
    "artist": "Taylor Swift",
    "duration": 219,
    "bpm": 160,
    "genre": "pop"
  },
  {
    "title": "Uptown Funk",
    "artist": "Mark Ronson ft. Bruno Mars",
    "duration": 269,
    "bpm": 115,
    "genre": "funk"
  },
  {
    "title": "Sorry",
    "artist": "Justin Bieber",
    "duration": 200,
    "bpm": 100,
    "genre": "pop"
  },
  {
    "title": "The Middle",
    "artist": "Zedd, Maren Morris",
    "duration": 184,
    "bpm": 99,
    "genre": "electronic"
  },
  {
    "title": "Shallow",
    "artist": "Lady Gaga & Bradley Cooper",
    "duration": 215,
    "bpm": 96,
    "genre": "pop"
  },
  {
    "title": "Despacito",
    "artist": "Luis Fonsi ft. Daddy Yankee",
    "duration": 229,
    "bpm": 89,
    "genre": "reggaeton"
  },
  {
    "title": "Attention",
    "artist": "Charlie Puth",
    "duration": 211,
    "bpm": 100,
    "genre": "pop"
  },
  {
    "title": "Stay",
    "artist": "The Kid LAROI & Justin Bieber",
    "duration": 141,
    "bpm": 170,
    "genre": "pop"
  },
  {
    "title": "Circles",
    "artist": "Post Malone",
    "duration": 215,
    "bpm": 120,
    "genre": "pop"
  },
  {
    "title": "Call Out My Name",
    "artist": "The Weeknd",
    "duration": 234,
    "bpm": 135,
    "genre": "R&B"
  },
  {
    "title": "Heat Waves",
    "artist": "Glass Animals",
    "duration": 239,
    "bpm": 81,
    "genre": "pop"
  },
  {
    "title": "Good 4 U",
    "artist": "Olivia Rodrigo",
    "duration": 178,
    "bpm": 170,
    "genre": "pop-punk"
  },
  {
    "title": "Montero (Call Me By Your Name)",
    "artist": "Lil Nas X",
    "duration": 137,
    "bpm": 89,
    "genre": "hip-hop"
  },
  {
    "title": "Industry Baby",
    "artist": "Lil Nas X ft. Jack Harlow",
    "duration": 212,
    "bpm": 150,
    "genre": "hip-hop"
  },
  {
    "title": "Dynamite",
    "artist": "BTS",
    "duration": 199,
    "bpm": 114,
    "genre": "pop"
  },
  {
    "title": "Peaches",
    "artist": "Justin Bieber ft. Daniel Caesar",
    "duration": 198,
    "bpm": 90,
    "genre": "R&B"
  },
  {
    "title": "Positions",
    "artist": "Ariana Grande",
    "duration": 172,
    "bpm": 100,
    "genre": "pop"
  },
  {
    "title": "Watermelon Sugar",
    "artist": "Harry Styles",
    "duration": 174,
    "bpm": 96,
    "genre": "pop"
  },
  {
    "title": "Say So",
    "artist": "Doja Cat",
    "duration": 237,
    "bpm": 111,
    "genre": "pop"
  },
  {
    "title": "Mood",
    "artist": "24kGoldn ft. Iann Dior",
    "duration": 140,
    "bpm": 91,
    "genre": "hip-hop"
  }
]


================================================
FILE: Customizable_Workout_Playlist_Generator/playlist.py
================================================
import json
from datetime import timedelta
import random
from typing import List, Dict, Optional
import os

# Add these imports for API integration (you'll need to install these libraries)
import spotipy
from spotipy.oauth2 import SpotifyOAuth
import requests
from ytmusicapi import YTMusic

class Song:
    def __init__(self, title: str, artist: str, duration: int, bpm: int, genre: str):
        self.title = title
        self.artist = artist
        self.duration = duration  # in seconds
        self.bpm = bpm
        self.genre = genre

    def __str__(self):
        return f"{self.title} - {self.artist} ({self.duration//60}:{self.duration%60:02d})"

class WorkoutPlaylist:
    def __init__(self):
        self.songs: List[Song] = []
        self.api_client = None  # Initialize api_client to None
        self.load_song_database()

    def load_song_database(self):
        if self.api_client:
            # TODO: Implement fetching songs from the chosen API
            pass
        else:
            # Use the existing sample database
            self.song_database = [
                Song("Eye of the Tiger", "Survivor", 240, 109, "rock"),
                Song("Stronger", "Kanye West", 312, 104, "hip-hop"),
                Song("Thunderstruck", "AC/DC", 292, 133, "rock"),
                Song("Till I Collapse", "Eminem", 297, 171, "hip-hop"),
                Song("Shake It Off", "Taylor Swift", 219, 160, "pop"),
                Song("Lose Yourself", "Eminem", 326, 171, "hip-hop"),
                Song("Sweet Dreams", "Eurythmics", 216, 125, "pop"),
                Song("Don't Stop Believin'", "Journey", 250, 119, "rock"),
                Song("Pump It", "Black Eyed Peas", 213, 154, "pop"),
                Song("Run the World", "Beyoncé", 236, 127, "pop"),
            ]

    def set_api_client(self, service: str):
        if service == 'spotify':
            self.api_client = SpotifyClient()
        elif service == 'apple_music':
            self.api_client = AppleMusicClient()
        elif service == 'youtube_music':
            self.api_client = YouTubeMusicClient()

    def generate_playlist(
        self,
        workout_type: str,
        duration_minutes: int,
        preferred_genres: List[str] = None,
        min_bpm: Optional[int] = None,
        max_bpm: Optional[int] = None
    ) -> List[Song]:
        """
        Generate a workout playlist based on user preferences
        """
        # Define BPM ranges for different workout types if not specified
        workout_bpm_ranges = {
            "warmup": (90, 120),
            "cardio": (120, 140),
            "hiit": (140, 180),
            "strength": (110, 130),
            "cooldown": (80, 110),
            "yoga": (70, 100)
        }

        if min_bpm is None or max_bpm is None:
            min_bpm, max_bpm = workout_bpm_ranges.get(workout_type.lower(), (100, 140))

        # Filter songs based on criteria
        suitable_songs = [
            song for song in self.song_database
            if min_bpm <= song.bpm <= max_bpm
            and (preferred_genres is None or song.genre in preferred_genres)
        ]

        if not suitable_songs:
            # If no songs match the criteria, gradually expand the BPM range
            bpm_range_expansion = 10
            while not suitable_songs and (min_bpm > 60 or max_bpm < 180):
                min_bpm = max(60, min_bpm - bpm_range_expansion)
                max_bpm = min(180, max_bpm + bpm_range_expansion)
                suitable_songs = [
                    song for song in self.song_database
                    if min_bpm <= song.bpm <= max_bpm
                    and (preferred_genres is None or song.genre in preferred_genres)
                ]
            
            if not suitable_songs:
                # If still no songs, ignore BPM and only consider genre
                suitable_songs = [
                    song for song in self.song_database
                    if preferred_genres is None or song.genre in preferred_genres
                ]
                
            if not suitable_songs:
                # If still no songs, use all available songs
                suitable_songs = self.song_database

        # Create playlist
        playlist = []
        total_duration = 0
        target_duration = duration_minutes * 60

        while total_duration < target_duration and suitable_songs:
            # Choose a random song that fits within remaining time
            remaining_time = target_duration - total_duration
            possible_songs = [s for s in suitable_songs if s.duration <= remaining_time]
            
            if not possible_songs:
                # If no songs fit, choose the shortest available song
                possible_songs = sorted(suitable_songs, key=lambda s: s.duration)
                if possible_songs:
                    selected_song = possible_songs[0]
                else:
                    break
            else:
                selected_song = random.choice(possible_songs)

            playlist.append(selected_song)
            total_duration += selected_song.duration
            suitable_songs.remove(selected_song)

        return playlist

    def save_playlist(self, playlist: List[Song], filename: str):
        """Save playlist to a JSON file"""
        playlist_data = [{
            "title": song.title,
            "artist": song.artist,
            "duration": song.duration,
            "bpm": song.bpm,
            "genre": song.genre
        } for song in playlist]

        with open(filename, 'w') as f:
            json.dump(playlist_data, f, indent=2)

    def load_playlist(self, filename: str) -> List[Song]:
        """Load playlist from a JSON file"""
        with open(filename, 'r') as f:
            playlist_data = json.load(f)
            
        return [Song(**song_data) for song_data in playlist_data]

    def share_playlist(self, playlist: List[Song], platform: str):
        """
        TODO: Implement playlist sharing functionality
        This method will allow users to share their playlists on various platforms
        """
        pass  # Placeholder for future implementation

class SpotifyClient:
    def __init__(self):
        self.sp = spotipy.Spotify(auth_manager=SpotifyOAuth(scope="playlist-modify-private"))

    def search_songs(self, query: str, limit: int = 10) -> List[Song]:
        results = self.sp.search(q=query, limit=limit, type='track')
        songs = []
        for track in results['tracks']['items']:
            song = Song(
                title=track['name'],
                artist=track['artists'][0]['name'],
                duration=track['duration_ms'] // 1000,
                bpm=0,  # Spotify API doesn't provide BPM directly
                genre=""  # Spotify API doesn't provide genre directly
            )
            songs.append(song)
        return songs

class AppleMusicClient:
    def __init__(self):
        # TODO: Implement Apple Music API client
        # You'll need to set up Apple Music API credentials
        pass

    def search_songs(self, query: str, limit: int = 10) -> List[Song]:
        # TODO: Implement song search using Apple Music API
        # This is a placeholder implementation
        return []

class YouTubeMusicClient:
    def __init__(self):
        self.ytmusic = YTMusic()

    def search_songs(self, query: str, limit: int = 10) -> List[Song]:
        results = self.ytmusic.search(query, filter="songs", limit=limit)
        songs = []
        for track in results:
            song = Song(
                title=track['title'],
                artist=track['artists'][0]['name'],
                duration=int(track['duration_seconds']),
                bpm=0,  # YouTube Music API doesn't provide BPM
                genre=""  # YouTube Music API doesn't provide genre directly
            )
            songs.append(song)
        return songs

def format_playlist(playlist: List[Song]) -> str:
    """Format playlist for display"""
    total_duration = sum(song.duration for song in playlist)
    formatted = f"Workout Playlist (Total Duration: {total_duration//60}:{total_duration%60:02d})\n"
    formatted += "-" * 50 + "\n"
    
    for i, song in enumerate(playlist, 1):
        formatted += f"{i}. {song}\n"
    
    return formatted

def get_user_input():
    workout_type = input("Enter workout type (e.g., hiit, yoga, cardio): ").lower()
    duration_minutes = int(input("Enter workout duration in minutes: "))
    genres = input("Enter preferred genres (comma-separated, or press Enter for all): ")
    preferred_genres = [g.strip() for g in genres.split(",")] if genres else None
    min_bpm = input("Enter minimum BPM (or press Enter for default): ")
    max_bpm = input("Enter maximum BPM (or press Enter for default): ")
    
    min_bpm = int(min_bpm) if min_bpm else None
    max_bpm = int(max_bpm) if max_bpm else None
    
    return workout_type, duration_minutes, preferred_genres, min_bpm, max_bpm

def choose_music_service():
    print("Choose a music source:")
    print("1. Local database (demo)")
    print("2. Spotify")
    print("3. Apple Music")
    print("4. YouTube Music")
    
    choice = input("Enter the number of your choice: ")
    
    if choice == '1':
        return None
    elif choice == '2':
        return 'spotify'
    elif choice == '3':
        return 'apple_music'
    elif choice == '4':
        return 'youtube_music'
    else:
        print("Invalid choice. Using local database.")
        return None

def main():
    generator = WorkoutPlaylist()
    
    # Ask for music source choice every time the script runs
    service = choose_music_service()
    if service:
        generator.set_api_client(service)
    
    while True:
        try:
            workout_type, duration_minutes, preferred_genres, min_bpm, max_bpm = get_user_input()
            
            playlist = generator.generate_playlist(
                workout_type=workout_type,
                duration_minutes=duration_minutes,
                preferred_genres=preferred_genres,
                min_bpm=min_bpm,
                max_bpm=max_bpm
            )
            
            print(f"\n{workout_type.capitalize()} Workout Playlist:")
            print(format_playlist(playlist))
            
            save_option = input("Do you want to save this playlist? (y/n): ").lower()
            if save_option == 'y':
                filename = input("Enter filename to save (e.g., my_playlist.json): ")
                generator.save_playlist(playlist, filename)
                print(f"Playlist saved to {filename}")
            
            another = input("Generate another playlist? (y/n): ").lower()
            if another != 'y':
                break
        
        except ValueError as e:
            print(f"Error: {e}")
        except FileNotFoundError as e:
            print(f"Error: {e}")

if __name__ == "__main__":
    main()


================================================
FILE: Customizable_Workout_Playlist_Generator/requirements.txt
================================================
spotipy==2.19.0
requests==2.26.0
ytmusicapi==0.22.0


================================================
FILE: Digital Clock/main.py
================================================
from time import strftime
from tkinter import Label, Tk

window = Tk()
window.title("Digital Clock")
window.geometry("300x100")
window.configure(bg="green")
window.resizable(False, False) 

clock_label = Label(
    window, bg="black", fg="green", font=("Arial", 30, "bold"), relief="flat"
)
clock_label.place(x=50, y=50)


def update_label():
    current_time = strftime("%H: %M: %S\n %d-%m-%Y ")
    clock_label.configure(text=current_time)
    clock_label.after(80, update_label)
    clock_label.pack(anchor="center")

update_label()
window.mainloop()

================================================
FILE: Digital Clock/runtime.txt
================================================
python-3.10.7

================================================
FILE: Example README.md
================================================
# Script Name
Short description of package/script
- If package, list of functionalities/scripts it can perform
- If standalone script, short description of script explaining what it achieves

# Description
- If code is not explainable using comments, use this sections to explain your script

# Prerequisites
- List out the libraries imported in the script

# Installing instructions
- Explain how to setup and run your package/script in user's local machine.

# Screenshot
- Display images/gifs/videos of output/result of your script so that users can visualize it.

# Author
Name(s) of author(s).


================================================
FILE: Expense Splitter/README.md
================================================
# Expense Splitter

A simple Python script to split expenses among a group of people.

## Features

- Calculates the share per person based on the total amount and number of people.
- User-friendly prompts and case-insensitive confirmation.

## Usage

1. Clone the repository.
2. Navigate to the project directory.
3. Run the script:
   ```bash
   python main.py


================================================
FILE: Expense Splitter/main.py
================================================
def calculate_split(total_amount: float, number_of_people: int, currency: str) -> None:
    if number_of_people < 1:
        raise ValueError('Number of people should be at least one.')

    # Calculate the share per person
    share_per_person: float = total_amount / number_of_people

    # Print the results
    print(f'Total expenses: {currency}{total_amount:,.2f}')
    print(f'Number of people: {number_of_people}')
    print(f'Each person should pay: {currency}{share_per_person:,.2f}')


def main() -> None:
    try:
        # Input for total amount
        total_amount: float = float(input('Enter the total amount of the expense: '))
        
        # Input for number of people
        number_of_people: int = int(input('Enter the number of people sharing the expense: '))
        
        # Call the function to calculate the split with currency set to rupees
        calculate_split(total_amount, number_of_people, currency="₹")
        
    except ValueError as e:
        print(f'Error: {e}')


# Run the main function
if __name__ == "__main__":
    main()


================================================
FILE: Expense Splitter/runtme.txt
================================================
Python 3.12.3

================================================
FILE: Extractive Text Summarization/readme.md
================================================

# 📝 Advanced Extractive Text Summarization Model

Welcome to the **Advanced Extractive Text Summarization Model**! This project uses **Natural Language Processing (NLP)** techniques to automatically distill essential points from lengthy content, making it an invaluable tool for handling reports, research papers, news articles, and more.

## 🚀 Project Overview

This model leverages NLP to:
- **Extract key sentences** from a body of text.
- **Score sentences** based on their importance using features like **TF-IDF**, sentence length, position, and presence of named entities.
- **Cluster related sentences** via **K-means** to highlight critical points from various thematic groups.

### Why It Matters
In today’s information-dense world, quickly understanding critical points from long documents is essential. This model saves time and boosts productivity by providing concise summaries while preserving core insights.

---

## 📊 Features

1. **Preprocessing**  
   - Cleans and prepares text data for effective summarization.
   
2. **Scoring & Ranking**  
   - Scores sentences based on TF-IDF, sentence structure, and key entities.
   
3. **Clustering & Key Point Extraction**  
   - Uses K-means clustering to group sentences by topic and select key sentences for each group.
   
4. **Summary Generation**  
   - Combines top-ranked sentences from each cluster to create a coherent, impactful summary.

---

## 🔧 How It Works

1. **Data Preprocessing:** Initial cleaning (e.g., removing stop words, punctuation).
2. **Sentence Scoring:** Uses TF-IDF, sentence structure, and named entity recognition to evaluate sentence importance.
3. **K-means Clustering:** Groups related sentences to capture diverse perspectives within the text.
4. **Summarization:** Extracts top sentences across clusters to create a balanced summary.

---

## 🛠️ Installation

1. **Clone the Repository:**
   ```bash
   git clone https://github.com/one-alive/extractive_text_summarization.git
   cd extractive_text_summarization
   ```

2. **Install Dependencies:**
   ```bash
   pip install -r requirements.txt
   ```

---

## ▶️ Usage

1. **Run the Model on a Sample Text:**
   ```bash
   python summarize.py
   ```

2. **Adjust Parameters:** You can tune parameters such as the number of clusters, sentence selection criteria, and summary length for better results based on the text type.

---

## ⚙️ Next Steps

- **Parameter Tuning:** Experiment with different clustering techniques and scoring weights.
- **Expand Dataset Compatibility:** Optimize for specific types of documents like research papers or news articles.
- **Add Fine-Tuning:** Integrate more NLP models to improve summarization accuracy.

---

## 🤝 Contributing

Contributions are welcome! If you have ideas or suggestions, please create a pull request or open an issue.

---

## 📬 Contact

If you have questions or want to explore collaboration opportunities, feel free to reach out!

---

================================================
FILE: Extractive Text Summarization/requirements.txt
================================================
nltk==3.9.1
numpy==2.1.3
scikit_learn==1.5.2
spacy==3.8.2


================================================
FILE: Extractive Text Summarization/summary.py
================================================
import os
import re
import heapq
import numpy as np
from collections import defaultdict
from typing import List, Dict, Tuple, Union
from nltk.tokenize import sent_tokenize
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.cluster import KMeans
import spacy
from nltk.stem import PorterStemmer


class TextSummarization:
    def __init__(self):
        try:
            self.nlp = spacy.load('en_core_web_sm')
        except OSError:
            print("Downloading spaCy model...")
            os.system("python -m spacy download en_core_web_sm")
            self.nlp = spacy.load('en_core_web_sm')

        self.tfidf_vectorizer = TfidfVectorizer(stop_words='english')
        self.stemmer = PorterStemmer()

    def clean_text(self, text: str) -> Tuple[str, str]:
        """Clean and preprocess the text, returning both original and stemmed versions."""
        text = re.sub(r'[^\w\s.,!?]', '', text)  # Keep sentence structure
        cleaned_text = ' '.join(text.split())  # Remove extra whitespace
        stemmed_text = self.stem_text(cleaned_text)
        return cleaned_text, stemmed_text

    def stem_text(self, text: str) -> str:
        """Stem the words in the text."""
        words = text.split()
        stemmed_words = [self.stemmer.stem(word) for word in words]
        return ' '.join(stemmed_words)

    def score_sentences(self, original_sentences: List[str], stemmed_sentences: List[str]) -> Dict[str, float]:
        """Score sentences based on TF-IDF and structural features."""
        tfidf_matrix = self.tfidf_vectorizer.fit_transform(stemmed_sentences)
        sentence_scores = defaultdict(float)

        for i, original_sentence in enumerate(original_sentences):
            score = sum(tfidf_matrix[i, j] for j in tfidf_matrix[i].indices)
            sent_doc = self.nlp(original_sentence)

            # Apply length and positional weighting
            length_factor = min(
                1.0, len(sent_doc) / 20.0) if len(sent_doc) < 20 else 20.0 / len(sent_doc)
            score *= length_factor

            # Position bonuses
            if i < len(original_sentence) * 0.2:
                score *= 1.2
            elif i > len(original_sentence) * 0.8:
                score *= 1.1

            # Bonuses for named entities and important dependencies
            if sent_doc.ents:
                score *= 1.2
            if any(token.dep_ in ['nsubj', 'dobj'] for token in sent_doc):
                score *= 1.1

            sentence_scores[original_sentence] = score

        return sentence_scores

    def extract_key_points(self, original_sentences: List[str], stemmed_sentences: List[str], num_clusters: int = 5) -> List[str]:
        """Extract key points using K-means clustering."""
        num_clusters = min(num_clusters, len(original_sentences))
        if num_clusters < 1:
            return []

        tfidf_matrix = self.tfidf_vectorizer.fit_transform(stemmed_sentences)
        kmeans = KMeans(n_clusters=num_clusters, random_state=42)
        kmeans.fit(tfidf_matrix)

        labeled_sentences = [(orig, stem, label, idx) for idx, (orig, stem, label) in enumerate(
            zip(original_sentences, stemmed_sentences, kmeans.labels_))]
        key_points = []

        for cluster in range(num_clusters):
            cluster_sentences = [
                item for item in labeled_sentences if item[2] == cluster]
            if cluster_sentences:
                cluster_center = kmeans.cluster_centers_[cluster]
                distances = [np.linalg.norm(tfidf_matrix[item[3]].toarray(
                ) - cluster_center) for item in cluster_sentences]
                closest_sentence = cluster_sentences[np.argmin(
                    distances)][0]  # Use original sentence

                sent_doc = self.nlp(closest_sentence)
                if len(sent_doc) >= 5:
                    point = re.sub(r'\s+', ' ', closest_sentence.strip('., '))
                    if len(point.split()) >= 5:
                        # Store with original index
                        key_points.append((point, cluster_sentences[0][3]))

        # Sort key points based on their original position in the text
        key_points.sort(key=lambda x: x[1])
        return [point for point, _ in key_points]

    def summarize(self, text: str, num_sentences: int = 5) -> Dict[str, Union[str, List[str]]]:
        """Generate a comprehensive summary of the text."""
        cleaned_text, stemmed_text = self.clean_text(text)
        original_sentences = sent_tokenize(cleaned_text)
        stemmed_sentences = sent_tokenize(stemmed_text)
        num_sentences = min(num_sentences, len(
            original_sentences)) if original_sentences else 0

        sentence_scores = self.score_sentences(
            original_sentences, stemmed_sentences)
        summary_sentences = heapq.nlargest(
            num_sentences, sentence_scores.items(), key=lambda x: x[1])
        summary_sentences.sort(key=lambda x: original_sentences.index(x[0]))

        summary = ' '.join([sentence for sentence, _ in summary_sentences])
        key_points = self.extract_key_points(
            original_sentences, stemmed_sentences, num_clusters=min(5, len(original_sentences)))

        return {
            'summary': summary,
            'key_points': key_points,
        }


def main(text):
    # Create summarizer instance
    summarizer = TextSummarization()

    # Generate summary
    summary = summarizer.summarize(text)

    print("Summary : ")
    print(summary['summary'])
    
    
    print("------\n")
    
    print("Key Points : ")
    for i,j in enumerate(summary["key_points"]):
        print(f"{i+1}. {j}")
        
    print("------")
    


if __name__ == "__main__":
    main("""NLP is a subfield of computer science and artificial intelligence concerned with interactions between computers and human (natural) languages. It is used to apply machine learning algorithms to text and speech.

For example, we can use NLP to create systems like speech recognition, document summarization, machine translation, spam detection, named entity recognition, question answering, autocomplete, predictive typing and so on.

Nowadays, most of us have smartphones that have speech recognition. These smartphones use NLP to understand what is said. Also, many people use laptops which operating system has a built-in speech recognition.""")


================================================
FILE: Facebook Video Downloader/main.py
================================================
import os, re, requests, wget

root = os.path.dirname(os.path.abspath(__file__))
path = os.path.join(root, "Downloads")
if not os.path.exists(path):
    os.mkdir(path)

link = input("Enter video link: ")
try:
    r = requests.get(link)
    if r.status_code == requests.codes.ok:
        try:
            sd_url = re.search('sd_src:"(.+?)"', r.text)[1]
            url = (
                re.search('hd_src:"(.+?)"', r.text)[1] if "hd_src" in r.text else sd_url
            )
            print("Downloading... Please wait...")
            wget.download(url, path)
        except Exception as e:
            print(e)
    else:
        print("Invalid Link!")

except Exception as e:
    print(e)


================================================
FILE: Facebook Video Downloader/requirements.txt
================================================
requests==2.26.0
wget==3.2

================================================
FILE: Facebook Video Downloader/runtime.txt
================================================
python-3.10.7

================================================
FILE: Gauss Elimination with Partial Pivoting/README.md
================================================
# Implementation of Gauss Elimination with Partial Pivoting
This implementaion is a Gauss Elimination with Partial Pivoting in Python. You can insert a number of lines of your augmented matrix and then, the numbers that compose it.

# Screenshot
Those are some examples:

![Example 1](gauss_example1.jpg)
![Example 2](gauss_example2.jpg)

# Author
[GiovannaRMendes](https://github.com/GiovannaRMendes)

================================================
FILE: Gauss Elimination with Partial Pivoting/main.py
================================================
def gauss_partial(matrix: list, index_column: int):
    index_max_val = index_column

    for i in range(index_column, len(matrix)):
        if matrix[index_column][index_column] < abs(matrix[i][index_column]):
            index_max_val = i

    if index_column != index_max_val:
        matrix[index_column], matrix[index_max_val] = matrix[index_max_val], matrix[index_column]
            

def verify_triangular(matrix: list) -> bool:

    for i in range(len(matrix)):
        for j in range(i, len(matrix)):

            if (j == i and matrix[j][i] == 0) or (j != i and matrix[j][i] != 0):
                return False
        
    return True


def gauss(matrix: list, index: int) -> list:
    
    for j in range(index+1, len(matrix)):
        coefficient = round(matrix[j][index] / matrix[index][index], 2)
        matrix[j][index] = 0

        for k in range(index+1, len(matrix)+1):
            matrix[j][k] = round(matrix[j][k] - coefficient * matrix[index][k], 5)

    return matrix


def resolve_linear_system(matrix: list) -> list:
    sum = 0
    n = len(matrix)
    results = [1] * n

    for i in range(n-1, -1, -1):

        for j in range(n-1, i, -1):
            sum = sum + matrix[i][j]*results[j]

        results[i] = round((matrix[i][n] - sum)/matrix[i][i], 2)
        sum = 0

    return results


def resolve_matrix(matrix: list):

    for i in range(len(matrix)):
        gauss_partial(matrix, i)
        matrix = gauss(matrix, i)

    print('\nThe matrix after Gauss:')

    for line in matrix:
        print("[", end='')
        print(*(f'{val}' for val in line), end='')
        print("]")
        
    if verify_triangular(matrix):

        print("\nThe result of Gauss Elimination with Partial Pivoting:")
        for i, x in enumerate(resolve_linear_system(matrix)):
            print(f'x_{i} = {x}')

    else:
        print("It's impossible to resolve, because it's not a triangular matrix")
        return 0
        

def take_matrix() -> list:

    line = 0
    matrix = []
    max_length = 0

    number_lines = int(input("Please, insert the length of the your matrix: "))
    print("Please, insert only the numbers of the your augmented matrix (separete with espace):")

    for i in range(number_lines):
        
        try:
            line = list(input().split())
            line = list(int(val) for val in line)
    
            if max_length < len(line):
                max_length = len(line)

            matrix.append(line)
        
        except:
            print("This matrix don't exist!!!")
            return 1
        
    if len(matrix) == max_length - 1:
        return matrix
    
    return 0


if __name__ == '__main__':

    matrix = take_matrix()

    if matrix == 0:
        print("It's impossible to resolve")

    else:
        print('The matrix:')

        for line in matrix:
            print("[", end='')
            print(*(f'{val}' for val in line), end='')
            print("]")

        resolve_matrix(matrix)

================================================
FILE: Gauss Elimination with Partial Pivoting/runtime.txt
================================================
python-3.12.6

================================================
FILE: Geographic Distance/README.md
================================================
# Geographic Distance and Travel Time Calculator

This Python script calculates the geodesic distance between two geographic coordinates and estimates travel time based on a given average speed. It uses the geopy library to compute distances.

## Features

-   Input coordinates for two locations (latitude and longitude) interactively.
-   Calculate the distance between the two coordinates in kilometers.
-   Estimate the travel time based on a given average speed (in km/h).

## Prerequisites

-   Python 3.x installed on your system.

## Setup

1. Clone the repository

    ```bash
    git clone https://github.com/king04aman/All-In-One-Python-Projects.git
    cd All-In-One-Python-Projects/Geographic Distance
    ```

2. Create and activate a virtual environment

-   For macOS/Linux:

    ```bash
    python3 -m venv venv
    source venv/bin/activate
    ```

-   For Windows:

    ```bash
    python -m venv venv
    venv\Scripts\activate
    ```

3. Install the required dependencies

    The required packages are listed in requirements.txt. Install them using the following command:

    ```bash
    pip install -r requirements.txt
    ```

    Note: The main dependency is geopy for calculating distances based on geodesic coordinates.

## Usage

1. Run the script:

    ```bash
    python geographic_distance.py
    ```

2. Enter the coordinates (latitude and longitude) of the two locations when prompted.
3. Enter the average speed in km/h to calculate the travel time.

    Example input:

    ```
    Enter the latitude and longitude of the first location (lat1, lon1) Example: 40.7128, -74.006: 52.5200, 13.4050
    Enter the latitude and longitude of the second location (lat2, lon2) Example: 37.7749, -122.4194: 48.8566, 2.3522
    Enter the average speed in km/h Example: 60: 80
    ```

    Example output:

    ```
    Distance between the two coordinates: 878.84 kilometers
    Estimated travel time: 10.99 hours
    ```

## Requirements

Here’s a list of Python dependencies in requirements.txt:

```
geopy==2.2.0
pytest==8.3.3
```


================================================
FILE: Geographic Distance/geographic_distance.py
================================================
from geopy.distance import geodesic


def calculate_distance_and_time(coord1, coord2, avg_speed):
    """
    Calculate the distance between two coordinates and estimate travel time.
    :param coord1: Tuple containing the latitude and longitude of the first location (lat1, lon1)
    :param coord2: Tuple containing the latitude and longitude of the second location (lat2, lon2)
    :param avg_speed: Average speed in km/h for estimating travel time
    :return: Distance in kilometers and estimated travel time in hours
    """

    # Calculate geodesic distance
    distance = geodesic(coord1, coord2).kilometers
    # Estimate travel time (distance / speed)
    travel_time = distance / avg_speed

    return distance, travel_time


def main():
    # Coordinates (latitude, longitude)
    try:
        coord1 = tuple(map(float, input('Enter the latitude and longitude of the first location (lat1, lon1) Example: 40.7128, -74.006: ').split(',')))
        coord2 = tuple(map(float, input('Enter the latitude and longitude of the second location (lat2, lon2) Example: 37.7749, -122.4194: ').split(',')))
    except ValueError as e:
        raise ValueError("Coordinates must be in the format 'lat, lon'") from e

    if not all(-90 <= x <= 90 for x in (coord1[0], coord2[0])) or not all(-180 <= x <= 180 for x in (coord1[1], coord2[1])):
        raise ValueError('Invalid coordinates')

    # Speed in km/h (e.g., driving speed)
    try:
        avg_speed = float(input('Enter the average speed in km/h Example: 60: '))
    except ValueError as e:
        raise ValueError('Average speed must be a number') from e

    if avg_speed <= 0:
        raise ValueError('Average speed must be greater than 0.')

    # Calculate the distance and travel time
    distance, travel_time = calculate_distance_and_time(coord1, coord2, avg_speed)

    print(f'Distance between the two coordinates: {distance:.2f} kilometers')
    print(f'Estimated travel time: {travel_time:.2f} hours')


if __name__ == '__main__':
    main()


================================================
FILE: Geographic Distance/requirements.txt
================================================
geopy==2.4.1
pytest==8.3.3


================================================
FILE: Geographic Distance/runtime.txt
================================================
python-3.12.7

================================================
FILE: Geographic Distance/test_geographic_distance.py
================================================
from unittest.mock import patch

import pytest
from geographic_distance import calculate_distance_and_time, main


def test_calculate_distance_and_time():
    # Test with valid coordinates and speed
    coord1 = (40.7128, -74.006)
    coord2 = (37.7749, -122.4194)
    avg_speed = 60
    distance, travel_time = calculate_distance_and_time(coord1, coord2, avg_speed)
    assert distance > 0
    assert travel_time > 0


def test_calculate_distance_and_time_invalid_speed():
    # Test with invalid speed (zero)
    coord1 = (40.7128, -74.006)
    coord2 = (37.7749, -122.4194)
    avg_speed = 0
    with pytest.raises(ValueError):
        calculate_distance_and_time(coord1, coord2, avg_speed)


def test_calculate_distance_and_time_same_coordinates():
    # Test with same coordinates
    coord1 = (40.7128, -74.006)
    coord2 = (40.7128, -74.006)
    avg_speed = 60
    distance, travel_time = calculate_distance_and_time(coord1, coord2, avg_speed)
    assert distance == 0
    assert travel_time == 0


@pytest.fixture
def mock_input():
    with patch('builtins.input', side_effect=['40.7128, -74.006', '37.7749, -122.4194', '60']):
        yield


def test_main(mock_input, capsys):
    main()
    captured = capsys.readouterr()
    assert 'Distance between the two coordinates:' in captured.out
    assert 'Estimated travel time:' in captured.out


def test_main_invalid_coordinates(mock_input, capsys):
    with patch('builtins.input', side_effect=['abc, def', '37.7749, -122.4194', '60']):
        with pytest.raises(ValueError):
            main()


def test_main_invalid_speed(mock_input, capsys):
    with patch('builtins.input', side_effect=['40.7128, -74.006', '37.7749, -122.4194', 'abc']):
        with pytest.raises(ValueError):
            main()


def test_main_zero_speed(mock_input, capsys):
    with patch('builtins.input', side_effect=['40.7128, -74.006', '37.7749, -122.4194', '0']):
        with pytest.raises(ValueError):
            main()


def test_main_same_coordinates(mock_input, capsys):
    with patch('builtins.input', side_effect=['40.7128, -74.006', '40.7128, -74.006', '60']):
        main()
        captured = capsys.readouterr()
        assert 'Distance between the two coordinates: 0.00 kilometers' in captured.out
        assert 'Estimated travel time: 0.00 hours' in captured.out


================================================
FILE: Gesture-Based-Game-Controller/main.py
================================================
import cv2
import mediapipe as mp
import numpy as np
import time

# Initialize MediaPipe hands module
mp_hands = mp.solutions.hands
hands = mp_hands.Hands()
mp_drawing = mp.solutions.drawing_utils

# Gesture mappings
GESTURES = {
    "forward": "Move Forward",
    "backward": "Move Backward",
    "left": "Move Left",
    "right": "Move Right",
    "up": "Jump"
}

# Define a function to calculate the direction based on landmarks
def detect_direction(landmarks):
    # Get coordinates of wrist and index finger tip
    wrist = landmarks[0]               # Wrist coordinates
    index_finger_tip = landmarks[8]    # Index finger tip

    # Calculate relative positions of index finger to wrist
    x_diff = index_finger_tip.x - wrist.x  # Difference in X-axis
    y_diff = index_finger_tip.y - wrist.y  # Difference in Y-axis

    # Use thresholds to determine the direction
    if abs(x_diff) > abs(y_diff):  # Horizontal movement dominates
        if x_diff > 0.1:  # Index finger is to the right of the wrist
            return "right"
        elif x_diff < -0.1:  # Index finger is to the left of the wrist
            return "left"
    else:  # Vertical movement dominates
        if y_diff > 0.1:  # Fingers are below wrist
            return "backward"
        elif y_diff < -0.1:  # Fingers are above wrist
            return "up"
    
    # If no significant difference in X or Y, assume pointing forward
    return "forward"

# Video capture for hand gesture recognition
cap = cv2.VideoCapture(0)
prev_time = 0  # To implement delay between gesture changes
delay_interval = 1.0  # 1 second delay between actions

while True:
    ret, frame = cap.read()
    if not ret:
        break
    
    # Flip the frame horizontally for natural movement
    frame = cv2.flip(frame, 1)
    frame_rgb = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)
    
    # Detect hands
    results = hands.process(frame_rgb)
    
    landmark_list = []
    
    # If hand landmarks are detected
    if results.multi_hand_landmarks:
        for hand_landmarks in results.multi_hand_landmarks:
            mp_drawing.draw_landmarks(frame, hand_landmarks, mp_hands.HAND_CONNECTIONS)
            
            # Collect hand landmark data
            for lm in hand_landmarks.landmark:
                landmark_list.append(lm)

        # Detect direction based on the landmarks
        direction = detect_direction(landmark_list)

        # Check for time delay between actions
        current_time = time.time()
        if current_time - prev_time > delay_interval:
            print(GESTURES[direction])  # Output corresponding action
            prev_time = current_time
    
    # Display the frame with landmarks
    cv2.imshow('Hand Gesture Recognition', frame)
    
    # Quit if 'q' is pressed
    if cv2.waitKey(1) & 0xFF == ord('q'):
        break

cap.release()
cv2.destroyAllWindows()


================================================
FILE: Gesture-Based-Game-Controller/readme.md
================================================
# Hand Gesture Control Using Computer Vision

This project uses computer vision and machine learning to detect hand gestures and map them to simple game controls like moving forward, left, right, jumping, and moving backward.

The project uses **OpenCV** and **MediaPipe** for hand landmark detection and gesture recognition.

## Features

- Detects hand gestures in real-time.
- Maps gestures to game controls:
  - **Move Forward**: Fingers pointing towards the screen.
  - **Move Left**: Fingers pointing left.
  - **Move Right**: Fingers pointing right.
  - **Move Backward**: Fingers pointing downward.
  - **Jump**: Fingers pointing upward.
- Implements a delay between actions to prevent rapid switching of game controls.

## Requirements

- Python 3.7 or higher
- OpenCV
- MediaPipe
- NumPy




================================================
FILE: Gesture-Based-Game-Controller/requirements.txt
================================================
opencv-python==4.8.0.74
mediapipe==0.10.0
numpy==1.24.2


================================================
FILE: Gesture-Based-Game-Controller/runtime.txt
================================================
python-3.12.7

================================================
FILE: Handwritten-Assignments/main.py
================================================
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Author: Aman Kumar
# Version: 1.0.0

import pywhatkit as pw

text_to_convert = """
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Scelerisque varius morbi enim nunc faucibus. Porta nibh venenatis cras sed felis eget velit. Sem viverra aliquet eget sit amet tellus. Volutpat lacus laoreet non curabitur gravida arcu ac tortor. Scelerisque felis imperdiet proin fermentum leo vel orci porta non. Est ullamcorper eget nulla facilisi etiam dignissim diam quis enim. Vitae turpis massa sed elementum tempus egestas sed. Egestas integer eget aliquet nibh praesent. Risus sed vulputate odio ut enim blandit volutpat maecenas. Vitae congue eu consequat ac felis. Aliquet eget sit amet tellus cras. Vel fringilla est ullamcorper eget nulla facilisi. Tristique senectus et netus et malesuada fames ac. Nullam eget felis eget nunc. Tincidunt praesent semper feugiat nibh sed pulvinar proin gravida hendrerit. Enim eu turpis egestas pretium aenean pharetra magna.
"""

pw.text_to_handwriting(text_to_convert, 'demo.png',[0,0,135])
print("Converted !!")


================================================
FILE: Handwritten-Assignments/runtime.txt
================================================
python-3.10.7

================================================
FILE: Headlight Detection/headlightDetection.py
================================================
from shutil import which
import numpy as np
from matplotlib import pyplot as plt
import cv2, time

def wait(t):
    time.sleep()

#List includes path for images representing differenct scenarios
mlist = ['bus_coming.hpg','going.jpg','both.jpg']

#codition: no vehicle
def scenario(condition):
    image = cv2.imread(condition)
    gray_image = cv2.cvtColor(image,cv2.COLOR_BGR2GRAY)
    cv2.imwrite('gray_image.png',gray_image)
    cv2.imshow('color_image',image)
    blur_image = cv2.blur(gray_image,(15,15))
    cv2.imwrite('blur_image.png',blur_image)
    ret , thresh = cv2.threshold(blur_image,150,255,0)
    contour_image , contours, hierarchy = cv2.findContours(thresh,cv2.RETR_TREE,cv2.CHAIN_APPROX_SIMPLE)
    cv2.drwaContours(blur_image,contours,-1,(0,255,0),3)
    cv2.imshow('blur_image.png',blur_image)
    moments = [cv2.moments(cnt) for cnt in contours]
    y_centroids = [int(round(m['m01']/m['m00'])) for m in moments]
    x = len(y_centroids)
    i=0
    while i<x:
        y_centroids[i] = y_centroids[i]//10

================================================
FILE: Headlight Detection/runtime.txt
================================================
python-3.10.7

================================================
FILE: Helmet Detection/main.py
================================================
from http.client import _DataType
import cv2, random, os, time, imutils
import numpy as np
from tensorflow.keras.models import load_model


os.environ['TF_FORCE_GPU_ALLOW_GROWTH'] = 'true'
net = cv2.dnn.readNet("yolov3-custom_7000.weights","yolov3-custom.cfg")
net.setPreferableBackend(cv2.dnn.DNN_BACKEND_CUDA)
net.setPreferableTarget(cv2.dnn.DNN_TARGET_CUDA)
model = load_model('helmet-nonhelmet_cnn.h5')
print('model loaded!!!')
cap = cv2.VideoCapture('testing videos/test2.mp4')
COLORS = [(0,255,0,),(0,0,255)]

def helmet_or_nonhelmet(helmet_roi):
    try:
        helmet_roi = cv2.resize(helmet_roi,(224,224))
        helmet_roi = np.array(helmet_roi,dtype='float32')
        helmet_roi = helmet_roi.reshape(1,224,224,3)
        helmet_roi = helmet_roi/255.0
        return int(model.predict(helmet_roi)[0][0])
    except:
        pass

layer_names = net.getLayerNames()
output_layers = [layer_names[i[0] -1] for i in net.getUnconnectedOutLayers()]

ret = True

while ret:
    ret, img = cap.read()
    img = imutlis.resize(img,height=5500)


================================================
FILE: Helmet Detection/runtime.txt
================================================
python-3.10.7

================================================
FILE: Image Compression/main.py
================================================
import cv2

img = cv2.imread('input.jpg')
print(img.shape)

k = 5
width = int((img.shape[1])/k)
height = int((img.shape[0])/k)

scaled = cv2.resize(img, (width, height), interpolation=cv2.INTER_AREA)
print(scaled.shape)

cv2.imshow("Output", scaled)
cv2.waitKey(500)
cv2.destroyAllWindows()

cv2.imwrite('resized_image.jpg', scaled)


================================================
FILE: Image Compression/runtime.txt
================================================
python-3.10.7

================================================
FILE: ImageSize Reducer/reduce.py
================================================
import cv2

img = cv2.imread('test.jpg')
print(img.shape)

k = 5
width = int((img.shape[1])/k)
height = int((img.shape[0])/k)

scaled = cv2.resize(img, (width, height), interpolation=cv2.INTER_AREA)
print(scaled.shape)

cv2.imshow("Output_Image", scaled)
cv2.waitKey(500)
cv2.destroyAllWindows()

cv2.imwrite('resized_image.jpg', scaled)


================================================
FILE: ImageSize Reducer/runtime.txt
================================================
python-3.10.7

================================================
FILE: Img-Steganograpy/main.py
================================================
from stegano import lsbset
from stegano.lsbset import generators

# Hide the message in the image
flag="This is sample text msg!"
lets=lsbset.hide("./test.png",flag,generators.eratosthenes())
lets.save("steg.png")

# Show the message from the image
f=open("steg.png","rb")
lsbset.reveal(f,generators.eratosthenes())


================================================
FILE: Img-Steganograpy/runtime.txt
================================================
python-3.10.7


================================================
FILE: LICENSE
================================================
The MIT License (MIT)

Copyright (c) 2023 by Aman Kumar

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

================================================
FILE: Learn-FastAPI/FastAPI-CURD.py
================================================
from fastapi import FastAPI, HTTPException
from pydantic import BaseModel
from typing import List, Optional
from uuid import UUID, uuid4

app = FastAPI()

# Define a Pydantic model for Task
class Task(BaseModel):
    id: Optional[UUID] = None
    title: str
    description: Optional[str] = None
    completed: bool = False

# Initialize an empty list to store tasks
tasks = []

# Create a new task
@app.post("/tasks/", response_model=Task)
def create_task(task: Task):
    task.id = uuid4()  # Assign a UUID to the task
    tasks.append(task)  # Add the task to the tasks list
    return task

# Retrieve all tasks
@app.get("/tasks/", response_model=List[Task])
def read_tasks():
    return tasks

# Retrieve a specific task by ID
@app.get("/tasks/{task_id}", response_model=Task)
def read_task(task_id: UUID):
    for task in tasks:
        if task.id == task_id:
            return task
    
    # Raise HTTPException if task not found
    raise HTTPException(status_code=404, detail="Task not found")

# Update a specific task by ID
@app.put("/tasks/{task_id}", response_model=Task)
def update_task(task_id: UUID, task_update: Task):
    for idx, task in enumerate(tasks):
        if task.id == task_id:
            updated_task = task.copy(update=task_update.dict(exclude_unset=True))
            tasks[idx] = updated_task
            return updated_task
    
    # Raise HTTPException if task not found
    raise HTTPException(status_code=404, detail="Task not found")

# Delete a specific task by ID
@app.delete("/tasks/{task_id}", response_model=Task)
def delete_task(task_id: UUID):
    for idx, task in enumerate(tasks):
        if task.id == task_id:
            return tasks.pop(idx)
    
    # Raise HTTPException if task not found
    raise HTTPException(status_code=404, detail="Task not found")

# Run the FastAPI app
if __name__ == "__main__":
    import uvicorn

    uvicorn.run(app, host="0.0.0.0", port=8000)


================================================
FILE: Learn-FastAPI/FastAPI-Tutorial.py
================================================
from fastapi import Depends, FastAPI, HTTPException, status
from fastapi.security import OAuth2PasswordBearer, OAuth2PasswordRequestForm
from pydantic import BaseModel
from datetime import datetime, timedelta
from jose import JWTError, jwt
from passlib.context import CryptContext

# Constants
SECRET_KEY = ""
ALGORITHM = "HS256"
ACCESS_TOKEN_EXPIRE_MINUTES = 30

# Database simulation
db = {
    "aman": {
        "username": "king04aman",
        "full_name": "Aman Kumar",
        "email": "aman@gmail.com",
        "hashed_password": "$2b$12$HxWHkvMuL7WrZad6lcCfluNFj1/Zp63lvP5aUrKlSTYtoFzPXHOtu",
        "disabled": False
    }
}

# Pydantic models
class Token(BaseModel):
    access_token: str
    token_type: str

class TokenData(BaseModel):
    username: str or None = None

class User(BaseModel):
    username: str
    email: str or None = None
    full_name: str or None = None
    disabled: bool or None = None

class UserInDB(User):
    hashed_password: str

# Password hashing context
pwd_context = CryptContext(schemes=["bcrypt"], deprecated="auto")
# OAuth2 password bearer
oauth2_scheme = OAuth2PasswordBearer(tokenUrl="token")

# FastAPI instance
app = FastAPI()

# Password helper functions
def verify_password(plain_password, hashed_password):
    return pwd_context.verify(plain_password, hashed_password)

def get_password_hash(password):
    return pwd_context.hash(password)

# User authentication functions
def get_user(db, username: str):
    if username in db:
        user_data = db[username]
        return UserInDB(**user_data)

def authenticate_user(db, username: str, password: str):
    user = get_user(db, username)
    if not user:
        return False
    if not verify_password(password, user.hashed_password):
        return False
    return user

# Token creation function
def create_access_token(data: dict, expires_delta: timedelta or None = None):
    to_encode = data.copy()
    if expires_delta:
        expire = datetime.utcnow() + expires_delta
    else:
        expire = datetime.utcnow() + timedelta(minutes=15)
    to_encode.update({"exp": expire})
    encoded_jwt = jwt.encode(to_encode, SECRET_KEY, algorithm=ALGORITHM)
    return encoded_jwt

# Dependency to get current user
async def get_current_user(token: str = Depends(oauth2_scheme)):
    credential_exception = HTTPException(
        status_code=status.HTTP_401_UNAUTHORIZED,
        detail="Could not validate credentials",
        headers={"WWW-Authenticate": "Bearer"}
    )
    try:
        payload = jwt.decode(token, SECRET_KEY, algorithms=[ALGORITHM])
        username: str = payload.get("sub")
        if username is None:
            raise credential_exception
        token_data = TokenData(username=username)
    except JWTError:
        raise credential_exception

    user = get_user(db, username=token_data.username)
    if user is None:
        raise credential_exception

    return user

# Dependency to get current active user
async def get_current_active_user(current_user: UserInDB = Depends(get_current_user)):
    if current_user.disabled:
        raise HTTPException(status_code=400, detail="Inactive user")
    return current_user

# Route to get access token
@app.post("/token", response_model=Token)
async def login_for_access_token(form_data: OAuth2PasswordRequestForm = Depends()):
    user = authenticate_user(db, form_data.username, form_data.password)
    if not user:
        raise HTTPException(
            status_code=status.HTTP_401_UNAUTHORIZED,
            detail="Incorrect username or password",
            headers={"WWW-Authenticate": "Bearer"}
        )
    access_token_expires = timedelta(minutes=ACCESS_TOKEN_EXPIRE_MINUTES)
    access_token = create_access_token(
        data={"sub": user.username},
        expires_delta=access_token_expires
    )
    return {"access_token": access_token, "token_type": "bearer"}

# Route to get current user
@app.get("/users/me/", response_model=User)
async def read_users_me(current_user: User = Depends(get_current_active_user)):
    return current_user

# Route to get current user's items
@app.get("/users/me/items")
async def read_own_items(current_user: User = Depends(get_current_active_user)):
    return [{"item_id": 1, "owner": current_user}]


================================================
FILE: Learn-FastAPI/README.md
================================================
# FastAPI CRUD and Authentication Example

This directory contains two FastAPI applications: one for basic CRUD operations (task management) and another for user authentication using JWT (JSON Web Tokens).

## Overview

1. **Task Management API (`fastapi-curd.py`)**:
   - Implements basic CRUD operations for managing tasks.
   - Tasks have attributes like `id`, `title`, `description`, and `completed`.

2. **User Authentication API (`fastapi-tutorial.py`)**:
   - Implements user registration, login, and token-based authentication.
   - Uses JWT for secure access and stores user information in a simulated database.

## Installation

To run the applications, ensure you have Python and FastAPI installed. You can install FastAPI and Uvicorn using pip:

```bash
pip install fastapi uvicorn python-jose passlib[bcrypt]
```

## Running the Applications

You can run each application separately.

### Task Management API

To run the task management API:

```bash
python fastapi-curd.py
```

The API will be available at `http://localhost:8000/tasks/`.

### User Authentication API

To run the user authentication API:

```bash
python fastapi-tutorial.py
```

The API will be available at `http://localhost:8000/token` for login and `http://localhost:8000/users/me/` for user information.

## API Endpoints

### Task Management API Endpoints

- **Create Task**: `POST /tasks/`
- **Retrieve All Tasks**: `GET /tasks/`
- **Retrieve Specific Task**: `GET /tasks/{task_id}`
- **Update Task**: `PUT /tasks/{task_id}`
- **Delete Task**: `DELETE /tasks/{task_id}`

### User Authentication API Endpoints

- **Token Generation**: `POST /token`
- **Get Current User**: `GET /users/me/`
- **Get Current User's Items**: `GET /users/me/items`

## Author
- [king04aman](https://github.com/king04aman)


================================================
FILE: Mental Health chatbot/Mental_health_bot.py
================================================
import pandas as pd
import numpy as np
import json
import nltk
from nltk.stem import WordNetLemmatizer
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.metrics.pairwise import cosine_similarity
from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import Dense, Dropout
from tensorflow.keras.optimizers import Adam
import os

# Download necessary NLTK data
nltk.download('punkt')
nltk.download('wordnet')

# Initialize lemmatizer
lemmatizer = WordNetLemmatizer()

# Load datasets
try:
    print("Files in current directory:", os.listdir())
    csv_files = [f for f in os.listdir() if f.endswith('.csv') and 'Combined' in f and 'Data' in f]
    if csv_files:
        df = pd.read_csv(csv_files[0])
        print(f"Loaded file: {csv_files[0]}")
        print("DataFrame columns:", df.columns.tolist())
        print("DataFrame shape:", df.shape)
        print(df.head())
    else:
        raise FileNotFoundError("No matching CSV file found")
except FileNotFoundError as e:
    print(f"Error: {str(e)}")
    print("Ensure 'Combined_Data.csv' is in the same directory.")
    print("Current working directory:", os.getcwd())
    exit(1)

# Load intents.json
try:
    with open('intents.json', 'r') as f:
        intents = json.load(f)
except FileNotFoundError as e:
    print(f"Error: {str(e)}. Ensure 'intents.json' is available.")
    exit(1)

# Preprocess text data
def preprocess_text(text):
    tokens = nltk.word_tokenize(str(text).lower())
    return ' '.join([lemmatizer.lemmatize(token) for token in tokens])

# Determine the correct column name for text data
text_column = 'statement' if 'statement' in df.columns else df.columns[0]

df['processed_text'] = df[text_column].apply(preprocess_text)

# Create TF-IDF vectorizer
vectorizer = TfidfVectorizer()
tfidf_matrix = vectorizer.fit_transform(df['processed_text'])

# Prepare data for model training
X, y = [], []

for intent in intents['intents']:
    for pattern in intent['patterns']:
        X.append(preprocess_text(pattern))
        y.append(intent['tag'])

X = vectorizer.transform(X).toarray()
y = pd.get_dummies(y).values

# Ensure X and y have the same shape
assert X.shape[0] == y.shape[0], f"Shape mismatch: X={X.shape}, y={y.shape}"

# Build the model
model = Sequential([
    Dense(128, input_shape=(X.shape[1],), activation='relu'),
    Dropout(0.5),
    Dense(64, activation='relu'),
    Dropout(0.5),
    Dense(y.shape[1], activation='softmax')
])

model.compile(optimizer=Adam(learning_rate=0.01), loss='categorical_crossentropy', metrics=['accuracy'])

# Train the model with error handling
try:
    model.fit(X, y, epochs=200, batch_size=32, verbose=1)
except Exception as e:
    print(f"Error during model training: {str(e)}")
    print(f"X shape: {X.shape}, y shape: {y.shape}")
    raise

# Chatbot function
def chatbot_response(user_input):
    processed_input = preprocess_text(user_input)
    input_vector = vectorizer.transform([processed_input]).toarray()

    # Find similar responses from the dataset
    similarities = cosine_similarity(input_vector, tfidf_matrix)
    most_similar_idx = similarities.argmax()
    response = df.iloc[most_similar_idx][text_column]

    # Classify intent
    intent_probs = model.predict(input_vector)[0]
    intent_idx = intent_probs.argmax()
    intent_tag = list(pd.get_dummies([i['tag'] for i in intents['intents']]).columns)[intent_idx]

    # Get response from intents
    for intent in intents['intents']:
        if intent['tag'] == intent_tag:
            intent_response = np.random.choice(intent['responses'])
            break

    return f"Dataset Response: {response}\n\nIntent Response: {intent_response}"

# Main chat loop
print("Mental Health Chatbot: Hello! I'm here to provide support and resources for mental health. How can I help you today?")
while True:
    user_input = input("You: ")
    if user_input.lower() in ['quit', 'exit', 'bye']:
        print("Mental Health Chatbot: Take care! Remember, it's okay to seek help when you need it.")
        break
    response = chatbot_response(user_input)
    print("Mental Health Chatbot:", response)



================================================
FILE: Mental Health chatbot/README_BOT.md
================================================
# Mental Health Chatbot

This project implements a chatbot designed to provide support and information related to mental health. It uses natural language processing and machine learning techniques to understand user input and generate appropriate responses.

## Features

- Sentiment analysis of user input
- Personalized responses based on user's emotional state
- Information provision on various mental health topics
- Supportive and empathetic conversation

## Installation

1. Clone this repository:
   ```
   git clone https://github.com/Ashutoshdas-dev/All-In-One-Python-Projects
   cd All-In-One-Python-Projects/Mental Health Chatbot
   ```

2. Set up a virtual environment:
   ```
   python -m venv venv
   ```

3. Activate the virtual environment:
   - On Windows:
     ```
     venv\Scripts\activate
     ```
   - On macOS and Linux:
     ```
     source venv/bin/activate
     ```

4. Install the required dependencies:
   ```
   pip install -r requirements.txt
   ```

## Usage

1. Ensure your virtual environment is activated (see step 3 in Installation).

2. Run the main script:
   ```
   python mental_health_chatbot.py
   ```

3. Follow the prompts to interact with the chatbot.

4. Type 'quit' or 'exit' to end the conversation.

5. When you're done, deactivate the virtual environment:
   ```
   deactivate
   ```

## Datasets

This project utilizes the following datasets for training and improving the chatbot's responses:

1. [Sentiment Analysis for Mental Health](https://www.kaggle.com/datasets/suchintikasarkar/sentiment-analysis-for-mental-health)
   - Description: This dataset contains text data labeled with sentiment for mental health-related content.
   - Use: Helps in training the sentiment analysis component of the chatbot.

2. [Mental Health Conversational Data](https://www.kaggle.com/datasets/elvis23/mental-health-conversational-data)
   - Description: This dataset includes conversations related to mental health topics.
   - Use: Aids in training the chatbot to generate more natural and context-appropriate responses.




================================================
FILE: Mental Health chatbot/requirements.txt
================================================
pandas
numpy
nltk
scikit-learn
tensorflow


================================================
FILE: Merge PDFs/merge.py
================================================
from PyPDF2 import PdfFileMerger


def by_appending():
    merger = PdfFileMerger()
    f1 = open("testPDF1.pdf", "rb")
    merger.append(f1)
    merger.append("testPDF12.pdf")

    merger.write("mergedPDF.pdf")

def by_inserting():
    merger = PdfFileMerger()
    merger.append("testPDF1.pdf")
    merger.merge(0, "testPDF2.pdf")
    merger.write("mergedPDF.pdf")


if __name__ == "__main__":
    by_appending()
    by_inserting()


================================================
FILE: Merge PDFs/runtime.txt
================================================
python-3.10.7

================================================
FILE: MobileNumber Tracker/track.py
================================================
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Author: Aman Kumar
# Version: 1.0.0 

import phonenumbers
from phonenumbers import timezone, carrier, geocoder

number = input("Enter number to track (with +91): ")
phone = phonenumbers.parse(number)
time = timezone.time_zones_for_number(phone)
carr = carrier.name_for_number(phone, 'en')
reg = geocoder.description_for_number(phone, 'en')

print("STD Code: ", phone.country_code)
print("Number: ", phone.national_number)
print("Region: ", time)
print("Carrier: ", carr)
print("Country: ", reg)


================================================
FILE: Mood Based Music Recommender/Emosic-Spoti.py
================================================
import spotipy
from spotipy.oauth2 import SpotifyClientCredentials
import random

# Authentication - Replace with your credentials
CLIENT_ID = 'your_spotify_client_id'
CLIENT_SECRET = 'your_spotify_client_secret'

# Connect to Spotify API
auth_manager = SpotifyClientCredentials(client_id=CLIENT_ID, client_secret=CLIENT_SECRET)
sp = spotipy.Spotify(auth_manager=auth_manager)

# Dictionary to map emotions to musical characteristics
emotion_to_genre = {
    'happy': ['pop', 'dance', 'indie'],
    'sad': ['acoustic', 'blues', 'piano'],
    'angry': ['metal', 'rock', 'punk'],
    'relaxed': ['ambient', 'chill', 'classical'],
    'energetic': ['electronic', 'hip-hop', 'funk'],
    'anxious': ['ambient', 'classical', 'jazz'],
    'cheerful': ['pop', 'indie', 'reggae'],
    'stressed': ['jazz', 'chill', 'lo-fi'],
    'dreamy': ['dream-pop', 'ambient', 'shoegaze'],
    'excited': ['dance', 'electronic', 'pop'],
    'bored': ['alternative', 'indie', 'chill'],
    'nostalgic': ['classic rock', 'folk', 'retro'],
    'hopeful': ['pop', 'inspirational', 'uplifting'],
    'content': ['soft rock', 'acoustic', 'country'],
    'romantic': ['pop', 'r&b', 'soul'],
}

# Function to recommend tracks based on emotion
def recommend_tracks(emotion):
    genres = emotion_to_genre.get(emotion.lower(), ['pop'])  # Default to 'pop' if emotion is not found
    selected_genre = random.choice(genres)

    # Fetch recommendations from Spotify
    results = sp.recommendations(seed_genres=[selected_genre], limit=10)  # Increase limit for more results
    tracks = results['tracks']
    
    playlist = []
    for track in tracks:
        track_info = {
            'name': track['name'],
            'artist': track['artists'][0]['name'],
            'url': track['external_urls']['spotify']
        }
        playlist.append(track_info)
    
    return playlist, genres

# Function to get maximum length of strings in a list of dictionaries
def get_max_lengths(playlist):
    max_name_length = max(len(song['name']) for song in playlist) if playlist else 0
    max_artist_length = max(len(song['artist']) for song in playlist) if playlist else 0
    max_url_length = max(len(song['url']) for song in playlist) if playlist else 0
    return max_name_length, max_artist_length, max_url_length

# Main loop for user input
while True:
    emotion = input("\nEnter your emotion (happy, sad, angry, relaxed, energetic, anxious, cheerful, stressed, dreamy, excited, bored, nostalgic, hopeful, content, romantic) or type 'exit' to quit: ").strip().lower()
    
    if emotion == 'exit':
        print("Goodbye my Love!!!")
        break

    # Get playlist based on the emotion
    playlist, genres = recommend_tracks(emotion)

    # Get maximum lengths for formatting
    max_name_length, max_artist_length, max_url_length = get_max_lengths(playlist)

    # Set a minimum width for columns to ensure proper alignment
    min_name_length = max(20, max_name_length)
    min_artist_length = max(15, max_artist_length)
    min_url_length = 35  # Fixed width for URL

    # Display the recommended playlist
    if emotion not in emotion_to_genre:
        print("The emotion you entered is NOT in the list, so we will show you pop music instead.")
    
    print(f"Here are some songs for your '{emotion}' mood:" if emotion in emotion_to_genre else "Here are some pop songs for you:")
    print(f"STT | Song Name{' ' * (min_name_length - 9)} | Artist{' ' * (min_artist_length - 6)} | URL")
    print("-" * (11 + max_name_length + max_artist_length + max_url_length))
    
    for idx, song in enumerate(playlist, 1):
        print(f"{idx:<3} | {song['name']:<{min_name_length}} | {song['artist']:<{min_artist_length}} | {song['url']}")


================================================
FILE: Mood Based Music Recommender/README.md
================================================
# Music Recommendation Based on Emotion

A Python script that recommends music playlists based on user-inputted emotions using the Spotify API. The script fetches songs that match the user's mood and provides a playlist with links to each song.

## Features

- Recommend songs based on various emotions.
- Integrates with Spotify's Web API to fetch song recommendations.

## Setup

### 1. Set Up Spotify API

To use this script, you will need to create a Spotify Developer account and register an app to obtain your Client ID and Client Secret. Follow the instructions [here](https://developer.spotify.com/documentation/general/guides/authorization/app-settings/) to get your credentials.

Here is an example:

![alt text](image.png)

### 2. Install Required Libraries

Make sure you have the following Python libraries installed:

    ```bash
    pip install spotipy
    pip install requests
    ```


### 3. Run the Script

**Notes:**
- Replace **your_spotify_client_id** and **your_spotify_client_secret** in the script with your actual Spotify API credentials.
- You can extend the emotion_to_genre dictionary with more emotions and genres.
- You can modify the limit=10 in the Spotify recommendations query to change the number of recommended songs.

To run the script, use the following command:

    ```bash
    python Emosic-Spoti.py
    ```

**Usage**

After running the script, enter an emotion from the list below to get a music playlist:

- happy
- sad
- angry
- relaxed
- energetic
- anxious
- cheerful
- stressed
- dreamy
- excited
- bored
- nostalgic
- hopeful
- content
- romantic

  Type 'exit' to quit the program.

If the Emotion you enter is NOT in the list, so we will show **pop** music instead.

**How It Works**

- **Authentication**: The script uses the SpotifyClientCredentials class to handle authentication with the Spotify API.
- **Emotion-to-Genre Mapping**: The script maps emotions to corresponding music genres using a predefined dictionary.
- **Track Recommendations**: The script queries the Spotify API to fetch song recommendations based on the selected genre.
- **User Input**: The user inputs their emotion, and the script fetches and displays a playlist of matching songs.

================================================
FILE: Mood Based Music Recommender/requirement.txt
================================================
requests==2.32.3
spotipy==2.24.0


================================================
FILE: Movie Scraper/runtime.txt
================================================
python-3.10.7

================================================
FILE: Movie Scraper/scrape.py
================================================
from bs4 import BeautifulSoup
import requests
from fake_useragent import UserAgent

def requestUrl_and_bs4(url:str):
    # All request and parser goes through here
    agents = UserAgent().random
    user_agent={"User-Agent": agents}

    # Fixed the requests (changed status code from 403 to 200) 
    html = requests.get(url, headers=user_agent)
    soup = BeautifulSoup(html.text, 'html.parser')

    return soup


def getMovieDetails(movieName:str):
    url = 'https://www.imdb.com'
    query = '/search/title?title='
    movieDetails = {}
    movienamequery = query+'+'.join(movieName.strip().split(' '))
    website_url = url+movienamequery+'&title_type=feature'

    bs = requestUrl_and_bs4(website_url)

    result = bs.find('a', {'class': 'ipc-title-link-wrapper'})
    if result is None:
        return None

    movielink = url+result.attrs['href']

    bs = requestUrl_and_bs4(movielink)

    # Fix the movie name
    movieDetails['name'] = bs.find('h1', {'data-testid': 'hero__pageTitle'}).text

    # Fix year, runtime
    box_one = bs.find('div', {'class': 'sc-b7c53eda-0 dUpRPQ'}).ul
    box = box_one.find_all('li')
    try:
        movieDetails['year'] = box[0].text
    except AttributeError:
        movieDetails['year'] = 'Not available'

    # Fix genres
    box_two = bs.find('div', {'data-testid': "genres"})
    movieDetails['genres'] = [
       i.text for i in box_two.select('div.ipc-chip-list__scroller>a>span')]
    
    # Fix ratings
    try:
        movieDetails['rating'] = f"{bs.find(
            'div', {'data-testid': 'hero-rating-bar__aggregate-rating__score'}).span.text}/10 ({bs.find('div', {'class': 'sc-bde20123-3 gPVQxL'}).text})"
        movieDetails['runtime'] = box[2].text.strip()
    except AttributeError:
        movieDetails['rating'] = 'Not yet rated'
        movieDetails['runtime'] = 'Not available'

    # To get movie release date
    movie_release_dates_url= f"{url}{box[0].a.attrs['href']}" 
    soup = requestUrl_and_bs4(movie_release_dates_url)

    movieDetails['release_date'] = soup.select_one('#rel_1 > div > ul > li > span.ipc-metadata-list-item__list-content-item').text

    creditSummary = bs.select('div.ipc-metadata-list-item__content-container > ul')

    movieDetails['directors'] = [i.text for i in creditSummary[0].select('li>a')]
    
    try:
        movieDetails['cast'] = [i.text for i in creditSummary[2].select('li>a')]
        movieDetails['writers'] = [i.text for i in creditSummary[1].select('li>a')]

    except IndexError:
        movieDetails['cast']=movieDetails['writers']
        movieDetails['writers']='Not found'

    movieDetails['plot'] = bs.find('span', {'data-testid': 'plot-l'}).text.strip()
   
    return movieDetails

def main():
    movieName = input('Enter the movie name : \n')
    movieDetails = getMovieDetails(movieName)
    if movieDetails is None:
        print('No movie found with given name!!!!!')
        quit()
    print('\n{movie} ({year})'.format(
        movie=movieDetails['name'], year=movieDetails['year']))
    print('Rating:', movieDetails['rating'])
    print('Runtime:', movieDetails['runtime'])
    print('Release Date:', movieDetails['release_date'])
    print('Genres:', ', '.join(movieDetails['genres']))
    print('Director:', ', '.join(movieDetails['directors']))
    print('Writer:', ', '.join(movieDetails['writers']))
    print('Cast:', ', '.join(movieDetails['cast']))
    print('Plot Summary:\n', movieDetails['plot'])

if __name__ == "__main__":
    main()


================================================
FILE: My-Personal-Journal/README.md
================================================
# Personal Journal

A simple web-based application for maintaining a personal journal. Users can create entries, tag them, and search through past entries by date or keywords. The application is built using Flask and SQLite for a lightweight and efficient experience.

## Features

- **Add New Entries**: Users can add journal entries with mood, content, and tags.
- **Search Entries**: Search through entries using keywords or specific dates.
- **Tag Management**: Create and view tags associated with each entry, and filter entries by tags.
- **User-Friendly Interface**: A clean and professional UI for easy navigation and use.

## Technologies Used

- Python
- Flask
- SQLite
- HTML/CSS

## Installation

1. **Clone the Repository**:
   ```bash
   git clone <repository-url>
   cd your_project

2. **Install Required Packages: Make sure you have Python installed (preferably Python 3). Install the required packages using pip**:
    ```bash
    pip install -r requirements.txt

3. **Run the Application: Start the Flask application**:
    ```bash
    python app.py

4. **Access the App: Open your web browser and navigate to http://127.0.0.1:8080 to access the application.**


================================================
FILE: My-Personal-Journal/app.py
================================================
from flask import Flask, render_template, request, redirect, url_for
from journal_app import add_entry, search_entries
from datetime import datetime
import sqlite3

app = Flask(__name__)

# Route to show the home page
@app.route('/')
def index():
    return render_template('index.html')

# Route to add a new journal entry
@app.route('/add', methods=['GET', 'POST'])
def add():
    if request.method == 'POST':
        mood = request.form['mood']
        content = request.form['content']
        tags = request.form['tags']
        add_entry("user_1", mood, content, tags)
        return redirect(url_for('index'))
    return render_template('add.html')

# Route to search journal entries


@app.route('/search', methods=['GET', 'POST'])
def search():
    if request.method == 'POST':
        search_input = request.form['search_term']

        # Try to parse the input as a date
        try:
            search_date = datetime.strptime(search_input, '%Y-%m-%d').date()
            results = search_entries("user_1", date=search_date)
        except ValueError:
            # If parsing fails, treat it as a search term
            results = search_entries("user_1", search_term=search_input)

        return render_template('search_results.html', results=results)

    return render_template('search.html')


# Route to list all unique tags
@app.route('/tags')
def list_tags():
    conn = sqlite3.connect('journal.db')
    cursor = conn.cursor()

    # Fetch unique tags from all entries
    cursor.execute("SELECT DISTINCT tags FROM journal_entries")
    tags_data = cursor.fetchall()
    conn.close()

    # Flatten the tags and remove duplicates
    tags = set()
    for row in tags_data:
        if row[0]:
            tags.update(tag.strip() for tag in row[0].split(','))

    return render_template('tags.html', tags=sorted(tags))

# Route to show journal entries by tag
@app.route('/tags/<tag>')
def entries_by_tag(tag):
    conn = sqlite3.connect('journal.db')
    cursor = conn.cursor()

    # Search for entries that contain the selected tag
    cursor.execute("SELECT * FROM journal_entries WHERE tags LIKE ?", ('%' + tag + '%',))
    results = cursor.fetchall()
    conn.close()

    return render_template('search_results.html', results=results)

if __name__ == '__main__':
    app.run(debug=True, port=8080)


================================================
FILE: My-Personal-Journal/database.py
================================================
from sqlalchemy.orm import sessionmaker
from models import JournalEntry, Base
from sqlalchemy import create_engine

engine = create_engine('sqlite:///journal.db')
Base.metadata.create_all(engine)
Session = sessionmaker(bind=engine)
session = Session()

def add_entry(user_id, mood, content, tags):
    entry = JournalEntry(user_id=user_id, mood=mood, content=content, tags=tags)
    session.add(entry)
    session.commit()

def search_entries(user_id, search_term=None, date=None):
    query = session.query(JournalEntry).filter(JournalEntry.user_id == user_id)
    if search_term:
        query = query.filter(JournalEntry.content.contains(search_term))
    if date:
        query = query.filter(JournalEntry.date == date)
    return query.all()


================================================
FILE: My-Personal-Journal/journal_app.py
================================================
import sqlite3
from datetime import datetime

DB_NAME = "journal.db"

def connect_db():
    return sqlite3.connect(DB_NAME)

def create_table():
    with connect_db() as conn:
        cursor = conn.cursor()
        cursor.execute('''
            CREATE TABLE IF NOT EXISTS journal_entries (
                id INTEGER PRIMARY KEY AUTOINCREMENT,
                user_id TEXT,
                date TEXT,
                mood TEXT,
                content TEXT,
                tags TEXT
            )
        ''')
        conn.commit()

def add_entry(user_id, mood, content, tags):
    with connect_db() as conn:
        cursor = conn.cursor()
        cursor.execute('''
            INSERT INTO journal_entries (user_id, date, mood, content, tags)
            VALUES (?, ?, ?, ?, ?)
        ''', (user_id, datetime.now().strftime('%Y-%m-%d %H:%M:%S'), mood, content, tags))
        conn.commit()

def search_entries(user_id, search_term=None, date=None):
    with connect_db() as conn:
        cursor = conn.cursor()

        if search_term:
            query = '''
                SELECT * FROM journal_entries 
                WHERE user_id = ? AND (content LIKE ? OR tags LIKE ?)
            '''
            cursor.execute(query, (user_id, f'%{search_term}%', f'%{search_term}%'))
        elif date:
            query = '''
                SELECT * FROM journal_entries 
                WHERE user_id = ? AND date(date) = ?
            '''
            cursor.execute(query, (user_id, date.strftime('%Y-%m-%d')))
        else:
            return []

        return cursor.fetchall()

# Create the journal table at the start
create_table()


================================================
FILE: My-Personal-Journal/requirements.txt
================================================
flask
sqlalchemy
# sqlite3
bcrypt
pandas
matplotlib
# tkinter
flask

================================================
FILE: My-Personal-Journal/static/style.css
================================================
/* General Styles */
body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f9;
    color: #333;
}

h1, h2, h3, h4, h5, h6 {
    color: #2c3e50;
    text-align: center;
}

/* Header */
header {
    background: #2980b9;
    color: white;
    padding: 20px 0;
}

/* Main Content */
.container {
    max-width: 1100px;
    margin: 20px auto;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.1);
    text-align: center; /* Center text within the container */
}

/* Button Styles */
.button-container {
    display: flex;
    justify-content: center; /* Center the buttons */
    flex-direction: column; /* Stack buttons vertically */
    gap: 20px; /* Space between buttons */
    margin-top: 30px; /* Add margin to the top */
}

.button {
    display: inline-block;
    padding: 15px 30px;
    background-color: #2980b9;
    color: white;
    border-radius: 4px;
    text-decoration: none;
    font-size: 1.2rem;
    transition: background-color 0.3s ease;
}

.button:hover {
    background-color: #3498db;
}

/* Footer */
footer {
    text-align: center;
    margin-top: 20px;
    padding: 20px;
    background-color: #2980b9;
    color: white;
}

p {
    line-height: 1.6;
    font-size: 1rem;
}

a {
    color: #3498db;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Header */
header {
    background: #2980b9;
    color: white;
    padding: 20px 0;
    text-align: center;
}

/* Main Content */
.container {
    max-width: 1100px;
    margin: 20px auto;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.1);
}

h1 {
    font-size: 2rem;
    margin-bottom: 20px;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px; /* Space between form groups */
    text-align: left; /* Align labels and inputs to the left */
}

label {
    display: block; /* Ensure labels are on separate lines */
    margin-bottom: 5px; /* Space between label and input */
}

/* Form Styles */
form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

form input[type="text"],
form textarea {
    padding: 10px;
    font-size: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

form textarea {
    resize: vertical;
}

form input[type="submit"] {
    background-color: #2980b9;
    color: white;
    border: none;
    padding: 10px;
    display:flex;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 4px;
}

form input[type="submit"]:hover {
    background-color: #3498db;
}

/* Tag List */
ul {
    list-style: none;
    padding: 0;
    display: flex;
    justify-content: center; /* Centers the tags horizontally */
    flex-wrap: wrap; /* Allows the tags to wrap if they exceed the width */
    gap: 10px;
}

ul li {
    display: inline-block;
    margin-right: 10px;
}

ul li a {
    display: inline-block;
    padding: 10px 20px;
    background-color: #2980b9;
    color: white;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

ul li a:hover {
    background-color: #3498db;
}

/* Search Results */
.search-results {
    margin-top: 20px;
}

.search-results p {
    padding: 10px;
    background: #ecf0f1;
    border-left: 5px solid #2980b9;
    margin-bottom: 10px;
}

hr {
    border: 0;
    height: 1px;
    background: #ddd;
    margin: 20px 0;
}

/* Footer */
footer {
    text-align: center;
    margin-top: 20px;
    padding: 20px;
    background-color: #2980b9;
    color: white;
}

input[type="text"],
textarea,
select {
    width: 100%; /* Take full width of the container */
    padding: 10px; /* Add padding for comfort */
    border: 1px solid #ccc; /* Border style */
    border-radius: 4px; /* Rounded corners */
    box-sizing: border-box; /* Include padding in width */
}

textarea {
    height: 100px; /* Set a height for the textarea */
}
/* Search Results Styles */
.results {
    margin-top: 30px; /* Space above search results */
    text-align: left; /* Align results to the left */
}

.results ul {
    list-style-type: none; /* Remove default list styles */
    padding: 0; /* Remove padding */
}

.results li {
    background-color: #f4f4f9; /* Light background for entries */
    border: 1px solid #ccc; /* Border for each entry */
    border-radius: 4px; /* Rounded corners */
    padding: 10px; /* Padding for comfort */
    margin-bottom: 15px; /* Space between entries */
}

================================================
FILE: My-Personal-Journal/templates/add.html
================================================
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Add New Entry</title>
    <link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='style.css') }}">
</head>
<body>
    <header>
        <h1>Add New Journal Entry</h1>
    </header>
    <div class="container">
        <form action="/add" method="post">
            <div class="form-group">
                <label for="title">Title:</label>
                <input type="text" id="title" name="title" required>
            </div>
            <div class="form-group">
                <label for="content">Content:</label>
                <textarea id="content" name="content" required></textarea>
            </div>
            <div class="form-group">
                <label for="mood">Mood:</label>
                <select id="mood" name="mood" required>
                    <option value="">Select Mood</option>
                    <option value="happy">Happy</option>
                    <option value="sad">Sad</option>
                    <option value="neutral">Neutral</option>
                    <option value="excited">Excited</option>
                    <option value="angry">Angry</option>
                </select>
            </div>
            <div class="form-group">
                <label for="tags">Tags:</label>
                <input type="text" id="tags" name="tags" placeholder="Comma-separated tags">
            </div>
            <button type="submit" class="button">Save Entry</button>
        </form>
    </div>
    <footer>
        <p>&copy; 2024 Personal Journal</p>
    </footer>
</body>
</html>


================================================
FILE: My-Personal-Journal/templates/index.html
================================================
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Personal Journal</title>
    <link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='style.css') }}">
</head>
<body>
    <header>
        <h1 style="color:white;">Welcome to Your Personal Journal</h1>
    </header>
    <div class="container">
        <div class="button-container">
            <a class="button" href="/add">Add New Entry</a>
            <a class="button" href="/search">Search Entries</a>
            <a class="button" href="/tags">View All Tags</a>
        </div>
    </div>
    <footer>
        <p>&copy; 2024 Personal Journal</p>
    </footer>
</body>
</html>


================================================
FILE: My-Personal-Journal/templates/search.html
================================================
<!DOCTYPE html>
<html>
<head>
    <title>Search Journal Entries</title>
    <link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='style.css') }}">

</head>
<body>
    <div class="container">
        <h1>Search Journal Entries</h1>
        <form method="POST">
            Search by keyword or date (YYYY-MM-DD): <input type="text" name="search_term"><br>
            <input type="submit" value="Search">
        </form>
</body>
</html>


================================================
FILE: My-Personal-Journal/templates/search_results.html
================================================
<!DOCTYPE html>
<html>
<head>
    <title>Search Results</title>
    <link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='style.css') }}">

</head>
<body>
    <h1>Journal Entries</h1>
   
    <div class="container">
         {% for result in results %}
        <p>Date: {{ result[2] }}, Mood: {{ result[3] }}, Tags: {{ result[5] }}</p>
            <p>{{ result[4] }}</p>
            <hr>
        {% else %}
            <p>No entries found.</p>
        {% endfor %}
    </div>
        
</body>
</html>


================================================
FILE: My-Personal-Journal/templates/tags.html
================================================
<!DOCTYPE html>
<html>
<head>
    <title>Tags</title>
    <link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='style.css') }}">

</head>
<body>
    <h1>Tags</h1>
    <ul>
        {% for tag in tags %}
            <li><a href="/tags/{{ tag }}">{{ tag }}</a></li>
        {% else %}
            <li>No tags found.</li>
        {% endfor %}
    </ul>
</body>
</html>


================================================
FILE: My-Personal-Journal/ui.py
================================================
# from main import add_entry, search_entries
# import datetime

# def display_menu():
#     print("\n=== My Personal Journal ===")
#     print("1. Create New Journal Entry")
#     print("2. Search Journal Entries")
#     print("3. Exit")

# def get_mood():
#     mood = None
#     while mood not in ["happy", "sad", "neutral"]:
#         mood = input("How are you feeling today? (happy, sad, neutral): ").lower()
#     return mood

# def get_tags():
#     tags = input("Add tags (comma-separated, e.g., work, personal): ")
#     return tags

# def create_new_entry(user_id):
#     mood = get_mood()
#     content = input("Write your journal entry: ")
#     tags = get_tags()
#     add_entry(user_id, mood, content, tags)
#     print("Your entry has been saved!")

# def search_journal_entries(user_id):
#     print("\nSearch Entries")
#     print("1. Search by keyword")
#     print("2. Search by date")
#     choice = input("Choose a search option: ")

#     if choice == '1':
#         search_term = input("Enter a keyword to search for: ")
#         results = search_entries(user_id, search_term=search_term)
#     elif choice == '2':
#         date_str = input("Enter a date (YYYY-MM-DD) to search: ")
#         try:
#             date = datetime.datetime.strptime(date_str, '%Y-%m-%d')
#         except ValueError:
#             print("Invalid date format. Please use YYYY-MM-DD.")
#             return
#         results = search_entries(user_id, date=date)
#     else:
#         print("Invalid option.")
#         return

#     if results:
#         for entry in results:
#             print(f"\nDate: {entry[2]}")
#             print(f"Mood: {entry[3]}")
#             print(f"Tags: {entry[5]}")
#             print(f"Entry: {entry[4]}")
#             print("-" * 40)
#     else:
#         print("No entries found for your search criteria.")

# def main_ui():
#     user_id = input("Enter your user ID to start: ")

#     while True:
#         display_menu()
#         choice = input("Select an option (1-3): ")

#         if choice == '1':
#             create_new_entry(user_id)
#         elif choice == '2':
#             search_journal_entries(user_id)
#         elif choice == '3':
#             print("Goodbye!")
#             break
#         else:
#             print("Invalid choice. Please try again.")

# if __name__ == "__main__":
#     main_ui()
import tkinter as tk
from tkinter import messagebox
from journal_app import add_entry, search_entries
from datetime import datetime

class JournalApp(tk.Tk):
    def __init__(self):
        super().__init__()

        self.title("Personal Journal")
        self.geometry("400x400")

        self.label = tk.Label(self, text="Personal Journal", font=("Helvetica", 16))
        self.label.pack(pady=10)

        self.add_button = tk.Button(self, text="Add New Entry", command=self.add_entry)
        self.add_button.pack(pady=5)

        self.search_button = tk.Button(self, text="Search Entries", command=self.search_entries)
        self.search_button.pack(pady=5)

    def add_entry(self):
        self.new_window = tk.Toplevel(self)
        self.new_window.title("Add New Entry")

        mood_label = tk.Label(self.new_window, text="Mood (happy, sad, neutral):")
        mood_label.pack(pady=5)
        self.mood_entry = tk.Entry(self.new_window)
        self.mood_entry.pack(pady=5)

        content_label = tk.Label(self.new_window, text="Write your journal entry:")
        content_label.pack(pady=5)
        self.content_entry = tk.Text(self.new_window, height=5, width=30)
        self.content_entry.pack(pady=5)

        tags_label = tk.Label(self.new_window, text="Tags (comma-separated):")
        tags_label.pack(pady=5)
        self.tags_entry = tk.Entry(self.new_window)
        self.tags_entry.pack(pady=5)

        submit_button = tk.Button(self.new_window, text="Submit", command=self.save_entry)
        submit_button.pack(pady=10)

    def save_entry(self):
        mood = self.mood_entry.get()
        content = self.content_entry.get("1.0", tk.END)
        tags = self.tags_entry.get()

        if mood and content:
            add_entry("user_1", mood, content, tags)
            messagebox.showinfo("Success", "Journal entry saved!")
            self.new_window.destroy()
        else:
            messagebox.showwarning("Input Error", "Please fill in all fields.")

    def search_entries(self):
        self.search_window = tk.Toplevel(self)
        self.search_window.title("Search Entries")

        search_label = tk.Label(self.search_window, text="Search by keyword or date (YYYY-MM-DD):")
        search_label.pack(pady=5)
        self.search_entry = tk.Entry(self.search_window)
        self.search_entry.pack(pady=5)

        search_button = tk.Button(self.search_window, text="Search", command=self.perform_search)
        search_button.pack(pady=10)

    def perform_search(self):
        search_term = self.search_entry.get()
        results = search_entries("user_1", search_term=search_term)

        if results:
            result_window = tk.Toplevel(self)
            result_window.title("Search Results")

            for result in results:
                result_label = tk.Label(result_window, text=f"Date: {result[2]}, Mood: {result[3]}, Tags: {result[5]}")
                result_label.pack()
                content_label = tk.Label(result_window, text=f"Entry: {result[4]}")
                content_label.pack(pady=5)
        else:
            messagebox.showinfo("No Results", "No journal entries found.")

if __name__ == "__main__":
    app = JournalApp()
    app.mainloop()


================================================
FILE: Notepad/main.py
================================================
from tkinter import *
from tkinter import filedialog, messagebox

root = Tk()
root.geometry("700x500")
root.title("Aman's Notepad")

def save_file():
    open_file = filedialog.asksaveasfile(mode='w', defaultextension=".txt")
    if open_file is None:
        return
    text = str(entry.get(1.0, END))
    open_file.write(text)
    open_file.close()

def clear():
    messagebox.showinfo("Cleared", "Cleared all contents !")
    entry.delete(1.0, END)

def open_file():
    file = filedialog.askopenfile(mode='r', filetype=[('text files', '*.txt')])
    if file is not None:
        content = file.read()
    entry.insert(INSERT, content)

b1 = Button(root, text="Save", command=save_file)
b1.place(x=10, y=10)

b2 = Button(root, text="Clear", command=clear)
b2.place(x=70, y=10)

b3 = Button(root, text="Open", command=open_file)
b3.place(x=120, y=10)

entry = Text(root, height=60, width=70, wrap=WORD, bg="black", fg="green", selectbackground="red",
             font="Courier 15", insertbackground="violet")
entry.place(x=10, y=50)

root.mainloop()


================================================
FILE: OCR Image-to-Text Conversion/README.md
================================================
## Introduction

Image Text Extractor is a Python application that utilizes Tesseract OCR to extract text from images. This application allows users to input the path to an image file and receive the extracted text in return.

## Requirements

- Python 3.x
- Libraries:
  - `pytesseract`
  - `PIL` (Pillow)

You can install the required libraries by running:

```bash
    pip install pytesseract Pillow
```

## Installation Instructions for All Operating Systems

### Windows

1. **Install Python**:

   - Download and install Python from the [official website](https://www.python.org/downloads/).
   - During installation, make sure to check the box that says "Add Python to PATH".

2. **Install Tesseract OCR**:

   - Download the Tesseract installer from the [Tesseract GitHub releases page](https://github.com/tesseract-ocr/tesseract/releases).
   - Run the installer and note the installation path (usually `C:\Program Files\Tesseract-OCR`).

3. **Set Tesseract Path**:

   - Add the Tesseract installation path to your system environment variables.
     - Right-click on "This PC" or "My Computer" > Properties > Advanced system settings > Environment Variables.
     - Under "System variables", find the `Path` variable and click Edit. Add the Tesseract path.

4. **Install Required Libraries**:
   - Open Command Prompt and run:
     ```bash
     pip install pytesseract Pillow
     ```

### macOS

1. **Install Homebrew** (if not already installed):

   - Open Terminal and run:
     ```bash
     /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
     ```

2. **Install Python**:

   - Use Homebrew to install Python:
     ```bash
     brew install python
     ```

3. **Install Tesseract OCR**:

   - Install Tesseract using Homebrew:
     ```bash
     brew install tesseract
     ```

4. **Install Required Libraries**:
   - In Terminal, run:
     ```bash
     pip install pytesseract Pillow
     ```

### Linux (Ubuntu/Debian)

1. **Install Python** (if not already installed):

   - Open Terminal and run:
     ```bash
     sudo apt update
     sudo apt install python3 python3-pip
     ```

2. **Install Tesseract OCR**:

   - Install Tesseract using:
     ```bash
     sudo apt install tesseract-ocr
     ```

3. **Install Required Libraries**:
   - In Terminal, run:
     ```bash
     pip3 install pytesseract Pillow
     ```

## Usage Instructions

After completing the installation, follow the usage instructions below to run the application.

1. Open Command Prompt.
2. Navigate to the directory where the script is located using the `cd` command:
   ```bash
    cd path\to\your\script
   ```
3. Run the Python script
   ```bash
    python image_text_extractor.py - mine is main.py
   ```

================================================
FILE: OCR Image-to-Text Conversion/main.py
================================================
import pytesseract
from PIL import Image
import os

def extract_text_from_image(image_path):
    """Extracts text from an image file using Tesseract OCR."""
    try:
        # Open the image file
        with Image.open(image_path) as img:
            # Use pytesseract to do OCR on the image
            extracted_text = pytesseract.image_to_string(img)
            return extracted_text
    except Exception as e:
        print(f"Error processing the image: {e}")
        return None

def main():

    image_path = input("Enter the path to the image file: ")

    if not os.path.isfile(image_path):
        print("File does not exist. Please check the path and try again.")
        return
    text = extract_text_from_image(image_path)

    if text:
        print("Extracted Text:")
        print(text)

if __name__ == "__main__":
    main()


================================================
FILE: OCR Image-to-Text Conversion/requirements.txt
================================================
pillow==11.0.0
pytesseract==0.3.13

================================================
FILE: PROJECTS.md
================================================
# Project List

* [Age Calculator](https://github.com/king04aman/All-In-One-Python-Projects/tree/main/Age%20Calculator)
* [Alarm Bot](https://github.com/king04aman/All-In-One-Python-Projects/tree/main/Alarm%20Bot)
* [Ascii Art Generator](https://github.com/king04aman/All-In-One-Python-Projects/tree/main/Ascii%20Art%20Generator)
* [Audio Book Generator](https://github.com/king04aman/All-In-One-Python-Projects/tree/main/Audio%20Book%20Generator)
* [CountDown Timer](https://github.com/king04aman/All-In-One-Python-Projects/tree/main/CountDown%20Timer)
* [Currency Converter](https://github.com/king04aman/All-In-One-Python-Projects/tree/main/Currency%20Converter)
* [Custom GPT](https://github.com/king04aman/All-In-One-Python-Projects/tree/main/Custom%20GPT)
* [Customizable_Workout_Playlist_Generator](https://github.com/king04aman/All-In-One-Python-Projects/tree/main/Customizable_Workout_Playlist_Generator)
* [Digital Clock](https://github.com/king04aman/All-In-One-Python-Projects/tree/main/Digital%20Clock)
* [Expense Splitter](https://github.com/king04aman/All-In-One-Python-Projects/tree/main/Expense%20Splitter)
* [Extractive Text Summarization](https://github.com/king04aman/All-In-One-Python-Projects/tree/main/Extractive%20Text%20Summarization)
* [Facebook Video Downloader](https://github.com/king04aman/All-In-One-Python-Projects/tree/main/Facebook%20Video%20Downloader)
* [Geographic Distance](https://github.com/king04aman/All-In-One-Python-Projects/tree/main/Geographic%20Distance)
* [Gesture-Based-Game-Controller](https://github.com/king04aman/All-In-One-Python-Projects/tree/main/Gesture-Based-Game-Controller)
* [Handwritten-Assignments](https://github.com/king04aman/All-In-One-Python-Projects/tree/main/Handwritten-Assignments)
* [Headlight Detection](https://github.com/king04aman/All-In-One-Python-Projects/tree/main/Headlight%20Detection)
* [Helmet Detection](https://github.com/king04aman/All-In-One-Python-Projects/tree/main/Helmet%20Detection)
* [Image Compression](https://github.com/king04aman/All-In-One-Python-Projects/tree/main/Image%20Compression)
* [ImageSize Reducer](https://github.com/king04aman/All-In-One-Python-Projects/tree/main/ImageSize%20Reducer)
* [Img-Steganograpy](https://github.com/king04aman/All-In-One-Python-Projects/tree/main/Img-Steganograpy)
* [Learn-FastAPI](https://github.com/king04aman/All-In-One-Python-Projects/tree/main/Learn-FastAPI)
* [Mental Health chatbot](https://github.com/king04aman/All-In-One-Python-Projects/tree/main/Mental%20Health%20chatbot)
* [Merge PDFs](https://github.com/king04aman/All-In-One-Python-Projects/tree/main/Merge%20PDFs)
* [MobileNumber Tracker](https://github.com/king04aman/All-In-One-Python-Projects/tree/main/MobileNumber%20Tracker)
* [Mood Based Music Recommender](https://github.com/king04aman/All-In-One-Python-Projects/tree/main/Mood%20Based%20Music%20Recommender)
* [Movie Scraper](https://github.com/king04aman/All-In-One-Python-Projects/tree/main/Movie%20Scraper)
* [My-Personal-Journal](https://github.com/king04aman/All-In-One-Python-Projects/tree/main/My-Personal-Journal)
* [Notepad](https://github.com/king04aman/All-In-One-Python-Projects/tree/main/Notepad)
* [OCR Image-to-Text Conversion](https://github.com/king04aman/All-In-One-Python-Projects/tree/main/OCR%20Image-to-Text%20Conversion)
* [Password Generator](https://github.com/king04aman/All-In-One-Python-Projects/tree/main/Password%20Generator)
* [Plagiarism-Checker](https://github.com/king04aman/All-In-One-Python-Projects/tree/main/Plagiarism-Checker)
* [Pomodoro Timer](https://github.com/king04aman/All-In-One-Python-Projects/tree/main/Pomodoro%20Timer)
* [QR Code Generator](https://github.com/king04aman/All-In-One-Python-Projects/tree/main/QR%20Code%20Generator)
* [Random Movie Selector](https://github.com/king04aman/All-In-One-Python-Projects/tree/main/Random%20Movie%20Selector)
* [Random Quotes Generator](https://github.com/king04aman/All-In-One-Python-Projects/tree/main/Random%20Quotes%20Generator)
* [Real-Time Cryptocurrency Price Tracker](https://github.com/king04aman/All-In-One-Python-Projects/tree/main/Real-Time%20Cryptocurrency%20Price%20Tracker)
* [Recipe Finder with Meal Planner](https://github.com/king04aman/All-In-One-Python-Projects/tree/main/Recipe%20Finder%20with%20Meal%20Planner)
* [Resume Builder](https://github.com/king04aman/All-In-One-Python-Projects/tree/main/Resume%20Builder)
* [Simple Assistant](https://github.com/king04aman/All-In-One-Python-Projects/tree/main/Simple%20Assistant)
* [Snake-Game](https://github.com/king04aman/All-In-One-Python-Projects/tree/main/Snake-Game)
* [Speech To Text](https://github.com/king04aman/All-In-One-Python-Projects/tree/main/Speech%20To%20Text)
* [Spell Checker](https://github.com/king04aman/All-In-One-Python-Projects/tree/main/Spell%20Checker)
* [Telegram Bot](https://github.com/king04aman/All-In-One-Python-Projects/tree/main/Telegram%20Bot)
* [Text Summarizer](https://github.com/king04aman/All-In-One-Python-Projects/tree/main/Text%20Summarizer)
* [Text To Speech](https://github.com/king04aman/All-In-One-Python-Projects/tree/main/Text%20To%20Speech)
* [Text to Morse Code](https://github.com/king04aman/All-In-One-Python-Projects/tree/main/Text%20to%20Morse%20Code)
* [Text_Adventure_Game](https://github.com/king04aman/All-In-One-Python-Projects/tree/main/Text_Adventure_Game)
* [Tic-Tac-Toc using AI (min-max)](https://github.com/king04aman/All-In-One-Python-Projects/tree/main/Tic-Tac-Toc%20using%20AI%20(min-max))
* [To Do List](https://github.com/king04aman/All-In-One-Python-Projects/tree/main/To%20Do%20List)
* [Translator](https://github.com/king04aman/All-In-One-Python-Projects/tree/main/Translator)
* [URL Sortener](https://github.com/king04aman/All-In-One-Python-Projects/tree/main/URL%20Sortener)
* [Validate-Email](https://github.com/king04aman/All-In-One-Python-Projects/tree/main/Validate-Email)
* [Video Processor](https://github.com/king04aman/All-In-One-Python-Projects/tree/main/Video%20Processor)
* [Video To Audio](https://github.com/king04aman/All-In-One-Python-Projects/tree/main/Video%20To%20Audio)
* [Weather Alert](https://github.com/king04aman/All-In-One-Python-Projects/tree/main/Weather%20Alert)
* [Word_frequency_counter](https://github.com/king04aman/All-In-One-Python-Projects/tree/main/Word_frequency_counter)
* [Youtube Video Downloader](https://github.com/king04aman/All-In-One-Python-Projects/tree/main/Youtube%20Video%20Downloader)
* [personal-finance-tracker](https://github.com/king04aman/All-In-One-Python-Projects/tree/main/personal-finance-tracker)


================================================
FILE: Password Generator/main.py
================================================
from tkinter import *
from random import choice
import string

class App:
    def __init__(self):
        self.window = Tk()
        self.window.title('password_generator')
        self.window.iconbitmap('logo.ico')
        self.window.iconphoto(False, PhotoImage(file='logo.png'))
        self.window.geometry('500x255')
        self.window.config(bg='gray')

        self.label()
        self.entry()
        self.button()

    def label(self):
        label_title = Label(self.window, text='Welcome to password generator', font=('Courrier', 20), bg='gray', fg='black')
        label_title.pack()

    def entry(self):
        self.password_entry = Entry(self.window, font=('Courrier', 25), bg='white', fg='black', width=30, relief='solid')
        self.password_entry.pack(pady=50)

    def button(self):
        password_generator = Button(self.window, text="Generate_password",  font=('Courrier', 12), bg='white', fg='black', width=25, command=self.generate_password)
        password_generator.pack()

    def generate_password(self):
        characters = string.ascii_letters + string.punctuation + string.digits
        password = ""
        for x in range(28):
            password+=choice(characters)
        self.password_entry.delete(0, END)
        self.password_entry.insert(0, password)
        
app = App()
app.window.mainloop()


================================================
FILE: Password Generator/requirements.txt
================================================
tk==0.1.0


================================================
FILE: Plagiarism-Checker/main.py
================================================
import os
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.metrics.pairwise import cosine_similarity

student_files = [doc for doc in os.listdir() if doc.endswith('.txt')]
student_notes = [open(_file, encoding='utf-8').read()
                 for _file in student_files]


def vectorize(Text): return TfidfVectorizer().fit_transform(Text).toarray()
def similarity(doc1, doc2): return cosine_similarity([doc1, doc2])


vectors = vectorize(student_notes)
s_vectors = list(zip(student_files, vectors))
plagiarism_results = set()


def check_plagiarism():
    global s_vectors
    for student_a, text_vector_a in s_vectors:
        new_vectors = s_vectors.copy()
        current_index = new_vectors.index((student_a, text_vector_a))
        del new_vectors[current_index]
        for student_b, text_vector_b in new_vectors:
            sim_score = similarity(text_vector_a, text_vector_b)[0][1]
            student_pair = sorted((student_a, student_b))
            score = (student_pair[0], student_pair[1], sim_score)
            plagiarism_results.add(score)
    return plagiarism_results


for data in check_plagiarism():
    print(data)
    

================================================
FILE: Plagiarism-Checker/requirements.txt
================================================
scikit_learn==0.24.2

================================================
FILE: Plagiarism-Checker/test1.txt
================================================
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.

================================================
FILE: Plagiarism-Checker/test2.txt
================================================
It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).

================================================
FILE: Pomodoro Timer/README.md
================================================
# Pomodoro Timer

A simple, customizable command line pomodoro timer built in Python.

## Features

- Customizable work, short and long breaks intervals: Define your own durations for each cycle.
- Pause whenever you want: Pause the timer when you want to take a break.
- Cycles: Run Multiple cycles of work and break intervals
- Console output: Show work and break intervals in the console.

## How it works

The Pomodoro Timer follow these steps:
1. Set your work and break intervals.
2. Take a short break every work interval.
3. After a set number of cycles, take a long break.

## Usage

1. Clone this repository to your machine.
2. Run the Python script from the command line.
   '''python pomodoro_timer.py'''

## Author

[MeuHubPython](https://github.com/MeuHubPython)



================================================
FILE: Pomodoro Timer/main.py
================================================
import time


def countdown(minutes, label):
    total_seconds = minutes * 60
    while total_seconds:
        mins, secs = divmod(total_seconds, 60)
        timer = f"{mins:02d}:{secs:02d}"
        print(f"{label} Timer: {timer}", end="\r")
        time.sleep(1)
        total_seconds -= 1
    print(f"\n{label} finished!")


def handle_pause_stop():
    while True:
        user_input = input(
            "\nPress 'p' to pause, 's' to stop, or 'Enter' to continue: "
        ).lower()
        if user_input == "p":
            print("Timer paused. Press 'Enter' to resume.")
            input()
        elif user_input == "s":
            print("Timer stopped.")
            return True  # Return True to signal that the timer should stop
        else:
            return False  # Return False to continue with the timer


def pomodoro_timer(work_min, short_break_min, long_break_min, cycles):
    for i in range(cycles):
        print(f"\nCycle {i+1} of {cycles}")
        countdown(work_min, "Work")
        if i < cycles - 1:
            print("\nStarting short break...")
            if handle_pause_stop():
                return
            countdown(short_break_min, "Short Break")
        else:
            print("\nStarting long break...")
            if handle_pause_stop():
                return
            countdown(long_break_min, "Long Break")
            if not repeat_or_end():
                return


def repeat_or_end():
    user_input = input(
        "\nCycle finished. Would you like to repeat the cycle? (y/n): "
    ).lower()
    return user_input == "y"


def get_valid_input(prompt):
    while True:
        try:
            value = int(input(prompt))
            if value <= 0:
                raise ValueError
            return value
        except ValueError:
            print("Invalid input. Please enter a positive integer.")


if __name__ == "__main__":
    work_minutes = get_valid_input("Enter work interval in minutes: ")
    short_break_minutes = get_valid_input("Enter short break interval in minutes: ")
    long_break_minutes = get_valid_input("Enter long break interval in minutes: ")
    cycles = get_valid_input("Enter the number of cycles: ")

    pomodoro_timer(work_minutes, short_break_minutes, long_break_minutes, cycles)


================================================
FILE: Pomodoro Timer/runtime.txt
================================================
Python 3.10.12


================================================
FILE: QR Code Generator/advanceQrGenerator.py
================================================
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Author: Aman Kumar
# Version: 1.0.0 

import qrcode
from PIL import Image

qr = qrcode.QRCode(version=1, error_correction=qrcode.ERROR_CORRECT_H, box_size=10, border=4)

qr.add_data("https://github.com/king04aman/all-in-one-python-projects")
qr.make(fit=True)
img = qr.make_image(fill_color='blue', back_color='white')
img.save('./advanceQR.png')

================================================
FILE: QR Code Generator/basicQrGenerator.py
================================================
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Author: Aman Kumar
# Version: 1.0.0 

import qrcode as qr

qrImg = qr.make("https://github.com/king04aman/All-In-One-Python-Projects/")
qrImg.save('demo.png')


================================================
FILE: QR Code Generator/runtime.txt
================================================
python-3.10.7

================================================
FILE: README.md
================================================
<h1 align="center"> All-In-One-Python-Projects </h1>

<!-- banner -->
![All-In-One-Python-Projects](https://socialify.git.ci/king04aman/all-in-one-python-projects/image?description=1&font=Jost&language=1&logo=https%3A%2F%2Fimages.weserv.nl%2F%3Furl%3Dhttps%3A%2F%2Favatars.githubusercontent.com%2Fu%2F62813940%3Fv%3D4%26h%3D250%26w%3D250%26fit%3Dcover%26mask%3Dcircle%26maxage%3D7d&name=1&owner=1&pattern=Floating%20Cogs&theme=Dark)

<!-- project badges -->
[![BuiltByDev](https://forthebadge.com/images/badges/built-by-developers.svg)](https://github.com/king04aman)
[![BuiltWithLov](https://forthebadge.com/images/badges/built-with-love.svg)](https://github.com/king04aman)
[![MadeWithPy](https://forthebadge.com/images/badges/made-with-python.svg)](https://github.com/king04aman)
<br/>
![Issues](https://img.shields.io/github/issues/king04aman/All-In-One-Python-Projects.svg)
![Contributors](https://img.shields.io/github/contributors/king04aman/All-In-One-Python-Projects.svg)
![SizeInBytes](https://img.shields.io/github/repo-size/king04aman/All-In-One-Python-Projects.svg)
![TopLanguage](https://img.shields.io/github/languages/top/king04aman/All-In-One-Python-Projects.svg)
![PullRequests](https://img.shields.io/github/issues-pr/king04aman/All-In-One-Python-Projects.svg)


<h2 align="center"> Description </h2>

_All-In-One-Python-Projects is a collection of all scripts starting from very basic to advance scripts. This is your personal zone where you may search or add any new scripts that can simplify your or other developer's life and give them something to do when they're bored. Start producing exciting scripts that benefit the community._

<hr>

## Getting Started
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

## Prerequisites
- Python 3.x

## Installing
1. Clone the repository to your local machine
    ```bash
    git clone https://github.com/king04aman/All-In-One-Python-Projects.git
    ```
2. Change directory into the cloned repository
    ```bash
    cd All-In-One-Python-Projects/<Project_name>
    ``` 
3. Install the required libraries
    ```bash
    pip install -r requirements.txt
    ```
4. Run the program using
    ```bash
    python3 <script_name>.py
    ```

<hr>

<h2 align='center'> Contribution Guide</h2>

- Have a look at [Contributing Guidelines](CONTRIBUTING.md).
- Take a look at the existing issues or create your own issues.
- Avoid making pull request unless you are assigned with the issue.
- Select the project on which you want to work or you can add your own project.
- Create an issue with description on which project you want to work and wait for approval.
- While making pull request add issue number with `#` (for example `#04`)
- After approval fork this repository, add your changes then make pull request with issue number and wait for review.
- Star this repository. 🌟


<h2 align=center> Awesome Contributors 🤩 </h2>

Thanks go to these **Wonderful Contributors** ✨✨:

<table>
	<tr>
		<td>
			<a href="https://github.com/king04aman/All-In-One-Python-Projects/graphs/contributors">
	    	<img src="https://contrib.rocks/image?repo=king04aman/All-In-One-Python-Projects" />
	    </a>
		</td>
	</tr>
</table>

<hr>

<h2 align='center'>Project Maintainer </h2>

<table>
	<tr>
        <td align="center">
            <a href="https://github.com/king04aman">
            <img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/62813940?v=4&h=250&w=250&fit=cover&mask=circle&maxage=7d" width=100px height=100px />
            </a></br> 
            <h4 style="color:#ff8c00;font-weight: bolder; font-size: 15px">Aman Kumar</h4>
        </td>
    </tr>
</table>

## License
*This project is licensed under the MIT License - see the [LICENSE.md](LICENSE) file for details.*


<hr>
<h3 align='center'>🎉 😃 Happy Hacking 😃 🎉 </h3>


================================================
FILE: Random Movie Selector/main.py
================================================
from imdb import IMDb
import random


class ChooseMovie(object):
    def __init__(self):
        self.cursor = IMDb()
        self.top250 = self.cursor.get_top250_movies()

    def __repr__(self):
        num = int(random.randint(0, 249))
        return str(f"\n\n\t{num}: {self.top250[num]}\n\n")


if __name__ == '__main__':
    print(ChooseMovie())

================================================
FILE: Random Movie Selector/runtime.txt
================================================
python-3.10.7

================================================
FILE: Random Quotes Generator/quotes.py
================================================
from bs4 import BeautifulSoup
import requests
import csv

url='http://quotes.toscrape.com'

html=requests.get(url)
bs=BeautifulSoup(html.text,'html.parser')

try:
    csv_file=open('quote_list.csv','w')
    fieldnames=['quote','author','tags']
    dictwriter=csv.DictWriter(csv_file,fieldnames=fieldnames)

    dictwriter.writeheader()

    while True:
        for quote in bs.findAll('div',{'class':'quote'}):
            text=quote.find('span',{'class':'text'}).text
            author=quote.find('small',{'class':'author'}).text
            tags=[]
            for tag in quote.findAll('a',{'class':'tag'}):
                tags.append(tag.text)
            dictwriter.writerow({'quote':text,'author':author,'tags':tags})
        
        next=bs.find('li',{'class':'next'})
        if not next: 
            break

        html=requests.get(url+next.a.attrs['href'])
        bs=BeautifulSoup(html.text,'html.parser')
except:
    print('Unknown Error!!!')
finally:
    csv_file.close()


================================================
FILE: Random Quotes Generator/runtime.txt
================================================
python-3.10.7

================================================
FILE: Real-Time Cryptocurrency Price Tracker/Readme.md
================================================
# Cryptocurrency Price Tracker with CoinGecko API

## Project Overview

The **Real-Time Cryptocurrency Price Tracker** is a Python script that allows users to retrieve real-time cryptocurrency prices, percentage price changes, and historical price data using the CoinGecko public API. The script also offers a simple visualization of historical price trends. Refer to [CoinGecko API](https://docs.coingecko.com/v3.0.1/reference/introduction) and [CoinGecko Coins List](https://api.coingecko.com/api/v3/coins/list) for more information.

## Features

- **Real-Time Price Retrieval**: Input the name of a cryptocurrency (eg. bitcoin) to retrieve its current price in USD
- **24-Hour Price Change**: Displays the 24-hour percentage change in price for the selected cryptocurrency
- **Historical Price Data**: Retrieve historical price data for a specified number of days (eg. 1 day, 7 days, or 30 days) and visualize it in a chart
- **Data Visualization**: Uses matplotlib to generate a line chart displaying the historical price data


## Technologies Used

- **Python**: The core programming language used to build the script
- **CoinGecko API**: A free API used to fetch cryptocurrency prices, percentage changes, and historical data
- **Requests**: A Python library for making HTTP requests to the CoinGecko API
- **Matplotlib**: A Python library used to visualize historical cryptocurrency price data in a line chart format
- **Datetime**: Python datetime module is used to convert and handle timestamps when retrieving historical price data

## Prerequisites

Before running the application, ensure you have the following:

- [Python 3.x](https://www.python.org/downloads/) installed on your system
- `requests` and `matplotlib` libraries are installed. Refer to `requirements.txt` for a specific version
  


================================================
FILE: Real-Time Cryptocurrency Price Tracker/main.py
================================================
import requests
import matplotlib.pyplot as plt
import datetime

COINGECKO_API_URL = "https://api.coingecko.com/api/v3"


def get_crypto_price(crypto_symbol):
    headers = {"accept": "application/json"}
    response = requests.get(f"{COINGECKO_API_URL}/simple/price", params={
        'ids': crypto_symbol,
        'vs_currencies': 'usd',
        'include_24hr_change': 'true'
    }, headers=headers)

    if response.status_code == 200:
        data = response.json()
        if crypto_symbol in data:
            price = data[crypto_symbol]['usd']
            change_percentage = data[crypto_symbol]['usd_24h_change']
            return price, change_percentage
        else:
            raise ValueError(f"Cryptocurrency '{crypto_symbol}' not found.")
    else:
        raise Exception(f"Failed to fetch data: {response.status_code} - {response.reason}")


def get_historical_data(crypto_symbol, days):
    response = requests.get(f"{COINGECKO_API_URL}/coins/{crypto_symbol}/market_chart", params={
        'vs_currency': 'usd',
        'days': days
    })

    if response.status_code == 200:
        data = response.json()
        if 'prices' in data:
            return data['prices']  # Returns price data over the days
        else:
            raise ValueError(f"No historical data available for '{crypto_symbol}'.")
    else:
        raise Exception(f"Failed to fetch historical data: {response.status_code} - {response.reason}")


def plot_historical_data(historical_data, crypto_symbol):
    dates = [datetime.datetime.fromtimestamp(item[0] / 1000) for item in historical_data]
    prices = [item[1] for item in historical_data]

    plt.figure(figsize=(10, 6))
    plt.plot(dates, prices, marker='o', linestyle='-', color='b')
    plt.title(f'Historical Price Data for {crypto_symbol.capitalize()}')
    plt.xlabel('Date')
    plt.ylabel('Price (USD)')
    plt.xticks(rotation=45)
    plt.grid(True)
    plt.tight_layout()
    plt.show()


def main():
    crypto = input("Enter cryptocurrency symbol (eg. bitcoin, ethereum): ").lower()

    try:
        # Get real-time price and 24-hour change
        price, change = get_crypto_price(crypto)
        print(f"Current price of {crypto}: ${price}")
        print(f"24-hour change: {change:.2f}%")
    except ValueError as e:
        print(f"Error: {e}")
        return
    except Exception as e:
        print(f"Error fetching price data: {e}")
        return

    # Validate and get historical data
    while True:
        try:
            days = int(input("Enter the number of days for historical data (eg. 1, 7, 30): "))
            if days <= 0:
                raise ValueError("The number of days must be a positive integer.")
            break
        except ValueError as e:
            print(f"Invalid input: {e}. Please enter a valid number.")

    try:
        historical_data = get_historical_data(crypto, days)
        print("Historical data retrieved successfully.")
        plot_historical_data(historical_data, crypto)
    except ValueError as e:
        print(f"Error: {e}")
    except Exception as e:
        print(f"Error fetching historical data: {e}")


if __name__ == "__main__":
    main()


================================================
FILE: Real-Time Cryptocurrency Price Tracker/requirements.txt
================================================
requests==2.32.3
matplotlib==3.9.2

================================================
FILE: Real-Time Cryptocurrency Price Tracker/runtime.txt
================================================
python-3.9.20

================================================
FILE: Recipe Finder with Meal Planner/Readme.md
================================================
# Meal Planner with Spoonacular API

## Project Overview

The **Meal Planner** is a command-line application that helps users plan their meals based on available ingredients. By using the [Spoonacular API](https://spoonacular.com/food-api), users can search for recipes, view recipe details, and generate meal plans for the week. It also provides important details like cooking time and servings for each recipe. This tool makes meal planning efficient and fun while minimizing food waste.

## Features

- **Search Recipes by Ingredients**: Input the ingredients you have, and the app will find up to 10 recipes that include those ingredients.
- **View Recipe Details**: Get detailed information about the selected recipes, including preparation time and servings.
- **Plan Meals for the Week**: Generate a random meal plan for up to 7 days based on the available recipes.
- **Interactive User Interface**: Provides a simple, interactive command-line interface for easy input and output.

## Technologies Used

- **Python**: Core programming language used to build the app.
- **Spoonacular API**: API used for fetching recipes and detailed information about them.
- **Requests**: Python library for making HTTP requests to the Spoonacular API.

## Prerequisites

Before running the application, ensure you have the following:

- [Python 3.x](https://www.python.org/downloads/) installed on your system.
- `requests` library installed. You can install it using:
  


================================================
FILE: Recipe Finder with Meal Planner/main.py
================================================
import requests
import random

# Replace 'your_api_key_here' with your actual Spoonacular API key
API_KEY = "74de4b7826b74b70b4d3a0fe3191239a"
BASE_URL = "https://api.spoonacular.com/recipes"

def find_recipes(ingredients):
    """Search for recipes based on ingredients using the Spoonacular API."""
    url = f"{BASE_URL}/findByIngredients"
    params = {
        'ingredients': ','.join(ingredients),
        'number': 10,  # Get up to 10 recipes
        'apiKey': API_KEY
    }
    response = requests.get(url, params=params)
    
    if response.status_code == 200:
        recipes = response.json()
        return [(recipe['title'], recipe['id']) for recipe in recipes]
    else:
        print(f"Error: {response.status_code}")
        return []

def get_recipe_details(recipe_id):
    """Get details of a specific recipe by its ID."""
    url = f"{BASE_URL}/{recipe_id}/information"
    params = {'apiKey': API_KEY}
    response = requests.get(url, params=params)

    if response.status_code == 200:
        return response.json()
    else:
        print(f"Error: {response.status_code}")
        return None

def plan_meals(ingredients):
    """Plan meals for the week based on available ingredients."""
    recipes = find_recipes(ingredients)
    
    if not recipes:
        return "No recipes found with the given ingredients."

    meals = random.sample(recipes, min(7, len(recipes)))
    return meals

def user_interface():
    print("Welcome to the Meal Planner!")
    print("Enter the ingredients you have, separated by commas:")
    
    ingredients = input().split(",")
    ingredients = [ingredient.strip().lower() for ingredient in ingredients]

    print("\nSearching for recipes based on your ingredients...\n")
    recipes = find_recipes(ingredients)

    if recipes:
        print(f"Found the following recipes with your ingredients:")
        for i, (title, _) in enumerate(recipes):
            print(f"{i + 1}. {title}")
    else:
        print("No recipes found with the given ingredients.")

    print("\nDo you want to plan meals for the week with these ingredients? (yes/no)")
    if input().strip().lower() == "yes":
        meals = plan_meals(ingredients)
        print("\nHere is your meal plan for the week:")
        for i, (title, recipe_id) in enumerate(meals, 1):
            print(f"Day {i}: {title}")
            recipe_details = get_recipe_details(recipe_id)
            if recipe_details:
                print(f"  - Ready in: {recipe_details['readyInMinutes']} minutes")
                print(f"  - Servings: {recipe_details['servings']}")
    else:
        print("No meal plan generated.")

if __name__ == "__main__":
    user_interface()


================================================
FILE: Recipe Finder with Meal Planner/runtime.txt
================================================
python-3.9.18


================================================
FILE: Resume Builder/README.md
================================================
# Interactive Resume Builder

This Python project is a command-line interface (CLI) tool for building professional resumes. The tool allows users to interactively input various sections of their resume, such as contact information, work experience, education, skills, projects, certifications, and achievements. The resume is then formatted and exported as a PDF file.

## Features

- Interactive CLI for entering resume data (contact info, work experience, education, etc.).
- Ability to add, update, and modify multiple resume sections.
- Automatically generates a well-formatted PDF resume.
- Includes functionality to add detailed descriptions for work experience and projects.
- Supports multiple certifications and achievements.
- Simple and intuitive navigation using `prompt_toolkit` for menu interactions.

## Prerequisites

- Python 3.x must be installed on your system.

## Setup Instructions

1. **Clone the repository**:
    ```bash
    git clone https://github.com/username/your-repo.git
    cd your-repo
    ```

2. **Create and activate a virtual environment**:

    For macOS/Linux:
    ```bash
    python3 -m venv venv
    source venv/bin/activate
    ```

    For Windows:
    ```bash
    python -m venv venv
    venv\Scripts\activate
    ```

3. **Install the necessary dependencies**:
    ```bash
    pip install -r requirements.txt
    ```

4. **Run the application**:
    ```bash
    python resume_builder.py
    ```

## Usage

- **Interactive Menu**: The program presents a menu to select which section of the resume you want to edit or add.
- **PDF Generation**: Once all sections are filled, you can generate a PDF with all the input data.
- **Options**:
    - Add or edit Contact Information, Work Experience, Education, Skills, Projects, Certifications, and Achievements.
    - Generate the PDF after completing the resume input.

## Dependencies

- `geopy`: For any geographic distance calculation (if needed for future features).
- `prompt_toolkit`: A library for building beautiful command-line applications.
- `fpdf`: A library for generating PDF documents from the entered resume data.

## License

This project is licensed under the MIT License.


================================================
FILE: Resume Builder/requirements.txt
================================================
geopy==2.2.0
prompt_toolkit==3.0.8
fpdf==1.7.2


================================================
FILE: Resume Builder/resume_builder.py
================================================
from prompt_toolkit import prompt
from prompt_toolkit.shortcuts import button_dialog
from fpdf import FPDF
import os

# To clear the terminal after selecting a section
def clear_screen():
    os.system('cls' if os.name == 'nt' else 'clear')

# Resume data storage
resume_data = {
    "contact_info": {},
    "experience": [],
    "education": [],
    "skills": [],
    "projects": [],
    "certifications": [],
    "achievements": []
}

# Function to navigate back to the main menu
def back_to_menu():
    print("\nReturning to main menu...")

# Add contact information
def add_contact_info():
    clear_screen()
    print("Enter Contact Information")
    resume_data["contact_info"]["name"] = prompt("Name: ")
    resume_data["contact_info"]["email"] = prompt("Email: ")
    resume_data["contact_info"]["phone"] = prompt("Phone: ")
    resume_data["contact_info"]["address"] = prompt("Address: ")
    resume_data["contact_info"]["linkedin"] = prompt("LinkedIn URL: ")
    resume_data["contact_info"]["github"] = prompt("GitHub URL: ")
    back_to_menu()

# Add work experience
def add_experience():
    while True:
        clear_screen()
        print("Enter Work Experience")
        experience = {
            "title": prompt("Job Title: "),
            "company": prompt("Company: "),
            "start_date": prompt("Start Date (e.g., June 2024): "),
            "end_date": prompt("End Date (or type 'Present' if still working): "),
            "details": prompt("Details (comma-separated): ").split(',')
        }
        resume_data["experience"].append(experience)

        # Ask user if they want to add more experience entries
        more = prompt("Do you want to add more work experience? (yes/no): ").strip().lower()
        if more == "no":
            break
    back_to_menu()

# Add education details
def add_education():
    while True:
        clear_screen()
        print("Enter Education Information")
        education = {
            "degree": prompt("Degree (e.g., B.Tech in CSE): "),
            "institution": prompt("Institution: "),
            "start_year": prompt("Start Year: "),
            "end_year": prompt("End Year: ")
        }
        resume_data["education"].append(education)

        # Ask user if they want to add more education entries
        more = prompt("Do you want to add more education? (yes/no): ").strip().lower()
        if more == "no":
            break
    back_to_menu()

# Add skills
def add_skills():
    clear_screen()
    print("Enter Skills (comma-separated): ")
    resume_data["skills"] = prompt("Skills: ").split(',')
    back_to_menu()

# Add projects
def add_projects():
    while True:
        clear_screen()
        print("Enter Projects Information")
        project = {
            "name": prompt("Project Name: "),
            "description": prompt("Description: "),
            "technologies": prompt("Technologies Used: ")
        }
        resume_data["projects"].append(project)

        # Ask if they want to add more projects
        more = prompt("Do you want to add more projects? (yes/no): ").strip().lower()
        if more == "no":
            break
    back_to_menu()

# Add certifications
def add_certifications():
    while True:
        clear_screen()
        print("Enter Certifications")
        certification = {
            "name": prompt("Certification Name: "),
            "provider": prompt("Provider: "),
            "year": prompt("Year: ")
        }
        resume_data["certifications"].append(certification)

        more = prompt("Do you want to add more certifications? (yes/no): ").strip().lower()
        if more == "no":
            break
    back_to_menu()

# Add achievements
def add_achievements():
    while True:
        clear_screen()
        print("Enter Achievements")
        achievement = prompt("Achievement: ")
        resume_data["achievements"].append(achievement)

        more = prompt("Do you want to add more achievements? (yes/no): ").strip().lower()
        if more == "no":
            break
    back_to_menu()

# PDF Generation class
class ResumePDF(FPDF):
    def header(self):
        self.set_font('Arial', 'B', 14)
        self.cell(0, 10, resume_data["contact_info"]["name"], 0, 1, 'C')
        self.set_font('Arial', 'I', 12)
        self.cell(0, 10, resume_data["contact_info"]["email"], 0, 1, 'C')
        self.cell(0, 10, resume_data["contact_info"]["phone"], 0, 1, 'C')
        self.cell(0, 10, resume_data["contact_info"]["address"], 0, 1, 'C')

    def add_section(self, title, content):
        self.set_font('Arial', 'B', 12)
        self.cell(0, 10, title, 0, 1)
        self.set_font('Arial', '', 11)
        for line in content:
            self.cell(0, 10, line, 0, 1)

# PDF Generation
def generate_pdf():
    pdf = ResumePDF()
    pdf.add_page()

    # Contact Information
    contact = resume_data["contact_info"]
    pdf.set_font('Arial', 'B', 12)
    pdf.cell(0, 10, f"{contact['name']} - {contact['email']}", 0, 1)
    pdf.cell(0, 10, f"Phone: {contact['phone']} - Address: {contact['address']}", 0, 1)
    pdf.cell(0, 10, f"LinkedIn: {contact.get('linkedin', 'N/A')} - GitHub: {contact.get('github', 'N/A')}", 0, 1)

    # Work Experience
    pdf.set_font('Arial', 'B', 12)
    pdf.cell(0, 10, "Experience", 0, 1)
    pdf.set_font('Arial', '', 11)
    for exp in resume_data["experience"]:
        details = ', '.join(exp["details"])
        pdf.cell(0, 10, f"{exp['title']} at {exp['company']} ({exp['start_date']} - {exp['end_date']})", 0, 1)
        pdf.multi_cell(0, 10, f"Responsibilities: {details}")

    # Education
    pdf.set_font('Arial', 'B', 12)
    pdf.cell(0, 10, "Education", 0, 1)
    pdf.set_font('Arial', '', 11)
    for edu in resume_data["education"]:
        pdf.cell(0, 10, f"{edu['degree']} from {edu['institution']} ({edu['start_year']} - {edu['end_year']})", 0, 1)

    # Skills
    pdf.set_font('Arial', 'B', 12)
    pdf.cell(0, 10, "Skills", 0, 1)
    pdf.multi_cell(0, 10, ', '.join(resume_data["skills"]))

    # Projects
    pdf.set_font('Arial', 'B', 12)
    pdf.cell(0, 10, "Projects", 0, 1)
    pdf.set_font('Arial', '', 11)
    for proj in resume_data["projects"]:
        pdf.cell(0, 10, proj["name"], 0, 1)
        pdf.multi_cell(0, 10, proj["description"])
        pdf.cell(0, 10, f"Technologies Used: {proj['technologies']}", 0, 1)

    # Certifications
    pdf.set_font('Arial', 'B', 12)
    pdf.cell(0, 10, "Certifications", 0, 1)
    pdf.set_font('Arial', '', 11)
    for cert in resume_data["certifications"]:
        pdf.cell(0, 10, f"{cert['name']} by {cert['provider']} ({cert['year']})", 0, 1)

    # Achievements
    pdf.set_font('Arial', 'B', 12)
    pdf.cell(0, 10, "Achievements", 0, 1)
    pdf.set_font('Arial', '', 11)
    for ach in resume_data["achievements"]:
        pdf.cell(0, 10, ach, 0, 1)

    # Save PDF
    pdf_output_path = "generated_resume.pdf"
    pdf.output(pdf_output_path)

    # Auto-open PDF after generation
    os.system(f"start {pdf_output_path}" if os.name == "nt" else f"open {pdf_output_path}")
    print(f"Resume generated: {pdf_output_path}")

# Main Menu using button_dialog from prompt_toolkit
def interactive_menu():
    while True:
        clear_screen()
        choice = button_dialog(
            title="Interactive Resume Builder",
            text="Please choose a section to modify:",
            buttons=[
                ("Contact Info", 1),
                ("Work Experience", 2),
                ("Education", 3),
                ("Skills", 4),
                ("Projects", 5),
                ("Certifications", 6),
                ("Achievements", 7),
                ("Generate PDF", 8),
                ("Exit", 9)
            ]
        ).run()

        if choice == 1:
            add_contact_info()
        elif choice == 2:
            add_experience()
        elif choice == 3:
            add_education()
        elif choice == 4:
            add_skills()
        elif choice == 5:
            add_projects()
        elif choice == 6:
            add_certifications()
        elif choice == 7:
            add_achievements()
        elif choice == 8:
            generate_pdf()
        elif choice == 9:
            break

# Start the program
if __name__ == "__main__":
    interactive_menu()


================================================
FILE: Simple Assistant/assistant.py
================================================
import pyttsx3,datetime,os,random,requests
import wikipedia,webbrowser,sys,pywhatkit
import speech_recognition as sr 


engine = pyttsx3.init('sapi5')
voices = engine.getProperty("voices")
engine.setProperty('voice',voices[1].id)


# To convdert text into voice
def speak(audio):
    engine.say(audio)
    print(audio)
    engine.runAndWait()

# To convert voice into text
def takecommand():
    r = sr.Recognizer()
    with sr.Microphone() as source:
        print("Listening...")
        r.pause_threshold = 1
        audio = r.listen(source,timeout=2,phrase_time_limit=5)
        
    try:
        print("Recognizing...")
        query = r.recognize_google(audio,language='en-in')
    except Exception:
        speak("Can you please say that again ... ")
        return 'none'
    return query

# To wish
def wish():
    hour = int(datetime.datetime.now().hour)
    if hour >=0 and hour<=12:
        speak("Good morning Sir")
    elif hour>12 and hour<16:
        speak("Good afternoon Sir")
    elif hour>16 and hour<22:
        speak("Good evening Sir")
    speak("I am jarvis, Please tell me how can i help you !")


if __name__ == "__main__":
    wish()
    if 1:
        query = takecommand().lower()

        if 'open notepad' in query:
            npath = 'C:\\Windows\\System32\\notepad.exe'
            os.startfile(npath)
            speak("Please wait ! While I am opening notepad for you!")

        elif "open cmd" in query:
            os.system('start cmd')
            speak("Opening Command Promte")

        elif "play music" in query:
            music_dir = 'D:\\Songs'
            songs = os.listdir(music_dir)
            rd = random.choice(songs)
            os.startfile(os.path.join(music_dir,rd))
            speak("Playing Music")

        elif "ip address" in query:
            ip = requests.get("https://api.ipify.org").text
            speak(f"Your Ip address is {ip}")

        elif 'wikipedia' in query:
            speak("Searching in wikipedia")
            query = query.replace("wikipedia","")
            results = wikipedia.summary(query,sentences=5)
            speak(f"according to wikipedia {results}")
        
        elif "open youtube" in query:
            webbrowser.open('www.youtube.com/')

        elif "open instagram" in query:
            webbrowser.open('www.instagram.com/')

        elif "open facebook" in query:
            webbrowser.open('www.facebook.com/')

        elif "open twitter" in query:
            webbrowser.open('www.twitter.com/')

        elif "open google" in query:
            speak('Sir what should i search on google ! ')
            varg = takecommand().lower()
            webbrowser.open(varg)

        # elif 'send message' in query:
        #     pywhatkit.sendwhatmsg("+919988776655",'Hello I am Jarvis ! How are you Sir ?',18,33,10,True)

        # elif 'play song on youtube' in query:
        #     speak("Which song would you like to play on youtube ? ")
        #     song = takecommand().lower()
        #     pywhatkit.playonyt(song)

        # elif 'play video' in query:
        #     speak("Which video would you like to play on youtube ? ")
        #     vsong = takecommand().lower()
        #     pywhatkit.playonyt(vsong)


        elif 'nothing' in query or 'abort' in query or 'stop' in query:
            speak('okay')
            speak('Bye Sir, have a good day.')
            sys.exit()
           
        elif 'hello' in query:
            speak('Hello Sir')

        elif 'bye' in query:
            speak('Bye Sir, have a good day.')
            sys.exit()

        
        elif "what\'s up" in query or 'how are you' in query:
            stMsgs = ['Just doing my thing!', 'I am fine!', 'Nice!', 'I am nice and full of energy']
            speak(random.choice(stMsgs))



================================================
FILE: Simple Assistant/raj_mistry01/Readme.md
================================================
# Jarvis - A Personal Voice Assistant 🗣️💻

This **Jarvis Personal Assistant** is a Python-based virtual assistant that can execute commands, automate tasks, and provide information at your request. It can help you manage files, open applications, search Wikipedia, forecast weather, and much more—all through voice commands.

## 🚀 Features

1. **Voice & Text Interaction**  
   - Provides **voice recognition** using Google Speech Recognition API.
   - Users can **switch to text mode** if speech recognition fails.
   
2. **Application Management**  
   - Open or close **Notepad** and **Command Prompt**.
   - Manage system **battery levels** with alerts and suggestions.

3. **Information Retrieval**  
   - Get **Wikipedia summaries** for any topic.
   - **Weather forecasts** by city or location-based.
   - Check your **IP address** using an online API.

4. **Entertainment & Media**  
   - Search for **movie details** via IMDb, including cast, plot, and ratings.
   - Open **YouTube** and automate subscriptions.

5. **System Control**  
   - Adjust **volume controls**: Increase, decrease, or mute.
   - Minimize or maximize windows using **keyboard automation**.
   - Track **internet speed** with Speedtest integration.

6. **Utility Features**  
   - Control **Webcam** access and capture videos.
   - Perform calculations using **Wolfram Alpha**.
   - Automatically **open websites** using Chrome.
   - Monitor **system processes** and terminate them on command.

---

## 🔧 Setup Instructions

1. **Clone the Repository**
   ```bash
   git clone https://github.com/yourusername/jarvis-assistant.git
   cd jarvis-assistant
   ```

2. **Install Dependencies**  
   Install all necessary Python packages using:
   ```bash
   pip install -r requirements.txt
   ```

3. **Add Paths for Applications**
   Set the paths for:
   - **Chrome browser**: `"C:/Program Files/Google/Chrome/Application/chrome.exe"`
   - **Notepad**: `"C:/Windows/System32/notepad.exe"`
   - **Visual Studio Code** (optional): Adjust the path as per your installation.

4. **Get API Keys**
   - **OpenWeather API**: [Sign up here](https://openweathermap.org/) and replace `apiKey` in the code.
   - **Wolfram Alpha API**: Get an API key [here](https://products.wolframalpha.com/api/).

---

## 🧑‍💻 Usage Instructions

1. **Launch the Assistant**  
   Run the script:
   ```bash
   python jarvis.py
   ```

2. **Speak Commands**:
   - "Open Notepad" – Launches Notepad.
   - "What is the weather report?" – Gives the weather of your current location.
   - "Search for Titanic on Wikipedia" – Provides a brief Wikipedia summary.
   - "Close Command Prompt" – Terminates the Command Prompt if running.
   - "What's my IP address?" – Provides your public IP address.

3. **Text Mode**  
   If the voice input isn't recognized, type your queries when prompted.

4. **Pause or Stop Listening**:
   - Say **"Stop listening"**: Pauses the assistant.
   - Resume by pressing **Ctrl + Alt + K**.
   - Say **"No query, thanks"** to exit the assistant.

---

## 🌦️ Example Queries

- **"How are you, Jarvis?"**  
  → Jarvis responds and continues the conversation.

- **"Open Command Prompt"**  
  → Opens the Command Prompt window.

- **"Mute the volume"**  
  → Mutes system volume.

---

## 🎯 Known Issues and Limitations

- Some queries require accurate phrasing.
- Voice recognition may fail in noisy environments.
- Web automation depends on having Chrome installed.
- Weather reports return temperature in **Kelvin** by default (can be adjusted).

---

## 💡 Future Improvements

- Add **Gmail** integration to send emails.
- Support for **natural conversations** with chat history.
- **Alarm feature** implementation.

---

## 🤖 Contribution

Feel free to submit pull requests or report bugs/issues. Contributions are welcome to make this assistant smarter and more responsive!

---


## 🛠️ Prerequisites

- **Python 3.7+**
- Required Packages (install via `pip`):
  ```bash
  pip install -r requirements.txt

---
## 🛠️ Api Credits

    Wolfram Api
    OpenWheather Api


- **Python 3.7+**
- Required Packages (install via `pip`):
  ```bash
  pip install -r requirements.txt

Enjoy using **Jarvis Personal Assistant**! 😊


================================================
FILE: Simple Assistant/raj_mistry01/main.py
================================================
import pyttsx3
import wmi
import speech_recognition as sr
import datetime
import wolframalpha
import subprocess as sp
import time
import pyautogui 
import webbrowser as web
import random
import imdb
import psutil
import requests
import wikipedia
import pywhatkit
import smtplib
import sys
import keyboard
import speedtest
import cv2
import os
import numpy as np
engine = pyttsx3.init('sapi5')
voices = engine.getProperty("voices")
engine.setProperty('voices',voices[0].id)
runnigprocesslist = []
f = wmi.WMI()
flag = 0 
def speak(audio) :
    print("Jarvis : ",end="")
    engine.say(audio)
    print(audio)
    engine.runAndWait()
def takecommand() :
    r = sr.Recognizer()
    with sr.Microphone() as source :
        print("Listening ...")
        r.adjust_for_ambient_noise(source)
        r.pause_threshold =1 
        audio = r.listen(source,phrase_time_limit=5)
    try :
        print("Recongnizing ..")
        text = r.recognize_google(audio,language = "en-in")
        print("User said : "+text)
    except Exception as e :
        print("Say that again : ")
        return "none"
    return text
def startlistening():
    print("Started Listening : ")

def pauseListening() :
    print("Paused Listening :")

def weatherforecast(city) :
    apiKey = "apiKey"
    res = requests.get(f"openWeatherApiEndpoint").json()
    weather_ = res["weather"][0]["main"]
    temp = res["main"]["temp"]
    feels_like = res["main"]["feels_like"]
    return weather_,temp,feels_like

def wish() :
    hour = int(datetime.datetime.now().hour)
    if hour >= 0 and hour <= 12 :
        speak("Good morning :")
    elif hour > 12 and hour <= 18 :
        speak("Good afternoon :")
    else :
        speak("Good evening : ")
    speak("I am jarvis ,sir  how can I assist you?")
# def sendEmail(to,content) :
#     server = smtplib.SMTP("smtp.gmail.com",587)
#     server.ehlo()
#     server.starttls()
#     server.login("emailId","yourpswd")
#     server.sendmail("emailId","toemail")
#     server.close()
if __name__ == "__main__" :
    wish()
    def main() :
        global runnigprocesslist
        tries = 0
        query = ""
        flag_ = 0
        flagForText = 0
        while True:
            if tries < 3 :
                if flag_ == 0 : 
                    query = takecommand().lower()
                    tries += 1
                else :
                    if flagForText == 1: 
                        query  = input("(Prees V + Enter to turn voice chat again)Enter your query in text : ")
                        if query == "V" :
                            flag_  = 0
                            flagForText = 0
                            pass
                        else :
                            pass
                    else : 
                        flag_ = 0
                        pass
                if "stop listening" in query :
                    pauseListening()
                    speak("Press ctrl+alt+k to continue listening.")
                    break
                elif "open notepad" in query :
                    tries = 0
                    path = "" # path to notepad
                    speak("Opening NOtepad sir.")
                    os.startfile(path)
                elif "close notepad" in query :
                    tries = 0
                    for process in f.Win32_Process() :
                        runnigprocesslist.append(process.Name)
                    if "Notepad.exe" in runnigprocesslist :
                        speak("Closing the notepad.")
                        os.system("taskkill /f /im notepad.exe")
                        flag = 1 
                        runnigprocesslist = []
                    else :
                        speak("Notepad is not opened.")
                elif "stop listening" in query :
                    tries = 0
                    speak("Press ctrl+alt+p to pause the listening")
                elif "how are you jarvis" in query :
                    tries = 0
                    speak("I am fine sir , What about you ?? Sir.")
                    query = takecommand().lower()
                    if "not feeling good" or "sad" or "bad day" in query :
                        speak("What happend sir ,Please Tell me , May I help you ?")
                        query =  takecommand().lower()
                        if "disease" in query :
                            query = query.replace(query,"drreddys.com",1)
                            path = "" # path to chrome
                            web.register("chrome",None,web.BackgroundBrowser(path))
                            web.get("chrome").open_new(query)
                        else :
                            pass
                    elif "good" or "feeling happy" in query :
                        speak("Ok sir , It seems to be nice to hear.")
                elif "open command prompt" in query :
                    tries = 0
                    speak("Opening the command propmpt.")
                    os.system("start cmd")
                elif "close command prompt" in query :
                    tries = 0 
                    for process in f.Win32_Process() :
                        runnigprocesslist.append(process.Name)
                    if "cmd.exe" in runnigprocesslist :
                        speak("Closing the command propmt.")
                        os.system("taskkill /f /im cmd.exe")
                        flag = 1 
                        runnigprocesslist = []
                    else :
                        speak("CMD is not opened.")
                    pass
                elif "clear the chat" in query :
                    tries = 0
                    os.system("cls")
                elif "are you forget to wish me" in query or "Wish me again" in query :
                    tries = 0
                    wish()
                elif "open Webcamera" in query :
                    tries = 0
                    cap = cv2.VideoCapture(0)
                    while True :
                        ret , img = cap.read()
                        cv2.imshow("webcam",img)
                        k = cv2.waitKey(50)
                        if k == 27 :
                            break
                    cap.release()
                    cv2.destroyAllWindows()
                elif "open camera" in query :
                    tries = 0
                    speak("Opening Camera sir")
                    sp.run("start microsoft.windows.camera:",shell= True)
                elif "close camera" in query :
                    tries = 0
                    for process in f.Win32_Process() :
                        runnigprocesslist.append(process.Name)
                    if "WindowsCamera.exe" in runnigprocesslist :
                        speak("Closing the camera.")
                        flag = 1 
                        os.system("taskkill /f /im WindowsCamera.exe")
                        runnigprocesslist = []
                    else :
                        speak("Camera is not opened.")
                elif "calculate" in query :
                    # api = "apiKey"
                    client = wolframalpha.Client(api)
                    query = takecommand().lower()
                    ind  = query.split().index("calculate")
                    text = query.split()[ind+1:]
                    result = client.query(" ".join(text))
                    try :
                        ans = next(result.results).text
                        speak("The answer is " + ans)
                    except StopIteration :
                        speak("I could not find it , Please say it again.")
                elif "ip address" in query :
                    tries = 0
                    ip = requests.get("apiKeyOfipyfyConfig").json()
                    speak("Your Ip address is : " + ip["ip"])
                elif "wikipedia" in query :
                    tries = 0
                    speak("Searching in the wikipedia")
                    query = query.replace("wikipedia","")
     
Download .txt
gitextract_lpystzk0/

├── .github/
│   ├── ISSUE_TEMPLATE/
│   │   ├── PROJECT_SUGGESTION_TEMPLATE.md
│   │   ├── bug_report.md
│   │   ├── config.yml
│   │   ├── feature_request.md
│   │   └── other_issue.md
│   ├── PROJECT_SUGGESTION_TEMPLATE.md
│   ├── pull_request_template.md
│   └── workflows/
│       ├── generate-project-list.yml
│       └── welcome.yml
├── Age Calculator/
│   ├── calculate.py
│   └── runtime.txt
├── Alarm Bot/
│   ├── main.py
│   ├── requirements.txt
│   └── runtime.txt
├── Ascii Art Generator/
│   ├── generate.py
│   ├── requirements.txt
│   └── runtime.txt
├── Audio Book Generator/
│   ├── main.py
│   ├── requirements.txt
│   └── runtime.txt
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── CountDown Timer/
│   ├── main.py
│   ├── requirements.txt
│   └── runtime.txt
├── Currency Converter/
│   ├── main.py
│   ├── requirements.txt
│   └── runtime.txt
├── Custom GPT/
│   ├── README.md
│   ├── data/
│   │   └── data.txt
│   ├── example-env
│   └── main.py
├── Customizable_Workout_Playlist_Generator/
│   ├── README_SONG.md
│   ├── hiit_playlist.json
│   ├── playlist.py
│   └── requirements.txt
├── Digital Clock/
│   ├── main.py
│   ├── requirements.txt
│   └── runtime.txt
├── Example README.md
├── Expense Splitter/
│   ├── README.md
│   ├── main.py
│   └── runtme.txt
├── Extractive Text Summarization/
│   ├── readme.md
│   ├── requirements.txt
│   └── summary.py
├── Facebook Video Downloader/
│   ├── main.py
│   ├── requirements.txt
│   └── runtime.txt
├── Gauss Elimination with Partial Pivoting/
│   ├── README.md
│   ├── main.py
│   └── runtime.txt
├── Geographic Distance/
│   ├── README.md
│   ├── geographic_distance.py
│   ├── requirements.txt
│   ├── runtime.txt
│   └── test_geographic_distance.py
├── Gesture-Based-Game-Controller/
│   ├── main.py
│   ├── readme.md
│   ├── requirements.txt
│   └── runtime.txt
├── Handwritten-Assignments/
│   ├── main.py
│   ├── requirements.txt
│   └── runtime.txt
├── Headlight Detection/
│   ├── headlightDetection.py
│   ├── requirements.txt
│   └── runtime.txt
├── Helmet Detection/
│   ├── main.py
│   ├── requirements.txt
│   └── runtime.txt
├── Image Compression/
│   ├── main.py
│   ├── requirements.txt
│   └── runtime.txt
├── ImageSize Reducer/
│   ├── reduce.py
│   ├── requirements.txt
│   └── runtime.txt
├── Img-Steganograpy/
│   ├── main.py
│   ├── requirements.txt
│   └── runtime.txt
├── LICENSE
├── Learn-FastAPI/
│   ├── FastAPI-CURD.py
│   ├── FastAPI-Tutorial.py
│   └── README.md
├── Mental Health chatbot/
│   ├── Mental_health_bot.py
│   ├── README_BOT.md
│   └── requirements.txt
├── Merge PDFs/
│   ├── merge.py
│   ├── requirements.txt
│   └── runtime.txt
├── MobileNumber Tracker/
│   ├── requirements.txt
│   ├── runtime.txt
│   └── track.py
├── Mood Based Music Recommender/
│   ├── Emosic-Spoti.py
│   ├── README.md
│   └── requirement.txt
├── Movie Scraper/
│   ├── requirements.txt
│   ├── runtime.txt
│   └── scrape.py
├── My-Personal-Journal/
│   ├── README.md
│   ├── app.py
│   ├── database.py
│   ├── journal_app.py
│   ├── requirements.txt
│   ├── static/
│   │   └── style.css
│   ├── templates/
│   │   ├── add.html
│   │   ├── index.html
│   │   ├── search.html
│   │   ├── search_results.html
│   │   └── tags.html
│   └── ui.py
├── Notepad/
│   ├── main.py
│   ├── requirements.txt
│   └── runtime.txt
├── OCR Image-to-Text Conversion/
│   ├── README.md
│   ├── main.py
│   └── requirements.txt
├── PROJECTS.md
├── Password Generator/
│   ├── main.py
│   ├── requirements.txt
│   └── runtime.txt
├── Plagiarism-Checker/
│   ├── main.py
│   ├── requirements.txt
│   ├── runtime.txt
│   ├── test1.txt
│   └── test2.txt
├── Pomodoro Timer/
│   ├── README.md
│   ├── main.py
│   └── runtime.txt
├── QR Code Generator/
│   ├── advanceQrGenerator.py
│   ├── basicQrGenerator.py
│   ├── requirements.txt
│   └── runtime.txt
├── README.md
├── Random Movie Selector/
│   ├── main.py
│   ├── requirements.txt
│   └── runtime.txt
├── Random Quotes Generator/
│   ├── quotes.py
│   ├── requirements.txt
│   └── runtime.txt
├── Real-Time Cryptocurrency Price Tracker/
│   ├── Readme.md
│   ├── main.py
│   ├── requirements.txt
│   └── runtime.txt
├── Recipe Finder with Meal Planner/
│   ├── Readme.md
│   ├── main.py
│   └── runtime.txt
├── Resume Builder/
│   ├── README.md
│   ├── requirements.txt
│   └── resume_builder.py
├── Simple Assistant/
│   ├── assistant.py
│   ├── raj_mistry01/
│   │   ├── Readme.md
│   │   ├── main.py
│   │   └── requirements.txt
│   ├── requirements.txt
│   └── runtime.txt
├── Snake-Game/
│   ├── README.md
│   ├── Snake.py
│   ├── data.py
│   ├── data.txt
│   ├── food.py
│   ├── main.py
│   └── scoreboard.py
├── Speech To Text/
│   ├── main.py
│   ├── requirements.txt
│   └── runtime.txt
├── Spell Checker/
│   ├── main.py
│   ├── requirements.txt
│   └── runtime.txt
├── Telegram Bot/
│   ├── main.py
│   ├── requirements.txt
│   └── runtime.txt
├── Text Summarizer/
│   ├── README.md
│   ├── requirements.txt
│   ├── runtime.txt
│   ├── sample.csv
│   └── text_summarizer.py
├── Text To Speech/
│   ├── README.md
│   ├── requirements.txt
│   ├── runtime.txt
│   └── text_to_speech.py
├── Text to Morse Code/
│   ├── main.py
│   └── runtime.txt
├── Text_Adventure_Game/
│   ├── readme.md
│   └── text_adventure_game.py
├── Tic-Tac-Toc using AI (min-max)/
│   ├── README.md
│   ├── requirements.txt
│   └── tic_tac_toc.py
├── To Do List/
│   ├── README.md
│   ├── RithwikBejadi/
│   │   └── To Do App/
│   │       ├── README.md
│   │       ├── To_Do_AppTkInter.py
│   │       ├── requirements.txt
│   │       └── runtime.txt
│   ├── main.py
│   ├── requirement.txt
│   └── runtime.txt
├── Translator/
│   ├── requirements.txt
│   ├── runtime.txt
│   └── translate.py
├── URL Sortener/
│   ├── main.py
│   ├── requirements.txt
│   └── runtime.txt
├── Validate-Email/
│   ├── runtime.txt
│   └── validate.py
├── Video Processor/
│   ├── README.md
│   ├── requirements.txt
│   └── video_processor.py
├── Video To Audio/
│   ├── main.py
│   ├── requirement.txt
│   └── runtime.txt
├── Weather Alert/
│   ├── README.md
│   ├── main.py
│   ├── requirement.txt
│   └── runtime.txt
├── Word_frequency_counter/
│   ├── README.md
│   ├── main.py
│   ├── requirments.txt
│   └── runtime.txt
├── Youtube Video Downloader/
│   ├── Readme.md
│   ├── main.py
│   ├── requirements.txt
│   └── runtime.txt
└── personal-finance-tracker/
    ├── README.md
    ├── database.py
    ├── main.py
    ├── savings.py
    ├── tracker.py
    └── visualization.py
Download .txt
SYMBOL INDEX (271 symbols across 57 files)

FILE: Age Calculator/calculate.py
  function judge_leap_year (line 4) | def judge_leap_year(year):
  function month_days (line 10) | def month_days(month, leap_year):

FILE: Alarm Bot/main.py
  function Threading (line 10) | def Threading():
  function alarm (line 14) | def alarm():

FILE: Ascii Art Generator/generate.py
  function print_out_ascii (line 8) | def print_out_ascii(array):
  function img_to_ascii (line 15) | def img_to_ascii(image):

FILE: CountDown Timer/main.py
  class Application (line 4) | class Application(Frame):
    method __init__ (line 5) | def __init__(self,master):
    method createWidgets (line 17) | def createWidgets(self):
    method enter (line 48) | def enter(self,*args):
    method startTime (line 52) | def startTime(self):
    method pauseTime (line 64) | def pauseTime(self):
    method resetTime (line 69) | def resetTime(self):
    method closeApp (line 77) | def closeApp(self):
    method countdown (line 80) | def countdown(self, timeInSeconds, start=True):

FILE: Currency Converter/main.py
  class Currency_convertor (line 3) | class Currency_convertor:
    method __init__ (line 5) | def __init__(self, url):
    method convert (line 9) | def convert(self, from_currency, to_currency, amount):

FILE: Customizable_Workout_Playlist_Generator/playlist.py
  class Song (line 13) | class Song:
    method __init__ (line 14) | def __init__(self, title: str, artist: str, duration: int, bpm: int, g...
    method __str__ (line 21) | def __str__(self):
  class WorkoutPlaylist (line 24) | class WorkoutPlaylist:
    method __init__ (line 25) | def __init__(self):
    method load_song_database (line 30) | def load_song_database(self):
    method set_api_client (line 49) | def set_api_client(self, service: str):
    method generate_playlist (line 57) | def generate_playlist(
    method save_playlist (line 137) | def save_playlist(self, playlist: List[Song], filename: str):
    method load_playlist (line 150) | def load_playlist(self, filename: str) -> List[Song]:
    method share_playlist (line 157) | def share_playlist(self, playlist: List[Song], platform: str):
  class SpotifyClient (line 164) | class SpotifyClient:
    method __init__ (line 165) | def __init__(self):
    method search_songs (line 168) | def search_songs(self, query: str, limit: int = 10) -> List[Song]:
  class AppleMusicClient (line 182) | class AppleMusicClient:
    method __init__ (line 183) | def __init__(self):
    method search_songs (line 188) | def search_songs(self, query: str, limit: int = 10) -> List[Song]:
  class YouTubeMusicClient (line 193) | class YouTubeMusicClient:
    method __init__ (line 194) | def __init__(self):
    method search_songs (line 197) | def search_songs(self, query: str, limit: int = 10) -> List[Song]:
  function format_playlist (line 211) | def format_playlist(playlist: List[Song]) -> str:
  function get_user_input (line 222) | def get_user_input():
  function choose_music_service (line 235) | def choose_music_service():
  function main (line 256) | def main():

FILE: Digital Clock/main.py
  function update_label (line 16) | def update_label():

FILE: Expense Splitter/main.py
  function calculate_split (line 1) | def calculate_split(total_amount: float, number_of_people: int, currency...
  function main (line 14) | def main() -> None:

FILE: Extractive Text Summarization/summary.py
  class TextSummarization (line 14) | class TextSummarization:
    method __init__ (line 15) | def __init__(self):
    method clean_text (line 26) | def clean_text(self, text: str) -> Tuple[str, str]:
    method stem_text (line 33) | def stem_text(self, text: str) -> str:
    method score_sentences (line 39) | def score_sentences(self, original_sentences: List[str], stemmed_sente...
    method extract_key_points (line 69) | def extract_key_points(self, original_sentences: List[str], stemmed_se...
    method summarize (line 104) | def summarize(self, text: str, num_sentences: int = 5) -> Dict[str, Un...
  function main (line 128) | def main(text):

FILE: Gauss Elimination with Partial Pivoting/main.py
  function gauss_partial (line 1) | def gauss_partial(matrix: list, index_column: int):
  function verify_triangular (line 12) | def verify_triangular(matrix: list) -> bool:
  function gauss (line 23) | def gauss(matrix: list, index: int) -> list:
  function resolve_linear_system (line 35) | def resolve_linear_system(matrix: list) -> list:
  function resolve_matrix (line 51) | def resolve_matrix(matrix: list):
  function take_matrix (line 75) | def take_matrix() -> list:

FILE: Geographic Distance/geographic_distance.py
  function calculate_distance_and_time (line 4) | def calculate_distance_and_time(coord1, coord2, avg_speed):
  function main (line 21) | def main():

FILE: Geographic Distance/test_geographic_distance.py
  function test_calculate_distance_and_time (line 7) | def test_calculate_distance_and_time():
  function test_calculate_distance_and_time_invalid_speed (line 17) | def test_calculate_distance_and_time_invalid_speed():
  function test_calculate_distance_and_time_same_coordinates (line 26) | def test_calculate_distance_and_time_same_coordinates():
  function mock_input (line 37) | def mock_input():
  function test_main (line 42) | def test_main(mock_input, capsys):
  function test_main_invalid_coordinates (line 49) | def test_main_invalid_coordinates(mock_input, capsys):
  function test_main_invalid_speed (line 55) | def test_main_invalid_speed(mock_input, capsys):
  function test_main_zero_speed (line 61) | def test_main_zero_speed(mock_input, capsys):
  function test_main_same_coordinates (line 67) | def test_main_same_coordinates(mock_input, capsys):

FILE: Gesture-Based-Game-Controller/main.py
  function detect_direction (line 21) | def detect_direction(landmarks):

FILE: Headlight Detection/headlightDetection.py
  function wait (line 6) | def wait(t):
  function scenario (line 13) | def scenario(condition):

FILE: Helmet Detection/main.py
  function helmet_or_nonhelmet (line 16) | def helmet_or_nonhelmet(helmet_roi):

FILE: Learn-FastAPI/FastAPI-CURD.py
  class Task (line 9) | class Task(BaseModel):
  function create_task (line 20) | def create_task(task: Task):
  function read_tasks (line 27) | def read_tasks():
  function read_task (line 32) | def read_task(task_id: UUID):
  function update_task (line 42) | def update_task(task_id: UUID, task_update: Task):
  function delete_task (line 54) | def delete_task(task_id: UUID):

FILE: Learn-FastAPI/FastAPI-Tutorial.py
  class Token (line 25) | class Token(BaseModel):
  class TokenData (line 29) | class TokenData(BaseModel):
  class User (line 32) | class User(BaseModel):
  class UserInDB (line 38) | class UserInDB(User):
  function verify_password (line 50) | def verify_password(plain_password, hashed_password):
  function get_password_hash (line 53) | def get_password_hash(password):
  function get_user (line 57) | def get_user(db, username: str):
  function authenticate_user (line 62) | def authenticate_user(db, username: str, password: str):
  function create_access_token (line 71) | def create_access_token(data: dict, expires_delta: timedelta or None = N...
  function get_current_user (line 82) | async def get_current_user(token: str = Depends(oauth2_scheme)):
  function get_current_active_user (line 104) | async def get_current_active_user(current_user: UserInDB = Depends(get_c...
  function login_for_access_token (line 111) | async def login_for_access_token(form_data: OAuth2PasswordRequestForm = ...
  function read_users_me (line 128) | async def read_users_me(current_user: User = Depends(get_current_active_...
  function read_own_items (line 133) | async def read_own_items(current_user: User = Depends(get_current_active...

FILE: Mental Health chatbot/Mental_health_bot.py
  function preprocess_text (line 47) | def preprocess_text(text):
  function chatbot_response (line 94) | def chatbot_response(user_input):

FILE: Merge PDFs/merge.py
  function by_appending (line 4) | def by_appending():
  function by_inserting (line 12) | def by_inserting():

FILE: Mood Based Music Recommender/Emosic-Spoti.py
  function recommend_tracks (line 33) | def recommend_tracks(emotion):
  function get_max_lengths (line 53) | def get_max_lengths(playlist):

FILE: Movie Scraper/scrape.py
  function requestUrl_and_bs4 (line 5) | def requestUrl_and_bs4(url:str):
  function getMovieDetails (line 17) | def getMovieDetails(movieName:str):
  function main (line 81) | def main():

FILE: My-Personal-Journal/app.py
  function index (line 10) | def index():
  function add (line 15) | def add():
  function search (line 28) | def search():
  function list_tags (line 47) | def list_tags():
  function entries_by_tag (line 66) | def entries_by_tag(tag):

FILE: My-Personal-Journal/database.py
  function add_entry (line 10) | def add_entry(user_id, mood, content, tags):
  function search_entries (line 15) | def search_entries(user_id, search_term=None, date=None):

FILE: My-Personal-Journal/journal_app.py
  function connect_db (line 6) | def connect_db():
  function create_table (line 9) | def create_table():
  function add_entry (line 24) | def add_entry(user_id, mood, content, tags):
  function search_entries (line 33) | def search_entries(user_id, search_term=None, date=None):

FILE: My-Personal-Journal/ui.py
  class JournalApp (line 82) | class JournalApp(tk.Tk):
    method __init__ (line 83) | def __init__(self):
    method add_entry (line 98) | def add_entry(self):
    method save_entry (line 120) | def save_entry(self):
    method search_entries (line 132) | def search_entries(self):
    method perform_search (line 144) | def perform_search(self):

FILE: Notepad/main.py
  function save_file (line 8) | def save_file():
  function clear (line 16) | def clear():
  function open_file (line 20) | def open_file():

FILE: OCR Image-to-Text Conversion/main.py
  function extract_text_from_image (line 5) | def extract_text_from_image(image_path):
  function main (line 17) | def main():

FILE: Password Generator/main.py
  class App (line 5) | class App:
    method __init__ (line 6) | def __init__(self):
    method label (line 18) | def label(self):
    method entry (line 22) | def entry(self):
    method button (line 26) | def button(self):
    method generate_password (line 30) | def generate_password(self):

FILE: Plagiarism-Checker/main.py
  function vectorize (line 10) | def vectorize(Text): return TfidfVectorizer().fit_transform(Text).toarray()
  function similarity (line 11) | def similarity(doc1, doc2): return cosine_similarity([doc1, doc2])
  function check_plagiarism (line 19) | def check_plagiarism():

FILE: Pomodoro Timer/main.py
  function countdown (line 4) | def countdown(minutes, label):
  function handle_pause_stop (line 15) | def handle_pause_stop():
  function pomodoro_timer (line 30) | def pomodoro_timer(work_min, short_break_min, long_break_min, cycles):
  function repeat_or_end (line 48) | def repeat_or_end():
  function get_valid_input (line 55) | def get_valid_input(prompt):

FILE: Random Movie Selector/main.py
  class ChooseMovie (line 5) | class ChooseMovie(object):
    method __init__ (line 6) | def __init__(self):
    method __repr__ (line 10) | def __repr__(self):

FILE: Real-Time Cryptocurrency Price Tracker/main.py
  function get_crypto_price (line 8) | def get_crypto_price(crypto_symbol):
  function get_historical_data (line 28) | def get_historical_data(crypto_symbol, days):
  function plot_historical_data (line 44) | def plot_historical_data(historical_data, crypto_symbol):
  function main (line 59) | def main():

FILE: Recipe Finder with Meal Planner/main.py
  function find_recipes (line 8) | def find_recipes(ingredients):
  function get_recipe_details (line 25) | def get_recipe_details(recipe_id):
  function plan_meals (line 37) | def plan_meals(ingredients):
  function user_interface (line 47) | def user_interface():

FILE: Resume Builder/resume_builder.py
  function clear_screen (line 7) | def clear_screen():
  function back_to_menu (line 22) | def back_to_menu():
  function add_contact_info (line 26) | def add_contact_info():
  function add_experience (line 38) | def add_experience():
  function add_education (line 58) | def add_education():
  function add_skills (line 77) | def add_skills():
  function add_projects (line 84) | def add_projects():
  function add_certifications (line 102) | def add_certifications():
  function add_achievements (line 119) | def add_achievements():
  class ResumePDF (line 132) | class ResumePDF(FPDF):
    method header (line 133) | def header(self):
    method add_section (line 141) | def add_section(self, title, content):
  function generate_pdf (line 149) | def generate_pdf():
  function interactive_menu (line 213) | def interactive_menu():

FILE: Simple Assistant/assistant.py
  function speak (line 12) | def speak(audio):
  function takecommand (line 18) | def takecommand():
  function wish (line 34) | def wish():

FILE: Simple Assistant/raj_mistry01/main.py
  function speak (line 29) | def speak(audio) :
  function takecommand (line 34) | def takecommand() :
  function startlistening (line 49) | def startlistening():
  function pauseListening (line 52) | def pauseListening() :
  function weatherforecast (line 55) | def weatherforecast(city) :
  function wish (line 63) | def wish() :
  function main (line 81) | def main() :

FILE: Snake-Game/Snake.py
  class Snake (line 10) | class Snake:
    method __init__ (line 11) | def __init__(self):
    method create_snake (line 17) | def create_snake(self):
    method add_segment (line 20) | def add_segment(self, position):
    method reset (line 26) | def reset(self):
    method extend (line 32) | def extend(self):
    method move (line 34) | def move(self):
    method up (line 43) | def up(self):
    method down (line 47) | def down(self):
    method left (line 51) | def left(self):
    method right (line 55) | def right(self):

FILE: Snake-Game/food.py
  class Food (line 5) | class Food(Turtle):
    method __init__ (line 7) | def __init__(self):
    method refresh (line 16) | def refresh(self):

FILE: Snake-Game/scoreboard.py
  class Score (line 3) | class Score(Turtle):
    method __init__ (line 6) | def __init__(self):
    method update_score (line 17) | def update_score(self):
    method reset (line 20) | def reset(self):
    method increase_score (line 25) | def increase_score(self):

FILE: Speech To Text/main.py
  function record_voice (line 3) | def record_voice():

FILE: Telegram Bot/main.py
  function getWeather (line 20) | def getWeather():
  function sendWeather (line 46) | def sendWeather(message):
  function start (line 55) | def start(message):
  function stop (line 63) | def stop(message):
  function send_welcome (line 70) | def send_welcome(message):

FILE: Text Summarizer/text_summarizer.py
  function preprocess_sentences (line 55) | def preprocess_sentences(sentences):
  function generate_sentence_vectors (line 85) | def generate_sentence_vectors(sentences, word_embeddings, embedding_dim=...
  function build_similarity_matrix (line 117) | def build_similarity_matrix(sentence_vectors):
  function rank_sentences (line 143) | def rank_sentences(similarity_matrix, sentences, top_n=10):
  function download_glove (line 168) | def download_glove(glove_url, glove_file, glove_dir):
  function summarize_text (line 203) | def summarize_text(input_csv, glove_file, top_n=10):

FILE: Text To Speech/text_to_speech.py
  function text_to_speech (line 5) | def text_to_speech(

FILE: Text_Adventure_Game/text_adventure_game.py
  class Opponent (line 5) | class Opponent:
    method __init__ (line 6) | def __init__(self, name, health, attack_strength):
    method attack (line 11) | def attack(self):
  class WeakOpponent (line 16) | class WeakOpponent(Opponent):
    method __init__ (line 17) | def __init__(self, name, health, attack_strength):
    method attack (line 20) | def attack(self):
  class FinalBoss (line 26) | class FinalBoss(Opponent):
    method __init__ (line 27) | def __init__(self, name, health, attack_strength, special_power):
    method attack (line 31) | def attack(self):
  function save_game (line 42) | def save_game(player_name, inventory, doors_chosen):
  function load_game (line 52) | def load_game():
  function choose_door (line 71) | def choose_door(doors_chosen, inventory):
  function combat (line 113) | def combat(choice, inventory):
  function play_game (line 167) | def play_game():

FILE: Tic-Tac-Toc using AI (min-max)/tic_tac_toc.py
  function draw_lines (line 32) | def draw_lines():
  function draw_figures (line 39) | def draw_figures():
  function mark_square (line 55) | def mark_square(row, col, player):
  function available_square (line 58) | def available_square(row, col):
  function is_board_full (line 61) | def is_board_full():
  function check_win (line 64) | def check_win(player):
  function display_message (line 77) | def display_message(message):
  function minimax (line 85) | def minimax(board, depth, is_maximizing):
  function ai_move (line 115) | def ai_move():
  function easy_ai_move (line 132) | def easy_ai_move():
  function restart (line 138) | def restart():

FILE: To Do List/RithwikBejadi/To Do App/To_Do_AppTkInter.py
  class TodoApp (line 6) | class TodoApp:
    method __init__ (line 7) | def __init__(self, root):
    method create_sidebar (line 31) | def create_sidebar(self):
    method apply_theme (line 84) | def apply_theme(self):
    method toggle_theme (line 108) | def toggle_theme(self):
    method create_database (line 113) | def create_database(self):
    method create_widgets (line 129) | def create_widgets(self):
    method load_tasks (line 163) | def load_tasks(self):
    method load_completed_tasks (line 173) | def load_completed_tasks(self):
    method load_pending_tasks (line 182) | def load_pending_tasks(self):
    method add_task (line 187) | def add_task(self):
    method search_tasks (line 208) | def search_tasks(self, event):
    method close_app (line 221) | def close_app(self):

FILE: To Do List/main.py
  function add_task (line 15) | def add_task():
  function delete_task (line 23) | def delete_task():
  function populate_tasks (line 29) | def populate_tasks():

FILE: Translator/translate.py
  class TranslateClass (line 4) | class TranslateClass(object):
    method __init__ (line 5) | def __init__(self, word, lang):
    method __repr__ (line 10) | def __repr__(self):

FILE: URL Sortener/main.py
  function shorten_url (line 4) | def shorten_url(url):

FILE: Weather Alert/main.py
  function fetch_weather (line 20) | def fetch_weather(city):
  function check_alerts (line 40) | def check_alerts(data, temp_threshold, wind_speed_threshold):
  function main (line 71) | def main():

FILE: Word_frequency_counter/main.py
  function find_words_frequency (line 4) | def find_words_frequency(file_path):
  function main (line 23) | def main():

FILE: Youtube Video Downloader/main.py
  function download_video (line 3) | def download_video(url, resolution='highest'):

FILE: personal-finance-tracker/database.py
  function get_connection (line 5) | def get_connection():
  function initialize_database (line 9) | def initialize_database():

FILE: personal-finance-tracker/main.py
  function main_menu (line 6) | def main_menu():

FILE: personal-finance-tracker/savings.py
  function set_goal (line 3) | def set_goal():
  function track_savings_progress (line 15) | def track_savings_progress(balance):

FILE: personal-finance-tracker/tracker.py
  function add_income (line 4) | def add_income():
  function add_expense (line 18) | def add_expense():
  function view_summary (line 32) | def view_summary():

FILE: personal-finance-tracker/visualization.py
  function bar_chart_expense (line 4) | def bar_chart_expense():
  function pie_chart_expense (line 26) | def pie_chart_expense():
  function line_chart_expense_over_time (line 45) | def line_chart_expense_over_time():
  function stacked_bar_chart_income_expense (line 67) | def stacked_bar_chart_income_expense():
  function histogram_expense_distribution (line 98) | def histogram_expense_distribution():
  function visualize_data (line 118) | def visualize_data():
Condensed preview — 227 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (317K chars).
[
  {
    "path": ".github/ISSUE_TEMPLATE/PROJECT_SUGGESTION_TEMPLATE.md",
    "chars": 812,
    "preview": "---\nname: Project Suggestion\nabout: Propose an idea for a new project\ntitle: \"\"\nlabels: \"Project Suggestion\"\nassignees: "
  },
  {
    "path": ".github/ISSUE_TEMPLATE/bug_report.md",
    "chars": 468,
    "preview": "---\nname: \"Bug Report\"\nabout: \"Report a bug or issue.\"\ntitle: \"Bug Report Title\"\nlabels: [\"bug\", \"help wanted\"]\n---\n\n## "
  },
  {
    "path": ".github/ISSUE_TEMPLATE/config.yml",
    "chars": 801,
    "preview": "blank_issues_enabled: false \ncontact: false \n\ntemplates:\n  - name: \"Project Suggestion\"\n    description: \"Propose an ide"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/feature_request.md",
    "chars": 411,
    "preview": "---\nname: \"Feature Request\"\nabout: \"Request a new feature or enhancement.\"\ntitle: \"Feature Request Title\"\nlabels: [\"feat"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/other_issue.md",
    "chars": 432,
    "preview": "---\nname: \"Other\"\nabout: \"Use this template for any other issues or inquiries.\"\ntitle: \"Other Issue Title\"\nlabels: [\"que"
  },
  {
    "path": ".github/PROJECT_SUGGESTION_TEMPLATE.md",
    "chars": 684,
    "preview": "### Project Suggestion Title\n_A concise title for your project suggestion._\n\n### Description\n_Provide a detailed descrip"
  },
  {
    "path": ".github/pull_request_template.md",
    "chars": 504,
    "preview": "### Developer Checklist\n- [ ] Adhered to the guidelines outlined in the README & Contributing file.\n- [ ] Maintained the"
  },
  {
    "path": ".github/workflows/generate-project-list.yml",
    "chars": 1938,
    "preview": "name: Generate Project List\n\non:\n  push:\n    branches:\n      - main\n\njobs:\n  generate-list:\n    runs-on: ubuntu-latest\n "
  },
  {
    "path": ".github/workflows/welcome.yml",
    "chars": 3123,
    "preview": "name: Welcome Comments\n\npermissions:\n  actions: write\n  attestations: write\n  checks: write\n  contents: write\n  deployme"
  },
  {
    "path": "Age Calculator/calculate.py",
    "chars": 1043,
    "preview": "import time\nfrom calendar import isleap\n\ndef judge_leap_year(year):\n    if isleap(year):\n        return True\n    else:\n "
  },
  {
    "path": "Age Calculator/runtime.txt",
    "chars": 13,
    "preview": "python-3.10.7"
  },
  {
    "path": "Alarm Bot/main.py",
    "chars": 2067,
    "preview": "from tkinter import *\nimport datetime\nimport time\nimport winsound\nfrom threading import *\n\nroot = Tk()\nroot.geometry(\"40"
  },
  {
    "path": "Alarm Bot/runtime.txt",
    "chars": 13,
    "preview": "python-3.10.7"
  },
  {
    "path": "Ascii Art Generator/generate.py",
    "chars": 1052,
    "preview": "import cv2\nimport numpy as np\nimport sys\n\nsymbols_list = [\"#\", \"-\", \"*\", \".\", \"+\", \"o\"]\nthreshold_list = [0, 50, 100, 15"
  },
  {
    "path": "Ascii Art Generator/runtime.txt",
    "chars": 13,
    "preview": "python-3.10.7"
  },
  {
    "path": "Audio Book Generator/main.py",
    "chars": 444,
    "preview": "from gtts import gTTS\nimport PyPDF2\n\npdf_File = open('name.pdf', 'rb') \n\npdf_Reader = PyPDF2.PdfFileReader(pdf_File)\ncou"
  },
  {
    "path": "Audio Book Generator/runtime.txt",
    "chars": 13,
    "preview": "python-3.10.7"
  },
  {
    "path": "CODE_OF_CONDUCT.md",
    "chars": 2656,
    "preview": "# Code of Conduct\n*As contributors and maintainers of this project, we pledge to respect all people who contribute throu"
  },
  {
    "path": "CONTRIBUTING.md",
    "chars": 2872,
    "preview": "# Contributing Guidelines \n*Thank you for your interest in contributing to this Python project! We welcome and appreciat"
  },
  {
    "path": "CountDown Timer/main.py",
    "chars": 3324,
    "preview": "from tkinter import *\nimport tkinter as tk\n\nclass Application(Frame):\n    def __init__(self,master):\n        super(Appli"
  },
  {
    "path": "CountDown Timer/runtime.txt",
    "chars": 13,
    "preview": "python-3.10.7"
  },
  {
    "path": "Currency Converter/main.py",
    "chars": 738,
    "preview": "import requests\n\nclass Currency_convertor:\n\trates = {}\n\tdef __init__(self, url):\n\t\tdata = requests.get(url).json()\n\t\tsel"
  },
  {
    "path": "Currency Converter/runtime.txt",
    "chars": 13,
    "preview": "python-3.10.7"
  },
  {
    "path": "Custom GPT/README.md",
    "chars": 2265,
    "preview": "# Conversational Retrieval with LangChain and OpenAI\r\n\r\nThis directory contains a Python script that implements a conver"
  },
  {
    "path": "Custom GPT/data/data.txt",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "Custom GPT/example-env",
    "chars": 31,
    "preview": "OPENAI_API_KEY = \"your_api_key\""
  },
  {
    "path": "Custom GPT/main.py",
    "chars": 1587,
    "preview": "import os\r\nimport openai\r\nimport sys\r\nfrom langchain.chains import ConversationalRetrievalChain\r\nfrom langchain.chat_mod"
  },
  {
    "path": "Customizable_Workout_Playlist_Generator/README_SONG.md",
    "chars": 1905,
    "preview": "# Customizable Workout Playlist Generator\n\nThis Python application generates customized workout playlists based on user "
  },
  {
    "path": "Customizable_Workout_Playlist_Generator/hiit_playlist.json",
    "chars": 5661,
    "preview": "[\n  {\n    \"title\": \"Lose Yourself\",\n    \"artist\": \"Eminem\",\n    \"duration\": 326,\n    \"bpm\": 171,\n    \"genre\": \"hip-hop\"\n"
  },
  {
    "path": "Customizable_Workout_Playlist_Generator/playlist.py",
    "chars": 10950,
    "preview": "import json\nfrom datetime import timedelta\nimport random\nfrom typing import List, Dict, Optional\nimport os\n\n# Add these "
  },
  {
    "path": "Customizable_Workout_Playlist_Generator/requirements.txt",
    "chars": 52,
    "preview": "spotipy==2.19.0\nrequests==2.26.0\nytmusicapi==0.22.0\n"
  },
  {
    "path": "Digital Clock/main.py",
    "chars": 553,
    "preview": "from time import strftime\nfrom tkinter import Label, Tk\n\nwindow = Tk()\nwindow.title(\"Digital Clock\")\nwindow.geometry(\"30"
  },
  {
    "path": "Digital Clock/runtime.txt",
    "chars": 13,
    "preview": "python-3.10.7"
  },
  {
    "path": "Example README.md",
    "chars": 599,
    "preview": "# Script Name\nShort description of package/script\n- If package, list of functionalities/scripts it can perform\n- If stan"
  },
  {
    "path": "Expense Splitter/README.md",
    "chars": 363,
    "preview": "# Expense Splitter\n\nA simple Python script to split expenses among a group of people.\n\n## Features\n\n- Calculates the sha"
  },
  {
    "path": "Expense Splitter/main.py",
    "chars": 1073,
    "preview": "def calculate_split(total_amount: float, number_of_people: int, currency: str) -> None:\n    if number_of_people < 1:\n   "
  },
  {
    "path": "Expense Splitter/runtme.txt",
    "chars": 13,
    "preview": "Python 3.12.3"
  },
  {
    "path": "Extractive Text Summarization/readme.md",
    "chars": 2944,
    "preview": "\n# 📝 Advanced Extractive Text Summarization Model\n\nWelcome to the **Advanced Extractive Text Summarization Model**! This"
  },
  {
    "path": "Extractive Text Summarization/requirements.txt",
    "chars": 58,
    "preview": "nltk==3.9.1\nnumpy==2.1.3\nscikit_learn==1.5.2\nspacy==3.8.2\n"
  },
  {
    "path": "Extractive Text Summarization/summary.py",
    "chars": 6406,
    "preview": "import os\nimport re\nimport heapq\nimport numpy as np\nfrom collections import defaultdict\nfrom typing import List, Dict, T"
  },
  {
    "path": "Facebook Video Downloader/main.py",
    "chars": 693,
    "preview": "import os, re, requests, wget\n\nroot = os.path.dirname(os.path.abspath(__file__))\npath = os.path.join(root, \"Downloads\")\n"
  },
  {
    "path": "Facebook Video Downloader/requirements.txt",
    "chars": 26,
    "preview": "requests==2.26.0\nwget==3.2"
  },
  {
    "path": "Facebook Video Downloader/runtime.txt",
    "chars": 13,
    "preview": "python-3.10.7"
  },
  {
    "path": "Gauss Elimination with Partial Pivoting/README.md",
    "chars": 401,
    "preview": "# Implementation of Gauss Elimination with Partial Pivoting\nThis implementaion is a Gauss Elimination with Partial Pivot"
  },
  {
    "path": "Gauss Elimination with Partial Pivoting/main.py",
    "chars": 2983,
    "preview": "def gauss_partial(matrix: list, index_column: int):\n    index_max_val = index_column\n\n    for i in range(index_column, l"
  },
  {
    "path": "Gauss Elimination with Partial Pivoting/runtime.txt",
    "chars": 13,
    "preview": "python-3.12.6"
  },
  {
    "path": "Geographic Distance/README.md",
    "chars": 2057,
    "preview": "# Geographic Distance and Travel Time Calculator\n\nThis Python script calculates the geodesic distance between two geogra"
  },
  {
    "path": "Geographic Distance/geographic_distance.py",
    "chars": 2014,
    "preview": "from geopy.distance import geodesic\n\n\ndef calculate_distance_and_time(coord1, coord2, avg_speed):\n    \"\"\"\n    Calculate "
  },
  {
    "path": "Geographic Distance/requirements.txt",
    "chars": 27,
    "preview": "geopy==2.4.1\npytest==8.3.3\n"
  },
  {
    "path": "Geographic Distance/runtime.txt",
    "chars": 13,
    "preview": "python-3.12.7"
  },
  {
    "path": "Geographic Distance/test_geographic_distance.py",
    "chars": 2322,
    "preview": "from unittest.mock import patch\n\nimport pytest\nfrom geographic_distance import calculate_distance_and_time, main\n\n\ndef t"
  },
  {
    "path": "Gesture-Based-Game-Controller/main.py",
    "chars": 2870,
    "preview": "import cv2\nimport mediapipe as mp\nimport numpy as np\nimport time\n\n# Initialize MediaPipe hands module\nmp_hands = mp.solu"
  },
  {
    "path": "Gesture-Based-Game-Controller/readme.md",
    "chars": 800,
    "preview": "# Hand Gesture Control Using Computer Vision\n\nThis project uses computer vision and machine learning to detect hand gest"
  },
  {
    "path": "Gesture-Based-Game-Controller/requirements.txt",
    "chars": 56,
    "preview": "opencv-python==4.8.0.74\nmediapipe==0.10.0\nnumpy==1.24.2\n"
  },
  {
    "path": "Gesture-Based-Game-Controller/runtime.txt",
    "chars": 13,
    "preview": "python-3.12.7"
  },
  {
    "path": "Handwritten-Assignments/main.py",
    "chars": 1166,
    "preview": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n# Author: Aman Kumar\n# Version: 1.0.0\n\nimport pywhatkit as pw\n\ntext_to_con"
  },
  {
    "path": "Handwritten-Assignments/runtime.txt",
    "chars": 13,
    "preview": "python-3.10.7"
  },
  {
    "path": "Headlight Detection/headlightDetection.py",
    "chars": 1027,
    "preview": "from shutil import which\nimport numpy as np\nfrom matplotlib import pyplot as plt\nimport cv2, time\n\ndef wait(t):\n    time"
  },
  {
    "path": "Headlight Detection/runtime.txt",
    "chars": 13,
    "preview": "python-3.10.7"
  },
  {
    "path": "Helmet Detection/main.py",
    "chars": 1047,
    "preview": "from http.client import _DataType\nimport cv2, random, os, time, imutils\nimport numpy as np\nfrom tensorflow.keras.models "
  },
  {
    "path": "Helmet Detection/runtime.txt",
    "chars": 13,
    "preview": "python-3.10.7"
  },
  {
    "path": "Image Compression/main.py",
    "chars": 333,
    "preview": "import cv2\n\nimg = cv2.imread('input.jpg')\nprint(img.shape)\n\nk = 5\nwidth = int((img.shape[1])/k)\nheight = int((img.shape["
  },
  {
    "path": "Image Compression/runtime.txt",
    "chars": 13,
    "preview": "python-3.10.7"
  },
  {
    "path": "ImageSize Reducer/reduce.py",
    "chars": 338,
    "preview": "import cv2\n\nimg = cv2.imread('test.jpg')\nprint(img.shape)\n\nk = 5\nwidth = int((img.shape[1])/k)\nheight = int((img.shape[0"
  },
  {
    "path": "ImageSize Reducer/runtime.txt",
    "chars": 13,
    "preview": "python-3.10.7"
  },
  {
    "path": "Img-Steganograpy/main.py",
    "chars": 316,
    "preview": "from stegano import lsbset\nfrom stegano.lsbset import generators\n\n# Hide the message in the image\nflag=\"This is sample t"
  },
  {
    "path": "Img-Steganograpy/runtime.txt",
    "chars": 14,
    "preview": "python-3.10.7\n"
  },
  {
    "path": "LICENSE",
    "chars": 1079,
    "preview": "The MIT License (MIT)\n\nCopyright (c) 2023 by Aman Kumar\n\nPermission is hereby granted, free of charge, to any person obt"
  },
  {
    "path": "Learn-FastAPI/FastAPI-CURD.py",
    "chars": 1995,
    "preview": "from fastapi import FastAPI, HTTPException\r\nfrom pydantic import BaseModel\r\nfrom typing import List, Optional\r\nfrom uuid"
  },
  {
    "path": "Learn-FastAPI/FastAPI-Tutorial.py",
    "chars": 4380,
    "preview": "from fastapi import Depends, FastAPI, HTTPException, status\r\nfrom fastapi.security import OAuth2PasswordBearer, OAuth2Pa"
  },
  {
    "path": "Learn-FastAPI/README.md",
    "chars": 1851,
    "preview": "# FastAPI CRUD and Authentication Example\r\n\r\nThis directory contains two FastAPI applications: one for basic CRUD operat"
  },
  {
    "path": "Mental Health chatbot/Mental_health_bot.py",
    "chars": 4137,
    "preview": "import pandas as pd\nimport numpy as np\nimport json\nimport nltk\nfrom nltk.stem import WordNetLemmatizer\nfrom sklearn.feat"
  },
  {
    "path": "Mental Health chatbot/README_BOT.md",
    "chars": 2063,
    "preview": "# Mental Health Chatbot\n\nThis project implements a chatbot designed to provide support and information related to mental"
  },
  {
    "path": "Mental Health chatbot/requirements.txt",
    "chars": 42,
    "preview": "pandas\nnumpy\nnltk\nscikit-learn\ntensorflow\n"
  },
  {
    "path": "Merge PDFs/merge.py",
    "chars": 433,
    "preview": "from PyPDF2 import PdfFileMerger\n\n\ndef by_appending():\n    merger = PdfFileMerger()\n    f1 = open(\"testPDF1.pdf\", \"rb\")\n"
  },
  {
    "path": "Merge PDFs/runtime.txt",
    "chars": 13,
    "preview": "python-3.10.7"
  },
  {
    "path": "MobileNumber Tracker/track.py",
    "chars": 543,
    "preview": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n# Author: Aman Kumar\n# Version: 1.0.0 \n\nimport phonenumbers\nfrom phonenumb"
  },
  {
    "path": "Mood Based Music Recommender/Emosic-Spoti.py",
    "chars": 3715,
    "preview": "import spotipy\nfrom spotipy.oauth2 import SpotifyClientCredentials\nimport random\n\n# Authentication - Replace with your c"
  },
  {
    "path": "Mood Based Music Recommender/README.md",
    "chars": 2212,
    "preview": "# Music Recommendation Based on Emotion\n\nA Python script that recommends music playlists based on user-inputted emotions"
  },
  {
    "path": "Mood Based Music Recommender/requirement.txt",
    "chars": 33,
    "preview": "requests==2.32.3\nspotipy==2.24.0\n"
  },
  {
    "path": "Movie Scraper/runtime.txt",
    "chars": 13,
    "preview": "python-3.10.7"
  },
  {
    "path": "Movie Scraper/scrape.py",
    "chars": 3490,
    "preview": "from bs4 import BeautifulSoup\nimport requests\nfrom fake_useragent import UserAgent\n\ndef requestUrl_and_bs4(url:str):\n   "
  },
  {
    "path": "My-Personal-Journal/README.md",
    "chars": 1180,
    "preview": "# Personal Journal\n\nA simple web-based application for maintaining a personal journal. Users can create entries, tag the"
  },
  {
    "path": "My-Personal-Journal/app.py",
    "chars": 2325,
    "preview": "from flask import Flask, render_template, request, redirect, url_for\nfrom journal_app import add_entry, search_entries\nf"
  },
  {
    "path": "My-Personal-Journal/database.py",
    "chars": 747,
    "preview": "from sqlalchemy.orm import sessionmaker\nfrom models import JournalEntry, Base\nfrom sqlalchemy import create_engine\n\nengi"
  },
  {
    "path": "My-Personal-Journal/journal_app.py",
    "chars": 1639,
    "preview": "import sqlite3\nfrom datetime import datetime\n\nDB_NAME = \"journal.db\"\n\ndef connect_db():\n    return sqlite3.connect(DB_NA"
  },
  {
    "path": "My-Personal-Journal/requirements.txt",
    "chars": 67,
    "preview": "flask\nsqlalchemy\n# sqlite3\nbcrypt\npandas\nmatplotlib\n# tkinter\nflask"
  },
  {
    "path": "My-Personal-Journal/static/style.css",
    "chars": 4448,
    "preview": "/* General Styles */\nbody {\n    font-family: 'Arial', sans-serif;\n    margin: 0;\n    padding: 0;\n    background-color: #"
  },
  {
    "path": "My-Personal-Journal/templates/add.html",
    "chars": 1697,
    "preview": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width"
  },
  {
    "path": "My-Personal-Journal/templates/index.html",
    "chars": 753,
    "preview": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width"
  },
  {
    "path": "My-Personal-Journal/templates/search.html",
    "chars": 458,
    "preview": "<!DOCTYPE html>\n<html>\n<head>\n    <title>Search Journal Entries</title>\n    <link rel=\"stylesheet\" type=\"text/css\" href="
  },
  {
    "path": "My-Personal-Journal/templates/search_results.html",
    "chars": 523,
    "preview": "<!DOCTYPE html>\n<html>\n<head>\n    <title>Search Results</title>\n    <link rel=\"stylesheet\" type=\"text/css\" href=\"{{ url_"
  },
  {
    "path": "My-Personal-Journal/templates/tags.html",
    "chars": 387,
    "preview": "<!DOCTYPE html>\n<html>\n<head>\n    <title>Tags</title>\n    <link rel=\"stylesheet\" type=\"text/css\" href=\"{{ url_for('stati"
  },
  {
    "path": "My-Personal-Journal/ui.py",
    "chars": 5589,
    "preview": "# from main import add_entry, search_entries\n# import datetime\n\n# def display_menu():\n#     print(\"\\n=== My Personal Jou"
  },
  {
    "path": "Notepad/main.py",
    "chars": 1054,
    "preview": "from tkinter import *\nfrom tkinter import filedialog, messagebox\n\nroot = Tk()\nroot.geometry(\"700x500\")\nroot.title(\"Aman'"
  },
  {
    "path": "OCR Image-to-Text Conversion/README.md",
    "chars": 2753,
    "preview": "## Introduction\n\nImage Text Extractor is a Python application that utilizes Tesseract OCR to extract text from images. T"
  },
  {
    "path": "OCR Image-to-Text Conversion/main.py",
    "chars": 844,
    "preview": "import pytesseract\nfrom PIL import Image\nimport os\n\ndef extract_text_from_image(image_path):\n    \"\"\"Extracts text from a"
  },
  {
    "path": "OCR Image-to-Text Conversion/requirements.txt",
    "chars": 34,
    "preview": "pillow==11.0.0\npytesseract==0.3.13"
  },
  {
    "path": "PROJECTS.md",
    "chars": 6556,
    "preview": "# Project List\n\n* [Age Calculator](https://github.com/king04aman/All-In-One-Python-Projects/tree/main/Age%20Calculator)\n"
  },
  {
    "path": "Password Generator/main.py",
    "chars": 1345,
    "preview": "from tkinter import *\nfrom random import choice\nimport string\n\nclass App:\n    def __init__(self):\n        self.window = "
  },
  {
    "path": "Password Generator/requirements.txt",
    "chars": 10,
    "preview": "tk==0.1.0\n"
  },
  {
    "path": "Plagiarism-Checker/main.py",
    "chars": 1166,
    "preview": "import os\nfrom sklearn.feature_extraction.text import TfidfVectorizer\nfrom sklearn.metrics.pairwise import cosine_simila"
  },
  {
    "path": "Plagiarism-Checker/requirements.txt",
    "chars": 20,
    "preview": "scikit_learn==0.24.2"
  },
  {
    "path": "Plagiarism-Checker/test1.txt",
    "chars": 574,
    "preview": "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard "
  },
  {
    "path": "Plagiarism-Checker/test2.txt",
    "chars": 613,
    "preview": "It is a long established fact that a reader will be distracted by the readable content of a page when looking at its lay"
  },
  {
    "path": "Pomodoro Timer/README.md",
    "chars": 778,
    "preview": "# Pomodoro Timer\n\nA simple, customizable command line pomodoro timer built in Python.\n\n## Features\n\n- Customizable work,"
  },
  {
    "path": "Pomodoro Timer/main.py",
    "chars": 2276,
    "preview": "import time\n\n\ndef countdown(minutes, label):\n    total_seconds = minutes * 60\n    while total_seconds:\n        mins, sec"
  },
  {
    "path": "Pomodoro Timer/runtime.txt",
    "chars": 15,
    "preview": "Python 3.10.12\n"
  },
  {
    "path": "QR Code Generator/advanceQrGenerator.py",
    "chars": 394,
    "preview": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n# Author: Aman Kumar\n# Version: 1.0.0 \n\nimport qrcode\nfrom PIL import Imag"
  },
  {
    "path": "QR Code Generator/basicQrGenerator.py",
    "chars": 207,
    "preview": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n# Author: Aman Kumar\n# Version: 1.0.0 \n\nimport qrcode as qr\n\nqrImg = qr.ma"
  },
  {
    "path": "QR Code Generator/runtime.txt",
    "chars": 13,
    "preview": "python-3.10.7"
  },
  {
    "path": "README.md",
    "chars": 3890,
    "preview": "<h1 align=\"center\"> All-In-One-Python-Projects </h1>\n\n<!-- banner -->\n![All-In-One-Python-Projects](https://socialify.gi"
  },
  {
    "path": "Random Movie Selector/main.py",
    "chars": 351,
    "preview": "from imdb import IMDb\nimport random\n\n\nclass ChooseMovie(object):\n    def __init__(self):\n        self.cursor = IMDb()\n  "
  },
  {
    "path": "Random Movie Selector/runtime.txt",
    "chars": 13,
    "preview": "python-3.10.7"
  },
  {
    "path": "Random Quotes Generator/quotes.py",
    "chars": 989,
    "preview": "from bs4 import BeautifulSoup\nimport requests\nimport csv\n\nurl='http://quotes.toscrape.com'\n\nhtml=requests.get(url)\nbs=Be"
  },
  {
    "path": "Random Quotes Generator/runtime.txt",
    "chars": 13,
    "preview": "python-3.10.7"
  },
  {
    "path": "Real-Time Cryptocurrency Price Tracker/Readme.md",
    "chars": 1811,
    "preview": "# Cryptocurrency Price Tracker with CoinGecko API\n\n## Project Overview\n\nThe **Real-Time Cryptocurrency Price Tracker** i"
  },
  {
    "path": "Real-Time Cryptocurrency Price Tracker/main.py",
    "chars": 3176,
    "preview": "import requests\nimport matplotlib.pyplot as plt\nimport datetime\n\nCOINGECKO_API_URL = \"https://api.coingecko.com/api/v3\"\n"
  },
  {
    "path": "Real-Time Cryptocurrency Price Tracker/requirements.txt",
    "chars": 34,
    "preview": "requests==2.32.3\nmatplotlib==3.9.2"
  },
  {
    "path": "Real-Time Cryptocurrency Price Tracker/runtime.txt",
    "chars": 13,
    "preview": "python-3.9.20"
  },
  {
    "path": "Recipe Finder with Meal Planner/Readme.md",
    "chars": 1464,
    "preview": "# Meal Planner with Spoonacular API\n\n## Project Overview\n\nThe **Meal Planner** is a command-line application that helps "
  },
  {
    "path": "Recipe Finder with Meal Planner/main.py",
    "chars": 2684,
    "preview": "import requests\nimport random\n\n# Replace 'your_api_key_here' with your actual Spoonacular API key\nAPI_KEY = \"74de4b7826b"
  },
  {
    "path": "Recipe Finder with Meal Planner/runtime.txt",
    "chars": 14,
    "preview": "python-3.9.18\n"
  },
  {
    "path": "Resume Builder/README.md",
    "chars": 2180,
    "preview": "# Interactive Resume Builder\n\nThis Python project is a command-line interface (CLI) tool for building professional resum"
  },
  {
    "path": "Resume Builder/requirements.txt",
    "chars": 47,
    "preview": "geopy==2.2.0\nprompt_toolkit==3.0.8\nfpdf==1.7.2\n"
  },
  {
    "path": "Resume Builder/resume_builder.py",
    "chars": 8250,
    "preview": "from prompt_toolkit import prompt\nfrom prompt_toolkit.shortcuts import button_dialog\nfrom fpdf import FPDF\nimport os\n\n# "
  },
  {
    "path": "Simple Assistant/assistant.py",
    "chars": 3786,
    "preview": "import pyttsx3,datetime,os,random,requests\nimport wikipedia,webbrowser,sys,pywhatkit\nimport speech_recognition as sr \n\n\n"
  },
  {
    "path": "Simple Assistant/raj_mistry01/Readme.md",
    "chars": 4197,
    "preview": "# Jarvis - A Personal Voice Assistant 🗣️💻\n\nThis **Jarvis Personal Assistant** is a Python-based virtual assistant that c"
  },
  {
    "path": "Simple Assistant/raj_mistry01/main.py",
    "chars": 15691,
    "preview": "import pyttsx3\nimport wmi\nimport speech_recognition as sr\nimport datetime\nimport wolframalpha\nimport subprocess as sp\nim"
  },
  {
    "path": "Simple Assistant/raj_mistry01/requirements.txt",
    "chars": 151,
    "preview": "pyttsx3\nwmi\nSpeechRecognition\nwolframalpha\nnumpy\npyautogui\nrequests\nwikipedia-api\npywhatkit\nsmtplib3\npsutil\nkeyboard\nspe"
  },
  {
    "path": "Simple Assistant/runtime.txt",
    "chars": 13,
    "preview": "python-3.10.7"
  },
  {
    "path": "Snake-Game/README.md",
    "chars": 805,
    "preview": "# Snake Game 🐍\n\nA classic Snake Game built using Python. Control the snake, collect food, and try to achieve the highest"
  },
  {
    "path": "Snake-Game/Snake.py",
    "chars": 1566,
    "preview": "from turtle import Turtle, Screen\nSTARTING_POSITIONS = [(0, 0), (-20, 0), (-40, 0)]\nMOVE_DISTANCE = 20\nUP = 90\nDOWN = 27"
  },
  {
    "path": "Snake-Game/data.py",
    "chars": 73,
    "preview": "from scoreboard import Score\nscore = Score()\nHighScore = score.high_score"
  },
  {
    "path": "Snake-Game/data.txt",
    "chars": 1,
    "preview": "5"
  },
  {
    "path": "Snake-Game/food.py",
    "chars": 456,
    "preview": "from turtle import Turtle\nimport random\n\n\nclass Food(Turtle):\n\n    def __init__(self):\n        super().__init__()\n      "
  },
  {
    "path": "Snake-Game/main.py",
    "chars": 1293,
    "preview": "from turtle import Turtle, Screen\nimport time\nfrom food import Food\nfrom Snake import Snake\nfrom scoreboard import Score"
  },
  {
    "path": "Snake-Game/scoreboard.py",
    "chars": 1003,
    "preview": "from turtle import Turtle\n\nclass Score(Turtle):\n\n\n        def __init__(self):\n            self.score = 0\n            wit"
  },
  {
    "path": "Speech To Text/main.py",
    "chars": 644,
    "preview": "import speech_recognition\n\ndef record_voice():\n\tmicrophone = speech_recognition.Recognizer()\t\n\n\twith speech_recognition."
  },
  {
    "path": "Speech To Text/requirements.txt",
    "chars": 40,
    "preview": "PyAudio==0.2.11\nSpeechRecognition==3.8.1"
  },
  {
    "path": "Speech To Text/runtime.txt",
    "chars": 13,
    "preview": "python-3.10.7"
  },
  {
    "path": "Spell Checker/main.py",
    "chars": 238,
    "preview": "from textblob import TextBlob\n\nt = 1\nwhile t:\n    a = input(\"Enter the word to be checked:- \")\n    print(\"Original text:"
  },
  {
    "path": "Spell Checker/requirements.txt",
    "chars": 16,
    "preview": "textblob==0.17.1"
  },
  {
    "path": "Spell Checker/runtime.txt",
    "chars": 13,
    "preview": "python-3.10.7"
  },
  {
    "path": "Telegram Bot/main.py",
    "chars": 2637,
    "preview": "# Importing modules\nimport os, requests\nfrom apscheduler.schedulers.background import BackgroundScheduler\nimport telebot"
  },
  {
    "path": "Telegram Bot/requirements.txt",
    "chars": 43,
    "preview": "pyTelegramBotAPI==4.9.0\nAPScheduler==3.9.1\n"
  },
  {
    "path": "Telegram Bot/runtime.txt",
    "chars": 13,
    "preview": "python-3.10.7"
  },
  {
    "path": "Text Summarizer/README.md",
    "chars": 4775,
    "preview": "# TextRank-based Text Summarization\n\nThis project implements a **TextRank-based approach** to extract summaries from lar"
  },
  {
    "path": "Text Summarizer/requirements.txt",
    "chars": 103,
    "preview": "networkx==3.3\nnltk==3.9.1\nnumpy==2.1.2\npandas==2.2.3\nRequests==2.32.3\nscikit_learn==1.5.2\ntqdm==4.66.5\n"
  },
  {
    "path": "Text Summarizer/runtime.txt",
    "chars": 13,
    "preview": "python-3.10.7"
  },
  {
    "path": "Text Summarizer/sample.csv",
    "chars": 13791,
    "preview": "article_id,article_text,source\n1,\"Maria Sharapova has basically no friends as tennis players on the WTA Tour. The Russia"
  },
  {
    "path": "Text Summarizer/text_summarizer.py",
    "chars": 8830,
    "preview": "\"\"\"\nTextRank Text Summarization\n\nThis script implements a TextRank-based approach for text summarization.\nThe input is a"
  },
  {
    "path": "Text To Speech/README.md",
    "chars": 2585,
    "preview": "# Script Name\n**Text to Speech Converter using gTTS**\n\n- This script converts text into speech using Google’s Text-to-Sp"
  },
  {
    "path": "Text To Speech/requirements.txt",
    "chars": 12,
    "preview": "gTTS==2.5.2\n"
  },
  {
    "path": "Text To Speech/runtime.txt",
    "chars": 13,
    "preview": "python-3.10.7"
  },
  {
    "path": "Text To Speech/text_to_speech.py",
    "chars": 4304,
    "preview": "from gtts import gTTS\nimport os\n\n\ndef text_to_speech(\n    text,\n    lang=\"en\",\n    tld=\"com\",\n    slow=False,\n    lang_c"
  },
  {
    "path": "Text to Morse Code/main.py",
    "chars": 622,
    "preview": "symbols = {\n    \"a\": \".-\",\n    \"b\": \"-...\",\n    \"c\": \"-.-.\",\n    \"d\": \"-..\",\n    \"e\": \".\",\n    \"f\": \"..-.\",\n    \"g\": \".-"
  },
  {
    "path": "Text to Morse Code/runtime.txt",
    "chars": 13,
    "preview": "python-3.10.7"
  },
  {
    "path": "Text_Adventure_Game/readme.md",
    "chars": 2999,
    "preview": "# Text-Based Adventure Game\n\nWelcome to the **Text-Based Adventure Game**! This Python game is a simple interactive adve"
  },
  {
    "path": "Text_Adventure_Game/text_adventure_game.py",
    "chars": 7893,
    "preview": "import random\nimport os  # Used to check if the file exists\n\n# Opponent base class\nclass Opponent:\n    def __init__(self"
  },
  {
    "path": "Tic-Tac-Toc using AI (min-max)/README.md",
    "chars": 2408,
    "preview": "# Tic-Tac-Toe Game with AI\n\nThis project is a Tic-Tac-Toe game implemented in Python using the Pygame library. The game "
  },
  {
    "path": "Tic-Tac-Toc using AI (min-max)/requirements.txt",
    "chars": 28,
    "preview": "pygame==2.1.3\nnumpy==1.23.5\n"
  },
  {
    "path": "Tic-Tac-Toc using AI (min-max)/tic_tac_toc.py",
    "chars": 6291,
    "preview": "import pygame\nimport sys\nimport numpy as np\n\npygame.init()\n\nWIDTH, HEIGHT = 600, 600\nLINE_WIDTH = 15\nBOARD_ROWS = 3\nBOAR"
  },
  {
    "path": "To Do List/README.md",
    "chars": 360,
    "preview": "# To-Do List App\n\nThis is a simple To-Do List app built with Python using `tkinter` for the user interface and `sqlite3`"
  },
  {
    "path": "To Do List/RithwikBejadi/To Do App/README.md",
    "chars": 3158,
    "preview": "**#To-Do List Application**\nA simple and intuitive To-Do List application built with Python's Tkinter library for the GU"
  },
  {
    "path": "To Do List/RithwikBejadi/To Do App/To_Do_AppTkInter.py",
    "chars": 9891,
    "preview": "import tkinter as tk\nfrom tkinter import messagebox, ttk\nfrom tkcalendar import DateEntry\nimport sqlite3\n\nclass TodoApp:"
  },
  {
    "path": "To Do List/RithwikBejadi/To Do App/requirements.txt",
    "chars": 29,
    "preview": "tkinter==8.6\nsqlite3==3.45.3\n"
  },
  {
    "path": "To Do List/RithwikBejadi/To Do App/runtime.txt",
    "chars": 13,
    "preview": "Python 3.12.4"
  },
  {
    "path": "To Do List/main.py",
    "chars": 1347,
    "preview": "from tkinter import *\nimport sqlite3\n\nroot = Tk()\nroot.title(\"To-Do List App\")\nroot.geometry(\"400x400\")\n\nconn = sqlite3."
  },
  {
    "path": "To Do List/requirement.txt",
    "chars": 11,
    "preview": "tk\nsqlite3\n"
  },
  {
    "path": "To Do List/runtime.txt",
    "chars": 14,
    "preview": "python-3.8.10\n"
  },
  {
    "path": "Translator/runtime.txt",
    "chars": 13,
    "preview": "python-3.10.7"
  },
  {
    "path": "Translator/translate.py",
    "chars": 715,
    "preview": "from tabulate import tabulate\nfrom googletrans import Translator\n\nclass TranslateClass(object):\n    def __init__(self, w"
  },
  {
    "path": "URL Sortener/main.py",
    "chars": 186,
    "preview": "import pyshorteners\n\n\ndef shorten_url(url):\n    return pyshorteners.Shortener().tinyurl.short(url)\n\n\nurl = input(\"Please"
  },
  {
    "path": "URL Sortener/runtime.txt",
    "chars": 13,
    "preview": "python-3.10.7"
  },
  {
    "path": "Validate-Email/runtime.txt",
    "chars": 13,
    "preview": "python-3.10.7"
  },
  {
    "path": "Validate-Email/validate.py",
    "chars": 325,
    "preview": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n# Author: Aman Kumar\n# Version: 1.0.0 \n\nimport re\n\nemail_conditions = '^[a"
  },
  {
    "path": "Video Processor/README.md",
    "chars": 2174,
    "preview": "# Video Processing Tool\r\n\r\nIn this Python tool processes a video file by extracting short clips, applying filters and ef"
  },
  {
    "path": "Video Processor/requirements.txt",
    "chars": 39,
    "preview": "opencv-python==4.8.0.76\r\npysrt==1.1.2\r\n"
  },
  {
    "path": "Video Processor/video_processor.py",
    "chars": 2559,
    "preview": "import cv2\r\nimport pysrt\r\n\r\n# Load the input video\r\ninput_file = input(\"Enter the YouTube video link: \")\r\ncap = cv2.Vide"
  },
  {
    "path": "Video To Audio/main.py",
    "chars": 220,
    "preview": "import moviepy\nfrom tkinter.filedialog import *\n\naskForVideo = askopenfilename()\nvideo = moviepy.editor.VideoFileClip(as"
  },
  {
    "path": "Video To Audio/runtime.txt",
    "chars": 13,
    "preview": "python-3.10.7"
  },
  {
    "path": "Weather Alert/README.md",
    "chars": 1356,
    "preview": "# Weather Alert Script 🌦️\n\nA simple Python script that fetches weather data for your city and alerts you if the temperat"
  },
  {
    "path": "Weather Alert/main.py",
    "chars": 2484,
    "preview": "import requests\nimport json\nimport time\nimport os\nfrom dotenv import load_dotenv\n\n# Load environment variables from .env"
  },
  {
    "path": "Weather Alert/requirement.txt",
    "chars": 22,
    "preview": "requests\npython-dotenv"
  },
  {
    "path": "Weather Alert/runtime.txt",
    "chars": 13,
    "preview": "python-3.10.7"
  },
  {
    "path": "Word_frequency_counter/README.md",
    "chars": 705,
    "preview": "# Word Frequency Counter\n\nA simple python script that counts the number of words in a given text document and prints the"
  },
  {
    "path": "Word_frequency_counter/main.py",
    "chars": 849,
    "preview": "import regex as re\nfrom collections import Counter\n\ndef find_words_frequency(file_path):\n    '''\n    This script takes t"
  },
  {
    "path": "Word_frequency_counter/requirments.txt",
    "chars": 14,
    "preview": "regex=2.5.147\n"
  },
  {
    "path": "Word_frequency_counter/runtime.txt",
    "chars": 13,
    "preview": "python-3.10.7"
  },
  {
    "path": "Youtube Video Downloader/Readme.md",
    "chars": 1188,
    "preview": " # YouTube Video Downloader with yt-dlp Integration\n\n## Project Overview\n\nThis project is a command-line based YouTube V"
  },
  {
    "path": "Youtube Video Downloader/main.py",
    "chars": 853,
    "preview": "import yt_dlp\n\ndef download_video(url, resolution='highest'):\n    try:\n        # Set yt-dlp options for video download\n "
  },
  {
    "path": "Youtube Video Downloader/requirements.txt",
    "chars": 11,
    "preview": "yt-dlp\n    "
  },
  {
    "path": "Youtube Video Downloader/runtime.txt",
    "chars": 15,
    "preview": "python-3.10.12\n"
  },
  {
    "path": "personal-finance-tracker/README.md",
    "chars": 1465,
    "preview": "Personal Finance Tracker\n\nProject Overview:\nThe Personal Finance Tracker is a simple command-line application that helps"
  },
  {
    "path": "personal-finance-tracker/database.py",
    "chars": 777,
    "preview": "import sqlite3\n\nDB_FILE = \"data/finance.db\"\n\ndef get_connection():\n    conn = sqlite3.connect(DB_FILE)\n    return conn\n\n"
  },
  {
    "path": "personal-finance-tracker/main.py",
    "chars": 946,
    "preview": "import tracker\nimport savings\nimport visualization\nimport database\n\ndef main_menu():\n    while True:\n        print(\"\\n--"
  },
  {
    "path": "personal-finance-tracker/savings.py",
    "chars": 941,
    "preview": "from database import get_connection\n\ndef set_goal():\n    goal_amount = float(input(\"Enter your savings goal: \"))\n    \n  "
  },
  {
    "path": "personal-finance-tracker/tracker.py",
    "chars": 1439,
    "preview": "import sqlite3\nfrom database import get_connection\n\ndef add_income():\n    category = input(\"Enter income source (e.g., S"
  },
  {
    "path": "personal-finance-tracker/visualization.py",
    "chars": 4259,
    "preview": "import matplotlib.pyplot as plt\nfrom database import get_connection\n\ndef bar_chart_expense():\n    conn = get_connection("
  }
]

// ... and 27 more files (download for full content)

About this extraction

This page contains the full source code of the king04aman/All-In-One-Python-Projects GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 227 files (284.9 KB), approximately 75.2k tokens, and a symbol index with 271 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!