semvec/pypi-packages huggingface dataset:
torchtmageclass 0.0.1
A library for image classification using PyTorch.
License: MIT
Requires Python: >=3.9
Keywords: pytorch, deep-learning, image-classification, machine-learning, computer-vision, classification, torch, TorchImageClass, neural-networks, cnn, transfer-learning

# TorchImageClass

**TorchImageClass** é uma biblioteca em Python que fornece um conjunto de ferramentas e utilitários para **classificação de imagens** usando [PyTorch](https://pytorch.org/). Ela visa facilitar o **treinamento**, **validação** e **inferência** de redes neurais voltadas a tarefas de classificação.

---

## Sumário

- [Motivação](#motivação)
- [Principais Recursos](#principais-recursos)
- [Instalação](#instalação)

---

## Motivação

Modelos de classificação de imagens são amplamente usados em aplicações de visão computacional, desde identificação de objetos até detecção de doenças em exames de imagem. O **TorchImageClass** simplifica esse processo, fornecendo:

- **Arquiteturas** pré-definidas (ResNet, etc.) ou personalizáveis.  
- **Data loaders** e **transforms** para imagens.  
- **Treinamento** com otimização, métricas e *early stopping*.  
- **Práticas de *logging* e salvamento de modelos** (checkpoints).  
- **Inferência** em lote ou em imagens individuais.

---

## Principais Recursos

1. **Fácil inicialização de Modelos**  
   - Classes prontas para ResNet, VGG, etc., com poucas linhas de código.

2. **Treinamento Automatizado**  
   - Loop de treino e validação com métricas integradas (acurácia, precisão, recall).

3. **Data Augmentation Simplificada**  
   - Integração direta com `torchvision.transforms`.

4. **Suporte a GPU/CPU**  
   - Reconhecimento automático de dispositivo (CUDA/ROCm ou CPU).

5. **Exportação de Modelos**  
   - Salva pesos em formatos `.pth` ou `.pt`.

---

## Instalação

Para instalar via [PyPI](https://pypi.org/):

```bash
pip install TorchImageClass
```
## Como usar

```bash
from TorchImageClass import train_model

model, history = train_model(
    base_dir="data/images for prediction of treated tuberculosis",
    num_epochs=20,
    image_size=(224,224),
    batch_size=8,
    num_classes=2,
    patience=5,
    model_save_path="best_model.pth"
)

print("Final History:", history)
print("Trained model:", model)
pycounts_jd25 0.1.0
Calculate word counts in a text file and plot word counts
License: MIT
Requires Python: >=3.10

# pycounts_jd25

Calculate word counts in a text file!

## Installation

```bash
pip install pycounts_jd25
```

## Usage

`pycounts` can be used to count words in a text file and plot results
as follows:

```python
from pycounts_jd25.pycounts_jd25 import count_words
from pycounts_jd25.plotting import plot_words
import matplotlib.pyplot as plt

file_path = "test.txt"  # path to your file
counts = count_words(file_path)
fig = plot_words(counts, n=10)
plt.show()
```

## Contributing

Interested in contributing? Check out the contributing guidelines. 
Please note that this project is released with a Code of Conduct. 
By contributing to this project, you agree to abide by its terms.

## License

`pycounts` was created by Tomas Beuzen. It is licensed under the terms
of the MIT license.

## Credits

`pycounts` was created with 
[`cookiecutter`](https://cookiecutter.readthedocs.io/en/latest/) and 
the `py-pkgs-cookiecutter` 
[template](https://github.com/py-pkgs/py-pkgs-cookiecutter).
mongoautomation-packagenew 0.0.8
A python package for connecting with database.
License: MIT
Requires Python: >=3.7

# Mongo_DB_Connector_PYPI_Package

A Python library to simplify MongoDB operations like creating databases, collections, inserting, updating, and deleting records, and performing bulk operations with CSV and Excel files.

## Features
- Easily create and switch between databases and collections.
- Insert single or multiple records.
- Perform bulk inserts from CSV or Excel files.
- Update single or multiple records with ease.
- Delete single or multiple records.
- Support for custom queries using MongoDB's query syntax.

---

## Installation

Install the package via pip:

```bash
pip install mongoautomation_packagenew
```

---

## Usage

Here's a quick guide to get started with the package:

### 1. Import and Initialize

```python
from mongoautomation_packagenew import mongo_operation
```

Initialize the MongoDB operations:

```python
mongo_ops = mongo(
    client_url="mongo_url",
    database_name="my_database",
    collection_name="my_collection"
)
```

---

### 2. Insert Records

#### Insert a Single Record

```python
mongo_ops.insert_record({"name": "Aliya", "age": 25}, "example_collection")
```

#### Insert Multiple Records

```python
records = [{"name": "Bob", "age": 25}, {"name": "Charlie", "age": 28}]
mongo_ops.insert_record(records, "my_collection")
```

---

### 3. Bulk Insert from File

Insert records from a CSV or Excel file:

```python
mongo_ops.bulk_insert("data.csv", "my_collection")
```

---

### 4. Update Records

#### Update a Single Record

```python
mongo_ops.update_record(
    query={"name": "Alice"},
    update_data={"age": 35},
    collection_name="my_collection"
)
```

#### Update Multiple Records

```python
mongo_ops.update_record(
    query={"age": {"$lt": 30}},
    update_data={"status": "young"},
    collection_name="my_collection",
    update_all=True
)
```

---

### 5. Delete Records

#### Delete a Single Record

```python
mongo_ops.delete_record(
    query={"name": "Charlie"},
    collection_name="my_collection"
)
```

#### Delete Multiple Records

```python
mongo_ops.delete_record(
    query={"age": {"$lt": 25}},
    collection_name="my_collection",
    delete_all=True
)
```

---

### 6. Advanced Features

#### Set a New Database

```python
mongo_ops.set_new_database("new_database")
```

#### Set a New Collection

```python
mongo_ops.set_new_collection("new_collection")
```

---

## Requirements

- Python 3.8+
- MongoDB Server

### Dependencies
- `pymongo`
- `pandas`