semvec/pypi-packages huggingface dataset:
r2ntab 1.0.3
Interpretable machine learning model for binary classification combining deep learning and rule learning
Requires Python: >=3.8
Keywords: python,rule learning,neural networks,deep learning,classification

Developed by M.J. van der Zwart as MSc thesis project (c) 2023

## Installation

```
pip install r2ntab
```

## Preparing data using sample dataset

```python
import torch

from r2ntab import transform_dataset, kfold_dataset

name = 'adult.data'
X, Y, X_headers, Y_headers = transform_dataset(name, method='onehot-compare',
negations=False, labels='binary')
datasets = kfold_dataset(X, Y, shuffle=1)
X_train, X_test, Y_train, Y_test = datasets[0]
train_set = torch.utils.data.TensorDataset(torch.Tensor(X_train.to_numpy()),
torch.Tensor(Y_train))
```

## Creating and training the model

```python
from r2ntab import R2NTab

model = R2NTab(len(X_headers), 10, 1)
model.fit(train_set, epochs=1000)
Y_pred = model.predict(X_test)
```

## Extracting the results

```python
rules = model.extract_rules(X_headers, print_rules=True)
print(f'AUC: {model.score(Y_pred, Y_test, metric="auc")}')
print(f'# Rules: {len(rules)}')
print(f'# Conditions: {sum(map(len, rules))}')
```

## Contact

For any questions or problems, please open an issue <a href="https://github.com/mrvanderzwart/R2N-Tab">here</a> on GitHub.
sklearn 0.0.post12
deprecated sklearn package, use scikit-learn instead

# ⚠️⚠️⚠️ Summary ⚠️⚠️⚠️

⚠️⚠️⚠️ The **`sklearn` PyPI package is deprecated use `scikit-learn` instead** ⚠️⚠️⚠️

# How to fix the error for the main use cases

- use `pip install scikit-learn` rather than `pip install sklearn`
- replace `sklearn` by `scikit-learn` in your pip requirements files
  (`requirements.txt`, `setup.py,` `setup.cfg`, `Pipfile`, etc ...)
- if the `sklearn` package is used by one of your dependencies
  it would be great if you take some time to track which package uses
  `sklearn` instead of `scikit-learn` and report it to their issue tracker
- as a last resort, set the environment variable
  `SKLEARN_ALLOW_DEPRECATED_SKLEARN_PACKAGE_INSTALL=True` to avoid this error

# Reason for the deprecation

`sklearn` package on PyPI exists to prevent malicious actors from using the
`sklearn` package, since `sklearn` (the import name) and `scikit-learn` (the
project name) are sometimes used interchangeably. `scikit-learn` is the actual
package name and should be used with pip, e.g. for:
- pip commands: `pip install scikit-learn`
- pip requirement files (`requirements.txt`, `setup.py,` `setup.cfg`,
  `Pipfile`, etc ...)

At the time of writing (October 2022) `sklearn` downloads is about 1/5 of the
`scikit-learn` downloads on PyPI so a lot of people are using it.

There are some edge cases with the way the PyPI `sklearn` package is
implemented:
- `pip install sklearn==1.1.3` will say that the 1.1.3 version does not exist,
  which is confusing. The only available version at the time of writing of
  `sklearn` is 0.0.
- `pip uninstall sklearn` will actually not uninstall `scikit-learn`, you can
  still do `import sklearn` afterwards
- it can be confusing to have both `sklearn` and `scikit-learn` in the `pip
  list` output, prompting questions like "why do I have scikit-learn 1.1.3 and
  sklearn 0.0, and what does it even mean"?

# Historical brownout schedule

Starting 2023 December 1st, trying to install the `sklearn` PyPI package will
raise an error.

The following table shows the historical brownout schedule that was used
between 2022 December 1st and 2023 December 1st, in order to get more people
aware of the deprecation.

