semvec/pypi-packages huggingface dataset:
slider-task 0.1.1
oTree Slider Task.
License: MIT

# oTree Slider Task

An easy to configure, ready to use slider task for oTree.
This is a beta version, you can help to enhance it by submitting issues and pull requests.

## Installation
```bash
pip3 install slider_task
```

In `settings.py` add `slider_task` to `INSTALLED_APPS`
```python
INSTALLED_APPS = ['otree', 'slider_task']
```

For installing on your server, your `requirements_base.txt` should include `slider_task`.

## Integrating with your experiment
### `models.py`
Add these two import statements at the top:
```python
from otree.db.models import ForeignKey
from slider_task.models import BaseSlider, SliderPlayer
```

If you want to show your sliders in multiple columns, add `slider_columns` to your `Constants`
```python
class Constants(BaseConstants):
    slider_columns = 3
    # ...
```

Make sure your `Player` class inherits from `SliderPlayer`
```python
class Player(SliderPlayer):
    pass
```

Add the `Slider` class, which inherits from `BaseSlider`.
The foreign key assignemnt is required.
```python
class Slider(BaseSlider):
    player = ForeignKey(Player)
```

Finally, make sure to call `prepare_sliders()` for each player when creating the session.
Here you can also specify how many sliders you want to show to players as well as their minimum and maximum values which. (The defaults are num=1, min=0, max=100.)
```python
class Subsession(BaseSubsession):
    def creating_session(self):
        for p in self.get_players():
            p.prepare_sliders(num=20, min=0, max=4)
``` 

### `views.py`
Add these two import statements at the top:
```python
from .models import Slider
from slider_task.pages import SliderTaskPage
```

Let the page, which is supposed to show the slider task inherit from `SliderTaskPage` and assign the Constants and Slider objects. Don't forget to include it in the `page_sequence`.
```python
class Sliders(SliderTaskPage):
    Constants = Constants
    Slider = Slider
    # ...
page_sequence = [
    Sliders
]
```
pdtransform 0.2
Sklearn transformers that work with Pandas dataframes
License: MIT
Keywords: sklearn pandas transformers pipeline

sklearn-pdtransform
-------------------

Installation:

.. code::

    $ pip install pdtransform

A little package with a few transformers to work with Pandas dataframes in the
Sklearn pipeline, which I found myself writing quite frequently. Example usage:

.. code:: python

   from pdtransform import DFTransform, DFFeatureUnion

   pipeline = Pipeline([
       ('ordinal_to_nums', DFTransform(_ordinal_to_nums, copy=True)),
       ('union', DFFeatureUnion([
           ('categorical', Pipeline([
               ('select', DFTransform(lambda X: X.select_dtypes(include=['object']))),
               ('fill_na', DFTransform(lambda X: X.fillna('NA'))),
               ('one_hot', DFTransform(_one_hot_encode)),
           ])),
           ('numerical', Pipeline([
               ('select', DFTransform(lambda X: X.select_dtypes(exclude=['object']))),
               ('fill_median', DFTransform(lambda X: X.fillna(X.median()))),
               ('add_features', DFTransform(_add_features, copy=True)),
               ('remove_skew', DFTransform(_remove_skew, copy=True)),
               ('find_outliers', DFTransform(_find_outliers, copy=True)),
               ('normalize', DFTransform(lambda X: X.div(X.max())))
           ])),
       ])),
   ])


For more information read `this blog post <http://signal-to-noise.xyz/why-you-should-use-scikit-learns-pipeline-object.html>`_.
vbcode 0.2.0
Variable byte codes
License: MIT

| Variable byte codes.
| Compression algorithm for integers.
| (http://nlp.stanford.edu/IR-book/html/htmledition/variable-byte-codes-1.html)

Usage
=====

Encoding::

  import vbcode
  bytestream = vbcode.encode([1,2,3,4,5])
  
Decoding::

  vbcode.decode(bytestream)