<commit_before>Python Humble Utils
===================

.. image:: https://img.shields.io/pypi/v/python_humble_utils.svg
    :target: https://pypi.python.org/pypi/python_humble_utils
    :alt: PyPI

.. TODO .. image:: https://img.shields.io/pypi/status/python_humble_utils.svg
    :target:
    :alt:

.. TODO .. image:: https://img.shields.io/pypi/pyversions/python_humble_utils.svg
    :target:
    :alt:

.. image:: https://img.shields.io/travis/webyneter/python_humble_utils.svg
    :target: https://travis-ci.org/webyneter/python_humble_utils
    :alt: Travis CI

.. image:: https://pyup.io/repos/github/webyneter/python_humble_utils/shield.svg
    :target: https://pyup.io/repos/github/webyneter/python_humble_utils/
    :alt: pyup.io

.. image:: https://readthedocs.org/projects/python-humble-utils/badge/?version=latest
    :target: https://python-humble-utils.readthedocs.io/en/latest/?badge=latest
    :alt: Documentation

.. image:: https://img.shields.io/badge/License-MIT-green.svg
    :target: https://opensource.org/licenses/MIT
    :alt: License: MIT

.. TODO: gitter
.. TODO: codecov
.. TODO: https://github.com/probot/stale
.. TODO: https://github.com/danger/danger


Python utils for everyday use.

* `Documentation`_.
* Please, `open issues`_ before sending emails to the maintainers: You will get a much faster response!

.. _`open issues`: https://github.com/webyneter/python_humble_utils/issues/new
.. _`Documentation`: https://python-humble-utils.readthedocs.io/en/stable/



Feature Areas
-------------

* File operations.
* File/directory paths extraction.
* File/directory paths randomization.
* String case convertions.
* Python class convenience shortcuts.
* `py.test`_ fixtures and helpers.

.. _py.test: https://docs.pytest.org/en/stable/



Installation
------------

Refer to :ref:`installation`.

.. _`documentation`: https://python-humble-utils.readthedocs.io/en/stable/


Usage
-----

.. code-block:: python

    import os

    from  python_humble_utils.commands import (
        yield_file_paths,
        camel_or_pascal_case_to_snake_case
    )


    # ...


    file_paths = yield_file_paths(dir_path=os.path.join('path', 'to', 'dir'),
                                  allowed_file_extensions=['.sh', '.bash'],
                                  recursively=True)
    # assert file_paths == ['s1.sh', 's2.bash', 's3.bash']

    s = camel_or_pascal_case_to_snake_case('camelCasedString')
    # assert s == 'camel_cased_string'

    s = camel_or_pascal_case_to_snake_case('PascalCasedString')
    # assert s == 'pascal_cased_string'


    # ...



Contributing
------------
<commit_msg>Update project readme<commit_after>Python Humble Utils
===================

.. image:: https://img.shields.io/pypi/v/python_humble_utils.svg
    :target: https://pypi.python.org/pypi/python_humble_utils
    :alt: PyPI

.. TODO .. image:: https://img.shields.io/pypi/status/python_humble_utils.svg
    :target:
    :alt:

.. TODO .. image:: https://img.shields.io/pypi/pyversions/python_humble_utils.svg
    :target:
    :alt:

.. image:: https://img.shields.io/travis/webyneter/python_humble_utils.svg
    :target: https://travis-ci.org/webyneter/python_humble_utils
    :alt: Travis CI

.. image:: https://pyup.io/repos/github/webyneter/python_humble_utils/shield.svg
    :target: https://pyup.io/repos/github/webyneter/python_humble_utils/
    :alt: pyup.io

.. image:: https://readthedocs.org/projects/python-humble-utils/badge/?version=latest
    :target: https://python-humble-utils.readthedocs.io/en/latest/?badge=latest
    :alt: Documentation

.. image:: https://img.shields.io/badge/License-MIT-green.svg
    :target: https://opensource.org/licenses/MIT
    :alt: License: MIT

.. TODO: gitter
.. TODO: codecov
.. TODO: https://github.com/probot/stale
.. TODO: https://github.com/danger/danger


Python utils for everyday use.

* `Documentation`_.
* Please, `open issues`_ before sending emails to the maintainers: You will get a much faster response!

.. _`open issues`: https://github.com/webyneter/python_humble_utils/issues/new
.. _`Documentation`: https://python-humble-utils.readthedocs.io/en/stable/



Feature Areas
-------------

* File operations.
* File/directory paths extraction.
* File/directory paths randomization.
* String case convertions.
* Python class convenience shortcuts.
* `py.test`_ fixtures and helpers.

.. _py.test: https://docs.pytest.org/en/stable/



Installation
------------

Refer to :ref:`installation`.

.. _`documentation`: https://python-humble-utils.readthedocs.io/en/stable/


Usage
-----

.. code-block:: python

    import os

    from python_humble_utils.commands import (
        yield_file_paths,
        camel_or_pascal_case_to_snake_case
    )


    # ...


    file_paths = yield_file_paths(dir_path=os.path.join('path', 'to', 'dir'),
                                  allowed_file_extensions=['.sh', '.bash'],
                                  recursively=True)
    # assert file_paths == ['s1.sh', 's2.bash', 's3.bash']

    s = camel_or_pascal_case_to_snake_case('camelCasedString')
    # assert s == 'camel_cased_string'

    s = camel_or_pascal_case_to_snake_case('PascalCasedString')
    # assert s == 'pascal_cased_string'


    # ...



Contributing
------------

{'fraction_non_alphanumeric': 0.16339744810512283, 'fraction_numerical': 0.0011426394972386211, 'mean_word_length': 3.015290519877676, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 36, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1289942', 'n_tokens_mistral': 1895, 'n_tokens_neox': 1780, 'n_words': 286}