semvec/pypi-packages huggingface dataset:
sortpy 1.1.0
Various sorting algorithms in pure python
License: MIT
Requires Python: >=3.7,<4.0

Normal sorting
===
[![PyPI version](https://badge.fury.io/py/sortpy.svg)](https://badge.fury.io/py/sortpy)
![CI status](https://github.com/xfenix/sortpy/workflows/Python%20package/badge.svg)
[![codecov](https://codecov.io/gh/xfenix/sortpy/branch/master/graph/badge.svg)](https://codecov.io/gh/xfenix/sortpy)

Various sorting algorithms implemented in pure python. Now with typing support and for python 3.7/3.8.  
Currently implemented following:
* Bubble (of course just for fun)
* Quick (with random pivot)
* Merge
* Insertion
* Heap
* More to go...

Compatibility
--------
Python 3.7+ (test coverage include python 3.7, 3.8)

Usage
--------
* Install `pip install sortpy`
* Import sorting algorithm `from sortpy import quick`.  
  Function doesnt check the output (for the sake of speed), and have correct type annotations, that talk about available types.
* Use it like `quick.sort([3, 2, 1])`

Also
--------
Test coverage with fixtures and random generated test cases (reference function is python basic timsort).  
Has couple hundred parametrized tests.
gpt-2-simple 0.8.1
Python package to easily retrain OpenAI's GPT-2 text-generating model on new texts.
License: MIT
Requires Python: >=3.6
Keywords: deep learning,tensorflow,text generation

A simple Python package that wraps existing model fine-tuning and generation scripts for OpenAI GPT-2 text generation model (specifically the "small", 124M hyperparameter version). Additionally, this package allows easier generation of text, generating to a file for easy curation, allowing for prefixes to force the text to start with a given phrase.

## Usage

An example for downloading the model to the local system, fineturning it on a dataset. and generating some text.

Warning: the pretrained model, and thus any finetuned model, is 500 MB!

```python
import gpt_2_simple as gpt2

gpt2.download_gpt2()   # model is saved into current directory under /models/124M/

sess = gpt2.start_tf_sess()
gpt2.finetune(sess, 'shakespeare.txt', steps=1000)   # steps is max number of training steps

gpt2.generate(sess)
```

The generated model checkpoints are by default in `/checkpoint/run1`. If you want to load a model from that folder and generate text from it:

```python
import gpt_2_simple as gpt2

sess = gpt2.start_tf_sess()
gpt2.load_gpt2(sess)

gpt2.generate(sess)
```

As with textgenrnn, you can generate and save text for later use (e.g. an API or a bot) by using the `return_as_list` parameter.

```python
single_text = gpt2.generate(sess, return_as_list=True)[0]
print(single_text)
```

You can pass a `run_name` parameter to `finetune` and `load_gpt2` if you want to store/load multiple models in a `checkpoint` folder.

NB: *Restart the Python session first* if you want to finetune on another dataset or load another model.