semvec/pypi-packages huggingface dataset:
mapperr 0.2.4
mapperr for mapping across dict and object, recursively
Keywords: python,mapper,recursive mapping

# **mapperr - mapping across dictionary and class object, recursively**

If you are using python for implementing protocols, cache management, nosql or sql database manupilation with  the object oriented concepts in your code, mapperr can handle your object in your way, easily.

## Installation
`via pip`
```shell
pip3 install mapperr
```
`via direct setup`
```shell
pip3 install setuptools
python3 setup.py sdist bdist_wheel
pip3 install dist/mapperr-0.0.1-py3-none-any.whl
```

## Usage
Your classes' attributes are needed to be annotated with their types like `int`, `str`, `Book`, `List[Book]`. Parameterized constructors are not suitable, you can use it with plain objects which has most trash work. You can also fill your required options with param `op_required` as string list.

**`to_obj( dict_data: dict, destination_class: Type ) -> object`**

**`to_dict( obj: object ) -> dict`**


```python
from typing import List
from pprint import pprint
from mapperr import to_dict, to_obj

class Book:
    _id: int
    title: str
    op_required: list = ['_id', 'title']

class BookShelf:
    code: str
    books: List[Book]

class Library:
    name: str
    book_shelfs: List[BookShelf]


def retrieve_library_from_the_source() -> dict:
    return {
        "name" : "Hogwarts Library",
        "book_shelfs" : [
            {
                "code" : "A1",
                "books" : [
                    {
                    "_id" : 0,
                    "title" : "Defence Against the Dark Arts"
                    },
                    {
                    "_id" : 1,
                    "title" : "Potions"
                    },
                ]
            },
            {
                "code" : "A2",
                "books" : [
                    {
                    "_id" : 3,
                    "title" : "Charms"
                    },
                    {
                    "_id" : 4,
                    "title" : "Herbology"
                    },
                ]
            }
        ]
    }

def send_library_to_the_source(data: dict):
    pprint(data)


lib: Library = to_obj(retrieve_library_from_the_source(), Library)

new_book = Book()
new_book._id = 5
new_book.title = "Alchemy"

lib.book_shelfs[0].books.append(new_book)

send_library_to_the_source( to_dict(lib) )
```

You can add your `recursive` type definitions into your class by using string variables and you can also use `superclass`es.

```python
class Person:
    name: str
    identity: int
    age: int
    mother: 'Person'
    father: 'Person'
    friends: List['Person']

class Employee(Person):
    company_name: str
```
aria2jrpc 0.0.2
A small package to help you work with aria2 jrpc
Requires Python: >=3.7

# Aria2jrpc

A wrapper around [Aria2 JSON-RPC](https://aria2.github.io/manual/en/html/aria2c.html#rpc-interface)

## Example usage

```python
from aria2jrpc import Aria2JRPC
aria2_client = Aria2JRPC("http://127.0.0.1:6800", secret="your-secure-secret")
gid = aria2_client.add_uri("http://example.com/file.zip")
aria2_client.pause(gid)
```
signalslite 0.1a4
A small package for Numerai Signals locally
Requires Python: >=3.8

`pip install signalslite`

## Why:
- I wanted a pipeline that can generate features quickly so I can add, remove, build more features whenever needed. So it should be able to do everything from scratch in couple of hours. A relational DB would increase workload of setting things up. So I decided to use  parquet files split into daily structure. This is fast without any additional setup.

- Least friction to get started. It should effortlessly run on consumer grade laptops. Consequently, automate the whole pipeline on cloud, so makes sense to make it "lite", use **parallelization** when possible, allow for free data sources. It can utilize **cuda** if available, but is able to run on **cpu** as well.

- It should be able to run in Colab default runtime. One way to setup a pipeline is to save all data to mounted drive with more storage.

- Under 1000 LoC possible? Goal is not to build the best pipeline, but instead, a wrapper on top of flexible code that new users can easily understand and modify as needed.

## Stages:

1. Daily Data Collection/updation: 
    - Yahoo/EODHD (Thanks to https://github.com/degerhan/dsignals)
    - Save in daily parquet files
    - Update daily parquet files
    - Colab seem to be slow in loading data from yahoo. Will update.
2. Generate primary features:
    - Technicla indicators (RSI, MACD, SMA, EMA, etc on various timeframes)
    - flexible enough to accomodate fundamental data and news vectors data since things are independent of each other
3. Secondary features:
    - Generate features from primary features
    - like crossovers, ratios between technical features, etc
4. Scaling:
    - bringing the cross sectional features to same scale [0, 1]
    - Now data looks similar to Numerai classic data
5. Targets:
    - Generate your own targets for trading strategies
    - or use Numerai Signals targets
6. Modelling:
    - your best models in Numerai classic should work here
7. Scheduling:
    - Run the pipeline daily
    - should be able to run on cloud

## Notes:
- This is a work in progress. I will keep adding more features and examples. 
- more tests,
- more documentation,
- more examples,
- more flexibility,
- more speed,
- more parallelization,
- more cloud support,
- more data sources,
- more targets,
- more models,
- more everything

Hope you like it and find it useful. Please let me know if you have any suggestions or feedback. Thanks!