semvec/pypi-packages huggingface dataset:
myHawkScriptLib 0.1.2
This library is used for communication between Hawk script and hz team's GUI PLC driver
Requires Python: >=3.8

# My myHawkScriptLib Library

This is a sample Python library that demonstrates how to create and publish your own library to PyPI.

## Installation

```bash
pip install myHawkScriptLib
```

## Usage

```python
from  hawkScriptLib import myHawkGUI_PLC_API
with myHawkGUI_PLC_API() as client:
    if client.client_socket:
        #读取PLC 地址 250 和 251 上的值
        print(client.read_value(250,2)) 
        #写入PLC 地址 250 和 251 分别为200，201
        print(client.write_value(250, [200,201]))

```

## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

## License
[MIT](https://choosealicense.com/licenses/mit/)
transformers-model 0.2.3
Model hub for transformers.
Requires Python: >=3.6
Keywords: Pytorch, AI, Machine learning, Deep learning, Bert, llm, transformers

Usage Sample
''''''''''''

.. code:: python

        from sklearn.model_selection import train_test_split
        import torch
        from transformers import BertTokenizer
        from nlpx.dataset import TextDataset, text_collate
        from nlpx.model.wrapper import ClassifyModelWrapper
        from transformers_model import AutoCNNTextClassifier, AutoCNNTokenClassifier, \
                BertDataset, BertCollator, BertTokenizeCollator

        texts = [[str],]
        labels = [0, 0, 1, 2, 1...]
        pretrained_path = "clue/albert_chinese_tiny"
        classes = ['class1', 'class2', 'class3'...]
        train_texts, test_texts, y_train, y_test = train_test_split(texts, labels, test_size=0.2)
        
        train_set = TextDataset(train_texts, y_train)
        test_set = TextDataset(test_texts, y_test)

        ################################### TextClassifier ##################################
        model = AutoCNNTextClassifier(pretrained_path, len(classes))
        wrapper = ClassifyModelWrapper(model, classes)
        _ = wrapper.train(train_set, test_set, collate_fn=text_collate)

        ################################### TokenClassifier #################################
        tokenizer = BertTokenizer.from_pretrained(pretrained_path)

        ##################### BertTokenizeCollator #########################
        model = AutoCNNTokenClassifier(pretrained_path, len(classes))
        wrapper = ClassifyModelWrapper(model, classes)
        _ = wrapper.train(train_set, test_set, collate_fn=BertTokenizeCollator(tokenizer, 256))

        ##################### BertCollator ##################################
        train_tokens = tokenizer.batch_encode_plus(
                train_texts,
                max_length=256,
                padding="max_length",
                truncation=True,
                return_attention_mask=True,
                return_token_type_ids=False,
                return_tensors="pt",
        )

        test_tokens = tokenizer.batch_encode_plus(
                test_texts,
                max_length=256,
                padding="max_length",
                truncation=True,
                return_attention_mask=True,
                return_token_type_ids=False,
                return_tensors="pt",
        )

        train_set = BertDataset(train_tokens, y_train)
        test_set = BertDataset(test_tokens, y_test)

        model = AutoCNNTokenClassifier(pretrained_path, len(classes))
        wrapper = ClassifyModelWrapper(model, classes)
        _ = wrapper.train(train_set, test_set, collate_fn=BertCollator())
torch-model-hub 0.2.1
Model hub for Pytorch.
Requires Python: >=3.6
Keywords: Pytorch, AI, Machine learning, Deep learning, torch

Usage Sample
''''''''''''

.. code:: python

        import torch
        from model.model import TextCNN
        X = torch.randn(8, 10, 128)
        model = TextCNN(embed_dim=128, kernel_sizes=(2, 3, 4), cnn_channels=64, out_features=2)
        output = model(X)