semvec/pypi-packages huggingface dataset:
httpmethods 1.0.5
HTTP methods that python supports
License: MIT
Keywords: HTTP,HTTP REQUEST,REQUESTS METHODS

# HTTP Request Methods

HTTP verbs that python core's HTTP parser supports.

This module provides an export that is just like
[HTTP request methods](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods) from Developer Mozilla, with the following differences:

  * All method names are lower-cased.
  * All method names are upper-cased.

# HTTP Status Codes

Also this module provides a list with all 
[HTTP Status Codes](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status) and you can get only status description by status code or get all status.

We use the methods package from [Node.js](https://www.npmjs.com/package/methods) as inspiration

## Install
Install and update using [Pip](https://pypi.org/):

```sh
$ pip install httpmethods
```

## API

```python
import httpmethods as methods
```


### A Simple Example
```python
from httpmethods import get_http_methods

for method in get_http_methods():
    print(method)
```
```
$ get
$ post
$ put
$ delete
$ ...
```

```python
from httpmethods import get_http_methods

for _method in get_http_methods(uppercase=True):
    print(_method)
```
```
$ GET
$ POST
$ PUT
$ DELETE
$ ...
```

```python
from httpmethods import get_status_codes, get_status_by_code

print(get_status_by_code(200))
print(get_status_by_code(401))
print(get_status_codes())
```
```
$ 200 OK
$ 401 Unauthorized
$ {
$   100: "100 Continue",
$   101: "101 Switching Protocols",
$   103: "103 Early Hints",
$   ...
$ }
```
## License

[MIT](LICENSE)
rollingrank 0.3.1
fast rolling rank for numpy
License: MIT

## rollingrank

rollingrank is a fast implementation of rolling rank transformation (described as the following code).

```python
import pandas as pd

# x is numpy array
def rollingrank(x, window=None):
    def to_rank(x):
        # result[i] is the rank of x[i] in x
        return np.sum(np.less(x, x[-1]))
    return pd.Series(x).rolling(window).apply(to_rank).values
```

## Motivation

Rolling rank is a good tool to create features for time series prediction.
However, rolling rank was not easy to use in python.
There were no exact methods to do it.
The simple implementation using pandas and numpy is too slow.

## Performance

|Implementation|Complexity|
|:-:|:-:|
|rollingrank|O(n * log(w))|
|pandas rolling + numpy|O(n * w)|

n: input length
w: rolling window size

## Install

```bash
pip install rollingrank
```

## Example

```python
import numpy as np
import rollingrank

x = np.array([0.1, 0.2, 0.3, 0.25, 0.1, 0.2, 0.3])
y = rollingrank.rollingrank(x, window=3)
print(y)
# [nan nan  2.  1.  0.  1.  2.]

y = rollingrank.rollingrank(x, window=3, pct=True)
print(y)
# [nan nan 1.  0.5 0.  0.5 1. ]
```

## rci

RCI is also implemented because fast implementation is not found.

https://docs.anychart.com/Stock_Charts/Technical_Indicators/Mathematical_Description#rank_correlation_index

## Kaggle Example

https://www.kaggle.com/bakuage/rollingrank-example

## Development

test

```bash
python -m unittest discover tests
```

build/upload

```bash
python setup.py sdist
twine upload --repository pypitest dist/*
twine upload --repository pypi dist/*
```

## TODO

- support axis