semvec/pypi-packages huggingface dataset:
pusherclientb 0.3.1
Pusher websocket client for python
License: MIT
Keywords: pusher websocket client

[![Build Status](https://travis-ci.org/bartbroere/PythonPusherClient.svg?branch=master)](https://travis-ci.org/bartbroere/PythonPusherClient)

pusherclientb
=============

pusherclientb is a python module for handling pusher websockets. This is a branched off version of the original (pusherclient) by Erik Kulyk. It is fully backwards compatible, and in addition provides decoded messages and custom arguments in the callback.

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

Simply run "python setup.py install".

This module depends on websocket-client module available from: <http://github.com/liris/websocket-client>

Example
-------

Example of using this pusher client to consume websockets::

    import pusherclient

    # Add a logging handler so we can see the raw communication data
    import logging
    root = logging.getLogger()
    root.setLevel(logging.INFO)
    ch = logging.StreamHandler(sys.stdout)
    root.addHandler(ch)

    global pusher

    # We can't subscribe until we've connected, so we use a callback handler
    # to subscribe when able
    def connect_handler(data):
        channel = pusher.subscribe('mychannel')
        channel.bind('myevent', callback)

    pusher = pusherclient.Pusher(appkey)
    pusher.connection.bind('pusher:connection_established', connect_handler)
    pusher.connect()

    while True:
        # Do other things in the meantime here...
        time.sleep(1)

Sending pusher events to a channel can be done simply using the pusher client supplied by pusher.  You can get it here: <http://github.com/newbamboo/pusher_client_python>

    import pusher
    pusher.app_id = app_id
    pusher.key = appkey

    p = pusher.Pusher()
    p['mychannel'].trigger('myevent', 'mydata')

Thanks
------

Built using the websocket-client module from <http://github.com/liris/websocket-client>.
The ruby gem by Logan Koester which provides a similar service was also very helpful for a reference.  Take a look at it here: <http://github.com/logankoester/pusher-client>.

Copyright
---------

MIT License - See LICENSE for details.
ens-namehash 1.0.0
Implementation of the namehash algorithm from EIP137
License: MIT
Keywords: ethereum ens namehash

# ENS Namehash

This package is an implementation of the *namehash* algorithm from
[EIP137](https://github.com/ethereum/EIPs/issues/137).

### Quickstart

Install the package:

```bash
$ pip install ens-namehash
```

Hash some names!


```python
>>> from namehash import namehash
>>> namehash('')
... b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
>>> namehash('eth')
... b'\x93\xcd\xebp\x8buE\xdcf\x8e\xb9(\x01v\x16\x9d\x1c3\xcf\xd8\xedo\x04i\n\x0b\xcc\x88\xa9?\xc4\xae'
>>> namehash('foo.eth')
... b'\xde\x9b\t\xfd|_\x90\x1e#\xa3\xf1\x9f\xec\xc5H(\xe9\xc8HS\x98\x01\xe8e\x91\xbd\x98\x01\xb0\x19\xf8O'
```
pandas-linker 0.0.2
Linking rows of pandas dataframes
License: MIT

# pandas-linker

`pandas-linker` runs comparison windows over different sortings of a pandas DataFrame and links the rows via assigned UUIDs. This library does not actually do any duplicate detection. Instead it provides a harness to run your own comparison functions on your data.

This library is meant for datasets of a size where comparing every row with every other is undesirable. Instead you can decide on a sorting order of the DataFrame and only compare every row with every other inside a sliding window.

## Install

```
pip install pandas-linker
```

## Example

Let's say you have a DataFrame like this:

 [ix] | name | country
------|------|--------
   0  | Pete | Spain
   1  | Mary | USA
   2  | Bart | US
   3  | Mary | US

and you want to detect similar rows and mark them as such. Here's how to do that:

```python
from pandas_linker import get_linker


def compare_rows(a, b):
    ''' Example function that decides if two rows represent same entity.'''
    return a['name'] in b['name'] or b['name'] in a['name']

# df is a pandas.DataFrame with a unique index

with get_linker(df, field='uid') as linker:

    print('Comparing in 10 row window sorted by name')
    linker(sort_cols=['name'], window_size=10, cmp=compare_rows)

    print('Comparing in 15 row window sorted by country')
    linker(sort_cols=['country'], window_size=15, cmp=compare_rows)

```

After running the linker the process is complete

 [ix] | name | country | uid
------|------|---------|----
   0  | Pete | Spain   | 7509781940fc471cad5dc32944652d70
   1  | Mary | USA     | 8f8dccd91568472daf740e9160349d6c
   2  | Bart | US      | 12b55fbe80f64d378193acd727b0e051
   3  | Mary | US      | 8f8dccd91568472daf740e9160349d6c

Note that both "Mary" rows in the DataFrame have been identified as representing
the same entity and were assigned the same UUID.