semvec/pypi-packages huggingface dataset:
vthread 0.1.5
the best threadpool pack.
License: MIT


You can implement thread pools by adding a single line of code without changing the order of any previous code.
===============================================================================================================

.. code-block:: python

    import vthread
    
    @vthread.pool(3) # just use this line to make pool, Create a threadpool with three threads
    def crawl(i):
        import time;time.sleep(1) # Simulation time consuming
        print("crawl_url:",i)
    
    urls = ["http://url1",
            "http://url2",
            "http://url3",
            "http://url4"]
    
    for u in urls:
        crawl(u) # This function becomes a function that adds the original function to the thread pool.


It provides a method for grouping the thread pool
=================================================

.. code-block:: python

    import vthread
    pool_1 = vthread.pool(5,gqueue=1) # open a threadpool with 5 threads named 1
    pool_2 = vthread.pool(2,gqueue=2) # open a threadpool with 2 threads named 2
    
    @pool_1
    def foolfunc1(num):
        time.sleep(1)
        print(f"foolstring1, test3 foolnumb1:{num}")
    
    @pool_2 
    def foolfunc2(num):
        time.sleep(1)
        print(f"foolstring2, test3 foolnumb2:{num}")

    @pool_2 
    def foolfunc3(num):
        time.sleep(1)
        print(f"foolstring3, test3 foolnumb3:{num}")
    
    for i in range(10): foolfunc1(i)
    for i in range(4): foolfunc2(i) 
    for i in range(2): foolfunc3(i)
    # default gqueue is 0
pycounts-aleung 0.1.0
Calculate word counts in a text file!
License: MIT
Requires Python: >=3.9,<4.0

# pycounts_aleung

Calculate word counts in a text file!

## Installation

```bash
$ pip install pycounts_aleung
```

## Usage

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

```python
from pycounts_aleung.pycounts_aleung import count_words
from pycounts_aleung.plotting_aleung 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_aleung` was created by Adrianne Leung. It is licensed under the terms of the MIT license.

## Credits

`pycounts_aleung` was created with [`cookiecutter`](https://cookiecutter.readthedocs.io/en/latest/) and the `py-pkgs-cookiecutter` [template](https://github.com/py-pkgs/py-pkgs-cookiecutter).