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 diff --git a/.github/workflows/update-structure.yml b/.github/workflows/update-structure.yml new file mode 100644 index 0000000000..8081c8e2cb --- /dev/null +++ b/.github/workflows/update-structure.yml @@ -0,0 +1,39 @@ +name: Detect and Update Repo Structure + +on: + schedule: + - cron: '0 * * * *' # Run every hour + workflow_dispatch: # Allow manual triggering + push: + branches: + - main + - yash/fix-4 + +jobs: + detect-and-update-structure: + 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: 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) \ No newline at end of file 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__\ 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! diff --git a/README.md b/README.md index d2ee36616c..d6df18f581 100644 --- a/README.md +++ b/README.md @@ -72,30 +72,29 @@ The purpose of PyVerse is to provide a structured and accessible way for develop 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 +│ └── Data-science.md +├── Deep_Learning +├── Game_Development +├── LICENSE +├── Machine_Learning ├── PROJECT-README-TEMPLATE.md +├── README.md +├── Tutorials +├── Web_Development +└── repo_structure.txt ``` + --- diff --git a/repo_structure.txt b/repo_structure.txt new file mode 100644 index 0000000000..8f32bd87fa --- /dev/null +++ b/repo_structure.txt @@ -0,0 +1,19 @@ +├── Advanced_Projects +├── Algorithms_and_Data_Structures +├── Automation_Tools +├── Beginner_Projects +├── Blockchain_Development +├── CODE_OF_CONDUCT.md +├── CONTRIBUTING.md +├── Cybersecurity_Tools +├── Data_Science +│ └── Data-science.md +├── Deep_Learning +├── Game_Development +├── LICENSE +├── Machine_Learning +├── PROJECT-README-TEMPLATE.md +├── README.md +├── Tutorials +├── Web_Development +└── repo_structure.txt \ No newline at end of file