semvec/pypi-packages huggingface dataset:
MarkovText 0.1.dev7
A package to generate text via Markov chain using sample text
License: MIT
Keywords: markov chain text generator

*****************************************
MarkovText: A Markov Chain text generator
*****************************************
.. image:: https://travis-ci.org/kwkelly/MarkovText.svg?branch=master
    :target: https://travis-ci.org/kwkelly/MarkovText

MarkovText is a simple Python library for reandomly generating strings of
text based on sample text. A Markov chain text generator uses the frequency of
words following the current state to generate plausible sentences that
hopefully are passable as human text. For example, given the input text "Hello,
how are you today? You look well." and a seed of "you", there is a 50% chance
that the next word is either "look" or "today". The current state may consist
of more than just a single word.

MarkovText is written in Python, and requires numpy (though this may be changed
in the future).


.. contents::
    :local:
    :depth: 1
    :backlinks: none


=============
Main Features
=============

* Simple API to generate single or multiple sentences.
* Ability to add to the sample corpus at any time.

============
Future Needs
============

* Remove dependency on numpy
* Create sentences that are related to each other

============
Installation
============

The recommended way to install this package is with pip

.. code-block:: bash

    $ pip install MarkovText

Alternatively you can download and instll it manually (not recommended)

.. code-block:: bash

    $ git clone https://github.com/kwkelly/MarkovText.git
    $ cd MarkovText
    $ python setup.py
aws-identity-manager 0.0.3
Manage credentials for multiple AWS accounts
License: MIT
Keywords: aws

|Build Status| |Coverage Status|

AWS-Identity-Manager
====================

Command line tool to store credentials for multiple AWS accounts and
quickly switch between them.

Installation
------------

To install using pip:

::

    pip install aws-identity-manager

Or download the `latest
release <https://github.com/nocarryr/AWS-Identity-Manager/releases/latest>`__
and install by running:

::

    python setup.py install

Usage
-----

Start the interactive command line tool:

::

    awsidentity

Then use the following commands:

-  ``save`` Save credentials (if any) found in your existing config
   files for later use
-  ``add`` Allows you to add a new set of credentials (identity)
-  ``edit`` Make changes to existing identity
-  ``change`` Select one of your stored identies and modifies (or
   creates) the configuration files for most AWS client libraries
-  ``import`` Import identities from a csv file downloaded from the IAM
   Console (created whenever you add new users)

Additional Info
~~~~~~~~~~~~~~~

All of the credentials are saved by default in your home directory:

::

    .aws-identity-manager/identities.json

The scripts are designed to keep the permissions of this as well as the
modified config files secured and only accessible to the current user.
Before any changes are made to any existing AWS config files, they are
backed up:

::

    ~/.aws/credentials.bak

This is only done if the backup filename doesn't already exist though.
In other words, it would be a good idea to have your credentials
somewhere safe before running the script.

.. |Build Status| image:: https://travis-ci.org/nocarryr/AWS-Identity-Manager.svg?branch=master
   :target: https://travis-ci.org/nocarryr/AWS-Identity-Manager
.. |Coverage Status| image:: https://coveralls.io/repos/github/nocarryr/AWS-Identity-Manager/badge.svg?branch=master
   :target: https://coveralls.io/github/nocarryr/AWS-Identity-Manager?branch=master
my4geks 0.1.6
MySQL for Gevent kept Simple.
License: MIT

Usage::

    # pip install my4geks
    import gevent.monkey ; gevent.monkey.patch_all()
    from my4geks import db, db_config, db_transaction

    db_config.update(user='user', password='password', database='test')
        # Defaults: host='127.0.0.1', port=3306, pool_size=10, query_timeout=55, charset='utf8', cursor_class=AdictCursor.

    def on_request(): # Inside a greenlet:

        item = db('SELECT * FROM `items` WHERE `id` = %s', item_id, charset='utf8mb4').row

        for item in db('SELECT `id`, `name` FROM `items` WHERE `name` IN %s, [value1, value2]).rows:
            print('{}	{}'.format(item.id, item.name))

        assert db('UPDATE `items` SET `name` = %s WHERE `name` = %s', new_value, old_value).affected # rowcount

        def code():
            db('INSERT INTO `table1` (`quantity`) VALUES (%s)', -100)
            db('INSERT INTO `table2` (`quantity`) VALUES (%s)', +1/0)
        db_transaction(code)