semvec/pypi-packages huggingface dataset:
oauth2helper 3.4.0
Validate and extract information from OAuth2 token.
License: MIT
Requires Python: >=3.6
Keywords: security,oauth2,jwt

<h2 align="center">Validate and extract information from OAuth2 token</h2>

<p align="center">
<a href="https://pypi.org/project/oauth2helper/"><img alt="pypi version" src="https://img.shields.io/pypi/v/oauth2helper"></a>
<a href="https://travis-ci.com/Colin-b/oauth2helper"><img alt="Build status" src="https://api.travis-ci.com/Colin-b/oauth2helper.svg?branch=develop"></a>
<a href="https://travis-ci.com/Colin-b/oauth2helper"><img alt="Coverage" src="https://img.shields.io/badge/coverage-100%25-brightgreen"></a>
<a href="https://github.com/psf/black"><img alt="Code style: black" src="https://img.shields.io/badge/code%20style-black-000000.svg"></a>
<a href="https://travis-ci.com/Colin-b/oauth2helper"><img alt="Number of tests" src="https://img.shields.io/badge/tests-21 passed-blue"></a>
<a href="https://pypi.org/project/oauth2helper/"><img alt="Number of downloads" src="https://img.shields.io/pypi/dm/oauth2helper"></a>
</p>

 * [Validate OAuth2 token](#validating-an-oauth2-token)
 * [Extract token information](#extracting-user-from-a-oauth2-token)
 * [Starlette](#starlette)

## Validating an OAuth2 token

```python
import oauth2helper

headers = {"Authorization": "Bearer YOUR_OAUTH2_TOKEN"}
my_token = headers.get('Authorization')[7:]

# Will raise InvalidTokenError or InvalidKeyError in case validation failed
oauth2helper.validate(my_token, "https://provider_url/common/discovery/keys")
```

## Extracting user from a OAuth2 token

```python
import oauth2helper

headers = {"Authorization": "Bearer YOUR_OAUTH2_TOKEN"}
my_token = headers.get('Authorization')[7:]

json_header, json_body = oauth2helper.validate(my_token, "https://provider_url/common/discovery/keys")
username = oauth2helper.user_name(json_body)
```

## Starlette

A [Starlette](https://www.starlette.io) [`AuthenticationMiddleware`](https://www.starlette.io/authentication/) backend is available.

```python
from starlette.applications import Starlette
from starlette.authentication import requires
from starlette.middleware import Middleware
from starlette.middleware.authentication import AuthenticationMiddleware
from oauth2helper.starlette import OAuth2IdTokenBackend, unauthorized


backend = OAuth2IdTokenBackend(
    identity_provider_url="https://identity_provider_url",
    # You can extract scopes per user and validate them on @requires decorator
    scopes_retrieval=lambda json_body: ["authenticated"],
)
app = Starlette(middleware=[Middleware(AuthenticationMiddleware, backend=backend, on_error=unauthorized)])

@app.route("/authenticated_endpoint")
@requires(scopes=["authenticated"])
def endpoint(request):
    pass  # Implement your own logic
```

## How to install
1. [python 3.6+](https://www.python.org/downloads/) must be installed
2. Use pip to install module:
```sh
python -m pip install oauth2helper
```
missing-values-yash-saxena 1.0.2
Replacing missing values in the dataset with the mean of that particular column using SimpleImputer class.
License: MIT

# Replacing missing values in a dataset with the mean of that particular column

**Project 3 : UCS633 DATA ANALYTICS AND VISUALIZATION**


Submitted By: **Yash Saxena 101703627**

***
pypi: <https://pypi.org/project/missing-values-yash-saxena/>
***

## SimpleImputer Class
```
class sklearn.impute.SimpleImputer(missing_values=nan, strategy='mean', fill_value=None, verbose=0, copy=True, add_indicator=False)
```
SimpleImputer is a scikit-learn class which is helpful in handling the missing data in the predictive model dataset.It replaces the NaN values with a specified placeholder.It is implemented by the use of the SimpleImputer() method which takes the following arguments:
<br>
<br>
missing_data : The missing_data placeholder which has to be imputed. By default is NaN.
<br>
<br>
stategy : The data which will replace the NaN values from the dataset. The strategy argument can take the values â€“ 'mean'(default),'median', 'most_frequent' and 'constant'.
<br>
<br>
fill_value : The constant value to be given to the NaN data using the constant strategy.
<br>
<br>
copy : boolean, default=True
If True, a copy of X will be created. If False, imputation will be done in-place whenever possible. Note that, in the following cases, a new copy will always be made, even if copy=False
<br>
<br>
add_indicator : boolean, default=False
If True, a MissingIndicator transform will stack onto output of the imputerâ€™s transform. This allows a predictive estimator to account for missingness despite imputation. 


## Installation

Use the package manager [pip](https://pip.pypa.io/en/stable/) to install removal system.

```bash
pip install missing-values-yash-saxena
```

<br>

## How to use this package:

missing-values-yash-saxena can be run as done below:



### In Command Prompt
```
>> missing_values dataset.csv
```
<br>


## Sample dataset

a | b | c 
:--------: | :--------: | :--------:
NaN| 7 | 0
0 |NaN| 4
2 |NaN| 4
1 | 7 | 0
1 | 3 | 9
7 | 4 | 9
2 | 6 | 9
9 | 6 | 4
3 | 0 | 9
9 | 0 | 1

<br>


## Output Dataset after Handling the Missing Values

a | b | c 
:--------: | :--------: | :--------:
3.777778  | 7 | 0
0 | 4.125  | 4
2 |  4.125 | 4
1 | 7 | 0
1 | 3 | 9
7 | 4 | 9
2 | 6 | 9
9 | 6 | 4
3 | 0 | 9
9 | 0 | 1

<br>

It is clearly visible that the rows,columns containing Null Values have been Handled Successfully.


## License
[MIT](https://choosealicense.com/licenses/mit/)
cpz 1.0.1
A simple xml parse and build library.
License: MIT

Brief
=====

[![alt Latest Version](https://img.shields.io/pypi/v/db0905.svg)](https://pypi.org/project/db0905/)
[![alt License](https://img.shields.io/github/license/heronotears/db0905.svg)](https://github.com/heronotears/db0905/blob/master/LICENSE)
[![alt Downloads](https://img.shields.io/pypi/dm/db0905.svg)](https://pypi.org/project/db0905/)
[![Build Status](https://travis-ci.org/heronotears/db0905.svg?branch=master)](https://travis-ci.org/heronotears/db0905)

A simple xml parse and build library.


Installation
============

```sh
pip install db0905
```


Examples
========

* xml to python object

```sh
>>> import db0905
>>> xml = '<demo><foo>foo</foo><bar>bar</bar></demo>'
>>> db0905.loads(xml)
{'bar': 'bar', 'foo': 'foo'}
>>> db0905.loads(xml, strip_root=False)
{'demo': {'bar': 'bar', 'foo': 'foo'}}
>>> xml = '<demo><foo>foo</foo><bar>1</bar><bar>2</bar></demo>'
>>> db0905.loads(xml)
{'bar': ['1', '2'], 'foo': 'foo'}
```

* python object to xml

```sh
>>> data = {'demo':{'bar': ['1', '2'], 'foo': '<foo>'}}
>>> db0905.dumps(data)
'<?xml version="1.0" encoding="utf-8"?><demo><foo><![CDATA[<foo>]]></foo><bar><![CDATA[1]]></bar><bar><![CDATA[2]]></bar></demo>'
>>> db0905.dumps(data, cdata=False)
'<?xml version="1.0" encoding="utf-8"?><demo><foo>&lt;foo&gt;</foo><bar>1</bar><bar>2</bar></demo>'
>>> print db0905.dumps(data, indent=' ' * 4)
<?xml version="1.0" encoding="utf-8"?>
<demo>
   <foo><![CDATA[<foo>]]></foo>
   <bar><![CDATA[1]]></bar>
   <bar><![CDATA[2]]></bar>
</demo>
```


Documentation
=============

See [docs in readthedocs](http://db0905.readthedocs.org/en/latest/)


Changelog
=========

See [changelog](https://github.com/heronotears/db0905/blob/master/docs/changelog.rst)
db0905 1.0.1
A simple xml parse and build library.
License: MIT

Brief
=====

[![alt Latest Version](https://img.shields.io/pypi/v/db0905.svg)](https://pypi.org/project/db0905/)
[![alt License](https://img.shields.io/github/license/heronotears/db0905.svg)](https://github.com/heronotears/db0905/blob/master/LICENSE)
[![alt Downloads](https://img.shields.io/pypi/dm/db0905.svg)](https://pypi.org/project/db0905/)
[![Build Status](https://travis-ci.org/heronotears/db0905.svg?branch=master)](https://travis-ci.org/heronotears/db0905)

A simple xml parse and build library.


Installation
============

```sh
pip install db0905
```


Examples
========

* xml to python object

```sh
>>> import db0905
>>> xml = '<demo><foo>foo</foo><bar>bar</bar></demo>'
>>> db0905.loads(xml)
{'bar': 'bar', 'foo': 'foo'}
>>> db0905.loads(xml, strip_root=False)
{'demo': {'bar': 'bar', 'foo': 'foo'}}
>>> xml = '<demo><foo>foo</foo><bar>1</bar><bar>2</bar></demo>'
>>> db0905.loads(xml)
{'bar': ['1', '2'], 'foo': 'foo'}
```

* python object to xml

```sh
>>> data = {'demo':{'bar': ['1', '2'], 'foo': '<foo>'}}
>>> db0905.dumps(data)
'<?xml version="1.0" encoding="utf-8"?><demo><foo><![CDATA[<foo>]]></foo><bar><![CDATA[1]]></bar><bar><![CDATA[2]]></bar></demo>'
>>> db0905.dumps(data, cdata=False)
'<?xml version="1.0" encoding="utf-8"?><demo><foo>&lt;foo&gt;</foo><bar>1</bar><bar>2</bar></demo>'
>>> print db0905.dumps(data, indent=' ' * 4)
<?xml version="1.0" encoding="utf-8"?>
<demo>
   <foo><![CDATA[<foo>]]></foo>
   <bar><![CDATA[1]]></bar>
   <bar><![CDATA[2]]></bar>
</demo>
```


Documentation
=============

See [docs in readthedocs](http://db0905.readthedocs.org/en/latest/)


Changelog
=========

See [changelog](https://github.com/heronotears/db0905/blob/master/docs/changelog.rst)