semvec/pypi-packages huggingface dataset:
postpone 0.3.0
A lazy string implementation that doesn't rely on a global or thread local state.
Keywords: lazy

An implementation of lazy strings. Can be used in combination with *gettext* for the translation of web apps.

It's less beautiful than *speaklater* (an other implementation
of lazy strings), but I wanted lazy strings that work even if a
single thread interleaves the processing of many http requests (this happens with async frameworks).

*postpone* doesn't rely on a global state. And it doesn't use the ``thread.local()`` trick that *speaklater* uses either.

Example of use:

.. code:: python

    >>> from postpone import evalr, LazyString as _

    >>> translations = {
            "Order {item}.": "Commander {item}.",
            "Take a nap": "Faire une sieste",
            "Stare at the wall for %s minutes.": "Fixer le mur pendant %s minutes." ,
            "a new pillow": "un nouvel oreiller"           
        }

    >>> tasklist = [
            _("Order {item}.").format(item = _("a new pillow")),
            _("Take a nap") + '!', 
            _("Stare at the wall for %s minutes.") % 30
        ]

    >>> evalr(tasklist, translations.get)
    ['Commander un nouvel oreiller.', 'Faire une sieste!', 'Fixer le mur pendant 30 minutes.']

`evalr` walks python dictionaries, lists, tuples or sets and apply
a function to all the strings wrapped inside a `LazyString` object.

To apply a function to the strings inside a single expression, you can use the `eval` method:

.. code:: python

    >>> s = _("Take a nap") + '!'

    >>> s.eval(str.upper)
    'TAKE A NAP!'

    >>> s.eval(translations.get)
    'Faire une sieste!'

Or, again, the `evalr` function

.. code:: python

    >>> evalr(_("a new pillow").capitalize(), translations.get)
    'Un nouvel oreiller'


For most projects containing more than a few strings or languages, you'll probably want to 
use the gettext_ module to supply you with a translation function.

.. code:: python

    import gettext
    translation = gettext.translation("myproject", "./locale", ["fr"])
    translated_tasklist = evalr(tasklist, translation.ugettext)

GitHub repo: https://github.com/leforestier/postpone

.. _gettext: https://docs.python.org/3/library/gettext.html
SSHMultiThread 1.0
MultiThread program to fetch dtata from multiple remote servers via SSH

================
CAPACITY REPORT
================

Generates report about the account and server utilisation

-----------

A MultiThreaded program to fetch the data by SSH to remote machines and executing commands.
The number of threads are configurable and the program is optimize to use the best system resources.
This is more like of template, I can't post exact content of the script as it may have some confidential information.
In the version 2.0 I will be providing a working script with some demo use case.

Pre-requisite
===============

Please get the below files with the content as specified:

* commands.ini:  ssh#-o#UserKnownHostsFile=/dev/null#-o#StrictHostKeyChecking=no#-o#ConnectTimeout=25#root@192.168.2.101#free -g | awk '/Mem:/ {print $2}'

* inventory.ini: In the below format

[clustername2]

customer:Pandey

host:cluster02


Execution & Output
-------------------

arjun$ python capacity.py

It generates CSV, JSON intermediates file and final HTML report.