semvec/pypi-packages huggingface dataset:
mlops7sem-hw2 0.0.1
A short description of the project.
Requires Python: ~=3.11.8

# mlops7sem

<a target="_blank" href="https://cookiecutter-data-science.drivendata.org/">
    <img src="https://img.shields.io/badge/CCDS-Project%20template-328F97?logo=cookiecutter" />
</a>



<img src="imgs/model_pipeline_success.png" alt="" width="600"/>

<img src="imgs/batch_inference_success.png" alt="" width="600"/>

## Project Organization

```
├── LICENSE            <- Open-source license if one is chosen
├── Makefile           <- Makefile with convenience commands like `make data` or `make train`
├── README.md          <- The top-level README for developers using this project.
├── data
│   ├── external       <- Data from third party sources.
│   ├── interim        <- Intermediate data that has been transformed.
│   ├── processed      <- The final, canonical data sets for modeling.
│   └── raw            <- The original, immutable data dump.
│
├── docs               <- A default mkdocs project; see www.mkdocs.org for details
│
├── models             <- Trained and serialized models, model predictions, or model summaries
│
├── notebooks          <- Jupyter notebooks. Naming convention is a number (for ordering),
│                         the creator's initials, and a short `-` delimited description, e.g.
│                         `1.0-jqp-initial-data-exploration`.
│
├── pyproject.toml     <- Project configuration file with package metadata for 
│                         mlops7sem_hw2 and configuration for tools like black
│
├── references         <- Data dictionaries, manuals, and all other explanatory materials.
│
├── reports            <- Generated analysis as HTML, PDF, LaTeX, etc.
│   └── figures        <- Generated graphics and figures to be used in reporting
│
├── requirements.txt   <- The requirements file for reproducing the analysis environment, e.g.
│                         generated with `pip freeze > requirements.txt`
│
├── setup.cfg          <- Configuration file for flake8
│
└── mlops7sem_hw2   <- Source code for use in this project.
    │
    ├── __init__.py             <- Makes mlops7sem_hw2 a Python module
    │
    ├── config.py               <- Store useful variables and configuration
    │
    ├── dataset.py              <- Scripts to download or generate data
    │
    ├── features.py             <- Code to create features for modeling
    │
    ├── modeling                
    │   ├── __init__.py 
    │   ├── predict.py          <- Code to run model inference with trained models          
    │   └── train.py            <- Code to train models
    │
    └── plots.py                <- Code to create visualizations
```

--------
extensort 0.1.1
A module for sorting files into folders based on their extensions
Requires Python: >=3.7

# Extensort

Extensort is a Python module that simplifies the process of organizing files by sorting them into folders based on their extensions. It provides an efficient way to clean up cluttered directories and maintain a well-organized file system.

## Features

- Automatically sort files into folders based on their extensions
- Customizable mapping of file extensions to folder names
- Find all unique file extensions in a directory
- Detailed sorting summary including moved, skipped, and error counts
- Color-coded console output for better visibility of the sorting process

## Installation

You can install Extensort using pip:

```bash
pip install extensort
```

## Usage

Here's a quick example of how to use Extensort:

```python
from extensort import sort_files, find_extensions

# Define the directory to sort
directory_to_sort = "/path/to/your/directory"

# Find all extensions in the directory
all_extensions = find_extensions(directory_to_sort)
print(f"Found extensions: {all_extensions}")

# Define how you want to sort the files
extension_mapping = {
    ".txt": "Text Files",
    ".pdf": "Documents",
    ".jpg": "Images",
    ".png": "Images",
    ".py": "Python Scripts"
}

# Sort the files
summary = sort_files(directory_to_sort, extension_mapping)

print("Sorting complete!")
print(f"Moved: {summary['moved']}")
print(f"Skipped: {summary['skipped']}")
print(f"Errors: {summary['errors']}")
```

## Detailed Usage

### Finding Extensions

The `find_extensions` function scans a directory and returns a set of all unique file extensions:

```python
extensions = find_extensions("/path/to/directory")
```

### Sorting Files

The `sort_files` function organizes files into folders based on their extensions:

```python
extension_mapping = {
    ".txt": "Text",
    ".jpg": "Images",
    ".png": "Images",
    ".docx": "Documents",
    ".pdf": "Documents",
    ".py": "Code",
    ".js": "Code"
}

summary = sort_files("/path/to/sort", extension_mapping)
```

The function returns a summary dictionary with the following keys:
- `moved`: Number of files successfully moved
- `skipped`: Number of files skipped (no matching extension in the mapping)
- `errors`: Number of errors encountered during the sorting process

## Contributing

Contributions to Extensort are welcome! Please feel free to submit a Pull Request.

## License

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