semvec/pypi-packages huggingface dataset:
pycounts-rr 0.1.0
Calculate word counts in a text file!
License: MIT
Requires Python: >=3.9,<4.0

# pycounts_rr

Calculate word counts in a text file!

## Installation

```bash
$ pip install pycounts_rr
```

## Usage

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

```python
from pycounts_rr.pycounts_rr import count_words
from pycounts_rr.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_rr` was created by Rohit Rawat. It is licensed under the terms of the MIT license.

## Credits

`pycounts_rr` was created with [`cookiecutter`](https://cookiecutter.readthedocs.io/en/latest/) and the `py-pkgs-cookiecutter` [template](https://github.com/py-pkgs/py-pkgs-cookiecutter).
pyzfp 0.5.5
A python wrapper for the ZFP compression libary
License: MIT

# pyzfp
Python wrapper over the [zfp compression library](https://computation.llnl.gov/projects/floating-point-compression). This is the second version, rewritten using Cython because the earlier version using ctypes was slow. [Click here](https://github.com/navjotk/pyzfp/blob/ctypes_vs_cython/ctypes_vs_cython_compression.png) for performance comparison. Currently wraps zfp version 0.5.5. 

# Installation
```
pip install pyzfp
```
This should download zfp version 0.5.5, compile it and install the python (Cython) wrappers in the default install location. The use of a virtual environment is recommended.

Should you face any issues, please report them using Github issues. 

# Usage

A sample program that demonstrates the use of the library: (also contents of test.py):
```
from pyzfp import compress, decompress


a = np.linspace(0, 100, num=1000000).reshape((100, 100, 100))



tolerance = 0.0000001
parallel = True
compressed = compress(a, tolerance=tolerance, parallel=parallel)

recovered = decompress(compressed, a.shape, a.dtype, tolerance=tolerance)
print(len(a.tostring()))
print(len(compressed))
print(np.linalg.norm(recovered-a))
```