semvec/pypi-packages huggingface dataset:
icf-recommender 0.0.1
Recommendation Algorithm: Item Collaborative Filtering
Requires Python: >=3

# item-item-collaborative-filtering
Implementation of Amazon's [Item-Item Collaborative Filtering](https://www.computer.org/csdl/mags/ic/2017/03/mic2017030012.pdf)

## Requirements
* Python 3.6+
* Virtualenv
* Pip3

## Setup
Create the environment and install the packages listed in `requirements.txt`
with the following command:

```commandline
make requirements
```

## Testing
Run unit tests with the following command:

```commandline
make test
```
apriltag 0.0.16
apriltag marker detection

Apriltag
--------
apriltag marker detection
based on <https://github.com/swatbotics/apriltag>

Dependencies
------------

  - OpenCV (optional)

Example
-------
```python
import apriltag
import cv2
img = cv2.imread('apriltag_foto.jpg'.cv2.IMREAD_GRAYSCALE)
detector = apriltag.Detector()
result = detector.detect(img)
```


result is in the form of
```
[DetectionBase(tag_family='tag36h11', tag_id=2, hamming=0, goodness=0.0, decision_margin=98.58241271972656, homography=array([[ -1.41302664e-01,   1.08428082e+00,   1.67512900e+01],
   [ -8.75899366e-01,   1.50245469e-01,   1.70532040e+00],
   [ -4.89183533e-04,   2.12210247e-03,   6.02052342e-02]]), center=array([ 278.23643912,   28.32511859]), corners=array([[ 269.8939209 ,   41.50381088],
   [ 269.57183838,   11.79248142],
   [ 286.1383667 ,   15.84242821],
   [ 286.18066406,   43.48323059]])),
DetectionBase(tag_family='tag36h11', ... etc
```


Multiple options can be specified to tune the detection performance:
--------------------------------------------------------------------
```python
options = apriltag.Detectoroptions(families='tag36h11',
                                 border=1,
                                 nthreads=4,
                                 quad_decimate=1.0,
                                 quad_blur=0.0,
                                 refine_edges=True,
                                 refine_decode=False,
                                 refine_pose=False,
                                 debug=False,
                                 quad_contours=True)
detector = apriltag.Detector()
result = detector.detect(img)
```

Access values
--------
```python
tf = result[0].tag_family
cx = result[0].center[0]
.
subsdata 0.1.2
SDP: Subscription Data Protocol

# SDP: Subscription Data Protocol

```python
import asyncio
import websockets
from rethinkdb import r
from subsdata.sdp import sdp, method, sub, get_connection, is_logged, has_role

@method
@is_logged
async def add(user, a, b):
    return a + b

@method
@has_role('admin')
async def create(user):
    connection = await get_connection()
    await r.table('test').insert({'x': 0}).run(connection)

@method
async def increment(user, id, value):
    connection = await get_connection()
    await r.table('test').get(id).update({"x": r.row["x"]+value}).run(connection)

@sub
def x_less_than(user, max):
    return r.table('test').filter(lambda row: (row['x'] < max))

def main():    
    loop = asyncio.get_event_loop()
    loop.run_until_complete(websockets.serve(sdp, '0.0.0.0', 8888))
    print("Real time server started at port 8888")
    loop.run_forever()
    loop.close()
```

```yml
#example of a docker-compose.yml
version: '3'
services:
  ws:
    build: .
    stdin_open: true
    tty: true
    ports:
    - "8888:8888"
    volumes:
    - ./:/usr/src/app
    environment:
    - RT=rdb
    - DEBUG=1
    - SECRET=secret
    command: python -m watchgod app.main 
  rdb:
    image: rethinkdb
    ports:
    - "8080:8080"
    - "28015:28015"
    volumes:
    - './data:/data'
```