| Dates                                 | Window(s)                      |
|---------------------------------------|--------------------------------|
| 2022 December 1st - 2023 January 31st | :00-:05 every hour             |
| 2023 February 1st - March 31st        | :00-:10 every hour             |
| 2023 April 1st - May 31st             | :00-:15 every hour             |
| 2023 June 1st - July 31st             | :00-:10 and :30-:40 every hour |
| 2023 August 1st - September 30th      | :00-:15 and :30-:45 every hour |
| 2023 October 1st - November 30th      | :00-:20 and :30-:50 every hour |
| 2023 December 1st onwards             | always raise an exception      |
school-mos 1.0
Эта библиотека позволяет получить легкий доступ к ресурсам Московской Электронной Школы, в обход учебного портала.
Requires Python: >=3.10

# school_mos
Эта библиотека позволяет получить легкий доступ к ресурсам Московской Электронной Школы, в обход учебного портала.

### Примечания:

1) Для авторизации используется Selenium (Firefox). Если у вас установлен другой браузер, необходимо установить Firefox либо geckodriver к нему.

2) Библиотека пока не умеет работать с профилем учителя, а также будет выводить информацию только об одном ребенке, в случае, если авторизация происходит через многодетный родительский аккаунт.

3) Для ознакомления с форматом вывода данных рекомендуется просмотреть Types.py

### Установка:
```
pip install school_mos
```

### Авторизация:
1) По логину и паролю:
```
login = ...  # Ваш логин от mos.ru
password = ...  # Ваш пароль

import school_mos

user = school_mos.AUTH(_login=login, _password=password,
                       show_token=True  # необязательный параметр, см. ниже
                       )
```
2) По токену:</br>

   **Рекомендуется использовать именно этот способ, т.к это существенно сокращает время работы из-за ненадобности получения токена c каждой авторизацией (при использовании способа выше).** </br>   
   *Для использования необходимо поставить значение параметра "show_token" на True и сохранить токен после его вывода в консоль*
  ```
token = ...

user = school_mos.AUTH(token=token)
  ```

#### Получение оценок:
1) За определенную дату:
```
print(user.marks.get_by_date(date_offset=1))  # Реализовано путем отступа от текущей даты на n дней
```
2) За триместр / четверть:
```
print(user.marks.get_per_trimester(trimester=0))
# trimester: по умолчанию - первый. При неверно заданном параметре вернёт None
```
#### Получение расписания:
```
print(user.schedule.get_by_date(date_offset=1)
```
#### Получение домашнего задания:
```
print(user.homework.get_by_date(date_offset=1)
```
#### Получение информации о пользователе:
```
print(f'{user.first_name}, {user.birth_date}, {user.class_name} класс\n')
# пример
```   


*Создано в рамках школьного проекта учеником 11-А класса Школы №64 [Выпуск 2023-24]*
flask-ujson 1.0.6
Flask with UltraJSON.
Requires Python: >=3.8

# flask-ujson

[![PyPI version](https://badge.fury.io/py/flask-ujson.svg)](https://badge.fury.io/py/flask-ujson)
[![License](https://img.shields.io/badge/license-LGPL_v2-red.svg)](https://raw.githubusercontent.com/CheeseCake87/flask-ujson/master/LICENSE)

`pip install flask-ujson`

Flask with UltraJSON.

[https://github.com/ultrajson/ultrajson](https://github.com/ultrajson/ultrajson)

```python
from flask import Flask, request

from flask_ujson import UJSON

ultra_json = UJSON()


def create_app():
    app = Flask(__name__)
    ultra_json.init_app(app)  # Sets UltraJSON as the default JSON encoder

    @app.route("/")
    def index():
        """
        Outputs a JSON response using UltraJSON library

        https://github.com/ultrajson/ultrajson
        """
        return {
            "timestamp": 1556283673.1523004,
            "task_uuid": "0ed1a1c3-050c-4fb9-9426-a7e72d0acfc7",
            "task_level": [1, 2, 1],
            "action_status": "started",
            "action_type": "main",
            "key": "value",
            "another_key": 123,
            "and_another": ["a", "b"],
        }

    @app.post("/post")
    def accept_json():
        json = request.get_json()
        return json

    return app


if __name__ == "__main__":
    app = create_app()
    app.run(debug=True)

```