From 6b32858d899243b80697c23581aa9f1036a68150 Mon Sep 17 00:00:00 2001 From: yashksaini-coder Date: Tue, 1 Oct 2024 21:22:33 +0530 Subject: [PATCH 01/11] Add Start & End markers on readme dir section --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index d2ee36616c..38c18f115f 100644 --- a/README.md +++ b/README.md @@ -72,6 +72,7 @@ The purpose of PyVerse is to provide a structured and accessible way for develop The PyVerse repository is organized as follows: + ``` PyVerse/ │ @@ -96,6 +97,7 @@ PyVerse/ ├── CODE_OF_CONDUCT.md ├── PROJECT-README-TEMPLATE.md ``` + --- From 58a6b6f087e3dc61966c03976e0f745c1bc22291 Mon Sep 17 00:00:00 2001 From: yashksaini-coder Date: Tue, 1 Oct 2024 21:24:54 +0530 Subject: [PATCH 02/11] Configured to track scripts sub-folder --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 0a6fe8aa00..6dee241013 100644 --- a/.gitignore +++ b/.gitignore @@ -4,7 +4,7 @@ venv/ etc/ Include/ Lib/ -Scripts/ + share/ pyvenv.cfg __pycache__\ From 6a979eb202cd14e0e78f163e51c6e126db759eaa Mon Sep 17 00:00:00 2001 From: yashksaini-coder Date: Tue, 1 Oct 2024 21:28:19 +0530 Subject: [PATCH 03/11] Python script to update the README section --- .github/scripts/update_dir_structure.py | 67 +++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 .github/scripts/update_dir_structure.py diff --git a/.github/scripts/update_dir_structure.py b/.github/scripts/update_dir_structure.py new file mode 100644 index 0000000000..79de61e3df --- /dev/null +++ b/.github/scripts/update_dir_structure.py @@ -0,0 +1,67 @@ +import os +import github +from github import Github + +def get_repo_structure(path='.', prefix=''): + structure = [] + items = sorted(os.listdir(path)) + for i, item in enumerate(items): + if item.startswith('.'): + continue + item_path = os.path.join(path, item) + is_last = i == len(items) - 1 + current_prefix = '└── ' if is_last else '├── ' + structure.append(f"{prefix}{current_prefix}{item}") + if os.path.isdir(item_path): + next_prefix = prefix + (' ' if is_last else '│ ') + structure.extend(get_repo_structure(item_path, next_prefix)) + return structure + +def update_structure_file(structure): + with open('repo_structure.txt', 'w') as f: + f.write('\n'.join(structure)) + +def update_readme(structure): + with open('README.md', 'r') as f: + content = f.read() + + start_marker = '' + end_marker = '' + + start_index = content.find(start_marker) + end_index = content.find(end_marker) + + if start_index != -1 and end_index != -1: + new_content = ( + content[:start_index + len(start_marker)] + + '\n```\n' + '\n'.join(structure) + '\n```\n' + + content[end_index:] + ) + + with open('README.md', 'w') as f: + f.write(new_content) + print("README.md updated with new structure.") + else: + print("Markers not found in README.md. Structure not updated.") + +def main(): + g = Github(os.environ['GH_TOKEN']) + repo = g.get_repo(os.environ['GITHUB_REPOSITORY']) + + current_structure = get_repo_structure() + + try: + contents = repo.get_contents("repo_structure.txt") + existing_structure = contents.decoded_content.decode().split('\n') + except github.GithubException: + existing_structure = None + + if current_structure != existing_structure: + update_structure_file(current_structure) + update_readme(current_structure) + print("Repository structure updated.") + else: + print("No changes in repository structure.") + +if __name__ == "__main__": + main() \ No newline at end of file From 047b319685f00e4ef7721746bdd13948c18616b3 Mon Sep 17 00:00:00 2001 From: yashksaini-coder Date: Tue, 1 Oct 2024 21:29:06 +0530 Subject: [PATCH 04/11] Workflow file to trigger the python-script --- .github/workflows/update-structure.yml | 37 ++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/update-structure.yml diff --git a/.github/workflows/update-structure.yml b/.github/workflows/update-structure.yml new file mode 100644 index 0000000000..11ab140d8c --- /dev/null +++ b/.github/workflows/update-structure.yml @@ -0,0 +1,37 @@ +name: Detect and Update Repo Structure + +on: + schedule: + - cron: '0 * * * *' # Run every hour + workflow_dispatch: # Allow manual triggering + +jobs: + detect-and-update: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.12' + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install PyGithub + + - name: Detect and update repo structure + env: + GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} + run: | + python .github/scripts/update_structure.py + + - name: Commit and push if changed + run: | + git config --local user.email "115717039+yashksaini-coder@users.noreply.github.com" + git config --local user.name "yashksaini-coder" + git add repo_structure.txt README.md + git diff --quiet && git diff --staged --quiet || (git commit -m "Update repo structure" && git push) \ No newline at end of file From 384c2b3a46cadbef148897bce8eb59ab381d29dc Mon Sep 17 00:00:00 2001 From: Yash Kumar Saini <115717039+yashksaini-coder@users.noreply.github.com> Date: Tue, 1 Oct 2024 21:58:59 +0530 Subject: [PATCH 05/11] Update update-structure.yml --- .github/workflows/update-structure.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/update-structure.yml b/.github/workflows/update-structure.yml index 11ab140d8c..f2f676ea42 100644 --- a/.github/workflows/update-structure.yml +++ b/.github/workflows/update-structure.yml @@ -27,11 +27,11 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} run: | - python .github/scripts/update_structure.py + python .github/scripts/update_dir_structure.py - name: Commit and push if changed run: | git config --local user.email "115717039+yashksaini-coder@users.noreply.github.com" git config --local user.name "yashksaini-coder" - git add repo_structure.txt README.md - git diff --quiet && git diff --staged --quiet || (git commit -m "Update repo structure" && git push) \ No newline at end of file + git add . + git diff --quiet && git diff --staged --quiet || (git commit -m "Update repo structure" && git push) From bfaa43900611d7bb2885ce0bb145ed0cce6f20a9 Mon Sep 17 00:00:00 2001 From: Yash Kumar Saini <115717039+yashksaini-coder@users.noreply.github.com> Date: Tue, 1 Oct 2024 22:04:43 +0530 Subject: [PATCH 06/11] Update update-structure.yml --- .github/workflows/update-structure.yml | 52 +++++++++++++------------- 1 file changed, 27 insertions(+), 25 deletions(-) diff --git a/.github/workflows/update-structure.yml b/.github/workflows/update-structure.yml index f2f676ea42..1b33ba3a0e 100644 --- a/.github/workflows/update-structure.yml +++ b/.github/workflows/update-structure.yml @@ -4,34 +4,36 @@ on: schedule: - cron: '0 * * * *' # Run every hour workflow_dispatch: # Allow manual triggering + push: + branches: + - main + - yash/fix-4 jobs: - detect-and-update: - runs-on: ubuntu-latest - + example-job: + runs-on: ubuntu-latests steps: - - name: Checkout repository - uses: actions/checkout@v2 + - name: Checkout repository + uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: '3.12' + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: 3.12 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install PyGithub + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install PyGithub - - name: Detect and update repo structure - env: - GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} - run: | - python .github/scripts/update_dir_structure.py - - - name: Commit and push if changed - run: | - git config --local user.email "115717039+yashksaini-coder@users.noreply.github.com" - git config --local user.name "yashksaini-coder" - git add . - git diff --quiet && git diff --staged --quiet || (git commit -m "Update repo structure" && git push) + - name: Run update script + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: python .github/scripts/update_dir_structure.py + + - name: Commit and push if changed + run: | + git config --local user.email "115717039+yashksaini-coder@users.noreply.github.com" + git config --local user.name "yashksaini-coder" + git add . + git diff --quiet && git diff --staged --quiet || (git commit -m "Update repo structure" && git push) From b0024a83c95e6255ba458df5c1426098ba7ac912 Mon Sep 17 00:00:00 2001 From: yashksaini-coder Date: Tue, 1 Oct 2024 22:11:17 +0530 Subject: [PATCH 07/11] Update workflow --- .github/workflows/update-structure.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/update-structure.yml b/.github/workflows/update-structure.yml index 1b33ba3a0e..9a2456302e 100644 --- a/.github/workflows/update-structure.yml +++ b/.github/workflows/update-structure.yml @@ -25,7 +25,6 @@ jobs: run: | python -m pip install --upgrade pip pip install PyGithub - - name: Run update script env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -36,4 +35,4 @@ jobs: git config --local user.email "115717039+yashksaini-coder@users.noreply.github.com" git config --local user.name "yashksaini-coder" git add . - git diff --quiet && git diff --staged --quiet || (git commit -m "Update repo structure" && git push) + git diff --quiet && git diff --staged --quiet || (git commit -m "Update repo structure" && git push) \ No newline at end of file From ebff2a68c5e00b3ec835698addc5481e1d2a55d7 Mon Sep 17 00:00:00 2001 From: yashksaini-coder Date: Tue, 1 Oct 2024 22:14:27 +0530 Subject: [PATCH 08/11] Update workflow: Remove the example-job --- .github/workflows/update-structure.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/update-structure.yml b/.github/workflows/update-structure.yml index 9a2456302e..8081c8e2cb 100644 --- a/.github/workflows/update-structure.yml +++ b/.github/workflows/update-structure.yml @@ -10,8 +10,8 @@ on: - yash/fix-4 jobs: - example-job: - runs-on: ubuntu-latests + detect-and-update-structure: + runs-on: ubuntu-latest steps: - name: Checkout repository uses: actions/checkout@v2 @@ -25,6 +25,7 @@ jobs: run: | python -m pip install --upgrade pip pip install PyGithub + - name: Run update script env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -32,7 +33,7 @@ jobs: - name: Commit and push if changed run: | - git config --local user.email "115717039+yashksaini-coder@users.noreply.github.com" - git config --local user.name "yashksaini-coder" - git add . - git diff --quiet && git diff --staged --quiet || (git commit -m "Update repo structure" && git push) \ No newline at end of file + git config --local user.email "115717039+yashksaini-coder@users.noreply.github.com" + git config --local user.name "yashksaini-coder" + git add . + git diff --quiet && git diff --staged --quiet || (git commit -m "Update repo structure" && git push) \ No newline at end of file From 0ce6cec6bc9cbc2785daf89198bbd5673bb211b2 Mon Sep 17 00:00:00 2001 From: yashksaini-coder <115717039+yashksaini-coder@users.noreply.github.com> Date: Tue, 1 Oct 2024 16:44:56 +0000 Subject: [PATCH 09/11] Update repo structure --- README.md | 35 +++++++++++++++-------------------- repo_structure.txt | 17 +++++++++++++++++ 2 files changed, 32 insertions(+), 20 deletions(-) create mode 100644 repo_structure.txt diff --git a/README.md b/README.md index 38c18f115f..b1d667b39a 100644 --- a/README.md +++ b/README.md @@ -74,28 +74,23 @@ The PyVerse repository is organized as follows: ``` -PyVerse/ -│ -├── Web_Development/ -├── Machine_Learning/ -├── Data_Science/ -├── Automation_Tools/ -├── Game_Development/ -├── Deep_Learning/ -│ ├── NLP/ -│ ├── Computer_Vision/ -├── Cybersecurity_Tools/ -├── Algorithms_and_Data_Structures/ -│ ├── Sorting_Algorithms/ -│ ├── Search_Algorithms/ -│ ├── Data_Structures/ -├── Beginner_Projects/ -├── Advanced_Projects/ -├── Tutorials/ -├── CONTRIBUTING.md -├── README.md +├── Advanced_Projects +├── Algorithms_and_Data_Structures +├── Automation_Tools +├── Beginner_Projects +├── Blockchain_Development ├── CODE_OF_CONDUCT.md +├── CONTRIBUTING.md +├── Cybersecurity_Tools +├── Data_Science +├── Deep_Learning +├── Game_Development +├── LICENSE +├── Machine_Learning ├── PROJECT-README-TEMPLATE.md +├── README.md +├── Tutorials +└── Web_Development ``` diff --git a/repo_structure.txt b/repo_structure.txt new file mode 100644 index 0000000000..a9623de0a1 --- /dev/null +++ b/repo_structure.txt @@ -0,0 +1,17 @@ +├── Advanced_Projects +├── Algorithms_and_Data_Structures +├── Automation_Tools +├── Beginner_Projects +├── Blockchain_Development +├── CODE_OF_CONDUCT.md +├── CONTRIBUTING.md +├── Cybersecurity_Tools +├── Data_Science +├── Deep_Learning +├── Game_Development +├── LICENSE +├── Machine_Learning +├── PROJECT-README-TEMPLATE.md +├── README.md +├── Tutorials +└── Web_Development \ No newline at end of file From 51cb86efc1aa5ce9cdb9c835f7e18b4ad5736cad Mon Sep 17 00:00:00 2001 From: yashksaini-coder Date: Wed, 2 Oct 2024 09:18:50 +0530 Subject: [PATCH 10/11] Add Data-science.md --- Data_Science/Data-science.md | 42 ++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 Data_Science/Data-science.md diff --git a/Data_Science/Data-science.md b/Data_Science/Data-science.md new file mode 100644 index 0000000000..484f3c73bc --- /dev/null +++ b/Data_Science/Data-science.md @@ -0,0 +1,42 @@ +# Beginner's Guide to Data Science + +## Introduction + +Data Science is an interdisciplinary field that uses scientific methods, processes, algorithms, and systems to extract knowledge and insights from structured and unstructured data. It combines aspects of statistics, computer science, and domain expertise to analyze and interpret complex data. + +### Why Data Science? + +1. **Decision Making**: Helps in making informed decisions based on data analysis. +2. **Predictive Analysis**: Forecasts future trends and behaviors. +3. **Automation**: Automates repetitive tasks and processes. +4. **Innovation**: Drives innovation by uncovering hidden patterns and insights. + +### Key Components + +1. **Data Collection**: Gathering data from various sources. +2. **Data Cleaning**: Removing inconsistencies and errors from the data. +3. **Data Analysis**: Applying statistical and computational techniques to analyze data. +4. **Data Visualization**: Representing data in graphical formats for better understanding. +5. **Machine Learning**: Building models that can learn from data and make predictions. + +### Tools and Technologies + +- **Programming Languages**: Python, R +- **Libraries**: Pandas, NumPy, Scikit-Learn, TensorFlow +- **Visualization Tools**: Matplotlib, Seaborn, Tableau +- **Databases**: SQL, NoSQL + +### Getting Started + +1. **Learn Programming**: Start with Python or R. +2. **Understand Statistics**: Basic statistical concepts are crucial. +3. **Practice with Data Sets**: Use platforms like Kaggle to practice. +4. **Build Projects**: Apply your skills to real-world problems. + +### Resources + +- **Books**: "Python for Data Analysis" by Wes McKinney +- **Online Courses**: Coursera, edX, Udacity +- **Communities**: Stack Overflow, Reddit, Data Science Meetups + +Data Science is a rapidly evolving field with vast opportunities. Start your journey today and explore the endless possibilities that data has to offer! From 8e7d81eb9bf1b89b36f01641dfe2868e5f0ef087 Mon Sep 17 00:00:00 2001 From: yashksaini-coder <115717039+yashksaini-coder@users.noreply.github.com> Date: Wed, 2 Oct 2024 03:49:22 +0000 Subject: [PATCH 11/11] Update repo structure --- README.md | 4 +++- repo_structure.txt | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b1d667b39a..d6df18f581 100644 --- a/README.md +++ b/README.md @@ -83,6 +83,7 @@ The PyVerse repository is organized as follows: ├── CONTRIBUTING.md ├── Cybersecurity_Tools ├── Data_Science +│ └── Data-science.md ├── Deep_Learning ├── Game_Development ├── LICENSE @@ -90,7 +91,8 @@ The PyVerse repository is organized as follows: ├── PROJECT-README-TEMPLATE.md ├── README.md ├── Tutorials -└── Web_Development +├── Web_Development +└── repo_structure.txt ``` diff --git a/repo_structure.txt b/repo_structure.txt index a9623de0a1..8f32bd87fa 100644 --- a/repo_structure.txt +++ b/repo_structure.txt @@ -7,6 +7,7 @@ ├── CONTRIBUTING.md ├── Cybersecurity_Tools ├── Data_Science +│ └── Data-science.md ├── Deep_Learning ├── Game_Development ├── LICENSE @@ -14,4 +15,5 @@ ├── PROJECT-README-TEMPLATE.md ├── README.md ├── Tutorials -└── Web_Development \ No newline at end of file +├── Web_Development +└── repo_structure.txt \ No newline at end of file