semvec/pypi-packages huggingface dataset:
connection-pool 0.0.2
thread safe connection pool
License: MIT

ConnectionPool
##############

Thread-safe connection pool for python

Examples
========

Create a pool
---------------

.. code-block:: python

    import memcache
    from connection_pool import ConnectionPool

    # via create function
    def create_memcache_client():
        return memcache.Client(['127.0.0.1:11211'])

    pool = ConnectionPool(create=create_memcache_client,
                          max_size=10, max_usage=10000, idle=60, ttl=120)

    # via lambda
    pool = ConnectionPool(create=lambda: memcache.Client(['127.0.0.1:11211']),
                          max_size=10)

    # via functools.partial
    from functools import partial
    pool = ConnectionPool(create=partial(memcache.Client, ['127.0.0.1:11211']),
                          max_size=10)

    # using a connection
    with pool.item() as memcache:
        memcache.set('foo', 'bar')

License
=======

he MIT License (MIT). Please see License File for more information.
crypko.py 0.0.5b0
A basic wrapper around the Crypko platform.
License: MIT

=========
crypko.py
=========

Install using ``pip install crypko.py``.

Provides a simple wrapper around the Crypko platform allowing users to
search for crypko, purchase crypko, fuse crypko, etc.

More features are slowly being added as I work on them. If any part of
this stops working because the Crypko platform has been updated, let
me know and I'll try and fix it.

Basic usage:
============

.. code-block:: python

  >>> import crypko
  >>> api = crypko.API()
  >>> num, results = api.search(owner_addr='0xCa39E90CeC69838e73CC4F24Ec5077daC44B47d6', attributes='glasses')
  >>> num
  116
  >>> next(resuls)
  <crypko.objects.Crypko object at 0x7f01d9ded240>
  >>> print(next(results))
  Crypko #168993 SALE
  >>> c = next(results)
  >>> c.image
  'https://img.crypko.ai/daisy/9753747176b22ea4fdb120f308073c35930c38a6_lg.jpg'
  >>> c.details.matron
  <crypko.objects.Crypko object at 0x7f1d39348e10>
  >>> c.details.owner.username
  'Bottersnike'

Examples:
=========

Examples can be found in `crypko/examples`.
config-yaml 0.0.2
Serialize and deserialize your configurations/arguments to yaml.
License: MIT
Keywords: config yaml argparse serialize experiment

# config-yaml

Serialize and deserialize your configurations/arguments to yaml. 

- A solution to experiment configuration recording.
- Compatible with `argparse`. Need least modifications to your original code using `argparse`.
- Small and extensible. Add anything you need on top of the module.

See `demo.ipynb` or [demo.html](https://vickyliin.github.io/config-yaml/demo/demo.html) for more examples and more details.
PyTlin 1.2
Kotlin functions also, let, and run, as well as sh-like (and Mathematica-like) piping syntax
License: MIT

PyTlin
======

Module implementing the Kotlin functions ``also``, ``let``, and ``run``
in Python. Additionally it includes sh-like (and Mathematica-like)
piping syntax.

The Kotlin functions are documented in
`here <http://kotlinlang.org/api/latest/jvm/stdlib/kotlin/index.html>`__.

Install
=======

.. code:: python

   pip install PyTlin

Syntax
======

.. code:: python

   from PyTlin import k

   k(obj).let(func).also(func)
   k.run(func)
   k(obj) | func1 | func2 | ...
   k(obj) @ func1 @ func2 @ ...

Here all expressions (except ``k.run(func)``) is wrapped in the class
``k``. To recover ``obj`` one can apply either of these

.. code:: python

   k(obj).end
   k(obj) | 'end'
   k(obj) | 0
   k(obj) @ 'end'
   k(obj) @ 0

Example
=======

.. code:: python

   from PyTlin import k
   class Person:
       def __init__(self,name,age):
           self.name = name
           self.age = age
       def __repr__(self):
           return '%s, %d' % (self.name, self.age)
       def increaseAge(self):
           self.age = self.age + 1
       def nameToUpperCase(self):
           self.name = self.name.upper()

   student = Person('Pete', 18)
   print(student) #Pete, 18

let
---

.. code:: python

   name = k(student).let(lambda x: (print(x),x.name)[1]) #Pete, 18
   print(name) #Pete

also
----

.. code:: python

   newstudent = k(student).also(lambda x: (x.increaseAge(), x.nameToUpperCase()))
   print(newstudent) #PETE, 19

run
---

.. code:: python

   mood = 'sad'
   k.run(lambda mood = 'happy': print(mood)) #happy
   print(mood) #sad

Piping
------

Piping can be done with either ``.let`` or with pipe operators ``@``
(Mathematica-like in reverse order) or ``|`` (sh-like).

.. code:: python

   ops=k(4).let(lambda x: x*2).let(lambda x: x+3)
   print(ops) #11
   print(type(ops)) #<class 'PyTlin.k'>
   print(ops.end) #11
   print(type(ops.end)) #<class 'int'>

   print(ops.end ==
    k(4) @ (lambda x: x*2) @ (lambda x: x+3) @ 'end') #True

   print(ops.end ==
    k(4) | (lambda x: x*2) | (lambda x: x+3) | 0) #True