semvec/pypi-packages huggingface dataset:
plumbium 0.10.0
Records the inputs and outputs of scripts
License: MIT

========
Plumbium
========

.. image:: https://travis-ci.org/jstutters/plumbium.svg?branch=master
 :target: https://travis-ci.org/jstutters/plumbium
 :alt: Build Status

.. image:: https://readthedocs.org/projects/plumbium/badge/?version=latest
 :target: http://plumbium.readthedocs.org/en/latest/?badge=latest
 :alt: Documentation Status

Plumbium is a Python package for wrapping scripts so that their inputs and
outputs are preserved in a consistent way and results are recorded.


Example
-------

.. code:: python

    from plumbium import call, record, pipeline
    from plumbium.artefacts import TextFile


    @record()
    def pipeline_stage_1(f):
        call(['/bin/cat', f.filename])


    @record()
    def pipeline_stage_2(f):
        call(['/bin/cat', f.filename])


    def my_pipeline(file1, file2):
        pipeline_stage_1(file1)
        pipeline_stage_2(file2)


    def example_pipeline():
        pipeline.run(
            'example',
            my_pipeline,
            '/my/data/directory',
            TextFile('month00/data.txt'), TextFile('month12/data.txt')
        )


    if __name__ == '__main__':
        example_pipeline()


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

::

    pip install plumbium


Requirements
------------

Plumbium is tested with Python v2.7 - 3.5.  Use of the MongoDB or SQLDatabase
result recorders requires the installation of the ``pymongo`` or ``sqlalchemy``
modules as appropriate.  Depending on your database SQLAlchemy may require
additional support libraries to be installed.


Documentation
-------------

Full documentation is hosted on `Read the Docs <http://plumbium.readthedocs.org>`_.


Contribute
----------

- Issue Tracker: `github.com/jstutters/plumbium/issues <http://github.com/jstutters/plumbium/issues>`_
- Source Code: `github.com/jstutters/plumbium <http://github.com/jstutters/plumbium>`_


Support
-------

If you are having problems, please let me know by submitting an issue in the tracker.
conda-autoenv 0.1
Automatic Conda Environment
License: MIT
Keywords: conda,auto,env,automatic,environment,directory,pip requirements,environment.yml,yaml

=======================
**Conda-autoenv: Environments by Directory for Conda**
=======================

Automatically activate, update, and deactivate conda environments from an environment.yml file in a directory.

If a pip requirements.txt file exists as well, that will also be installed in the environment and updated upon deactivation.


Install
----

::

    $ pip install conda-autoenv
    $ echo "source `which conda_autoenv.sh`" >> ~/.bash_profile


Usage
----

Add the following line to your ~/.bashrc or ~/.bash_profile:

::

        source ~/conda_autoenv.sh


Case-by-case usage
~~~~~~~~~~~~~~~~~~~~~~~

*Case 1*

If you already have an environment.yml file, place that in your directory (along with your pip requirements.txt file, if applicable), and conda-autoenv will automatically activate that environment.

*Case 2*

If you do not have an environment.yml file, but have a conda environment, export your conda environment to an environment.yml file by executing (in the environment's root directory, while your environment is activated):

::

        $ conda env export > environment.yml

[Optional] You may also want your pip packages to automatically be activated and updated with your environment. If so, execute:

::

        $ pip freeze > requirements.txt

*Case 3*

If you do not have a conda environment, create one by executing (replace ENV_NAME with the name you would like to call your environment):

::

        $ conda create -n ENV_NAME

Then, activate your environment by executing (replace ENV_NAME with the name you gave your environment):

::

        $ source activate ENV_NAME

Finally, export your environment to an environment.yml file to be automatically activated later:

::

        $ conda env export > environment.yml

[Optional] You may also want your pip packages to automatically be activated and updated with your environment. If so, execute:

::

        $ pip freeze > requirements.txt
pybtracker 0.2.2
Simple asyncio-based UDP BitTorrent tracker, with a simple client.
License: MIT
Keywords: bittorrent,torrent,tracker,asyncio,udp

pybtracker
==========

pybtracker is a UDP BitTorrent tracker written in Python 3.5 using
co-routines and the ``asyncio`` module. You can use the tracker in a
script like this:

::

   from pybtracker import TrackerServer

   loop = asyncio.get_event_loop()
   tracker = TrackerServer(local_addr=('127.0.0.1', 8000), loop=loop)
   asyncio.ensure_future(tracker.start())
   try:
       loop.run_forever()
   except KeyboardInterrupt:
       loop.run_until_complete(tracker.stop())

It also includes a UDP tracker client:

::

   from pybtracker import TrackerClient

   async def announce():
       client = TrackerServer(local_addr='udp://127.0.0.1:8000', loop=loop)
       await client.start()
       peers = await client.announce(
           b'01234567890123456789',  # infohash
           10000,                    # downloaded
           40000,                    # left
           5000,                     # uploaded
           0,                        # event (0=none)
           120                       # number of peers wanted
       )
       print(peers)

   loop = asyncio.get_event_loop()
   loop.run_until_complete(announce())

You can run the server independently by running:

::

   $ python -m pybtracker.server -b 127.0.0.1:8000 -O

The client can also be run independently and it provides you with a
shell to interact with the server:

::

   $ python -m pybtracker.client udp://127.0.0.1:8000
   BitTorrent tracker client. Type help or ? to list commands.

   (btrc) help
   Documented commands (type help <topic>):
   ========================================
   EOF  announce  connect  help  quit

   (btrc) quit
   $

If you have installed pybtracker using pip or setup.py, you can also
run ``pybtracker`` and ``pybtracker-client`` instead of using ``python
-m``.