semvec/pypi-packages huggingface dataset:
torch-position-embedding 0.8.0
Position embedding implemented in PyTorch
License: MIT

# PyTorch Position Embedding

[![Travis](https://travis-ci.org/CyberZHG/torch-position-embedding.svg)](https://travis-ci.org/CyberZHG/torch-position-embedding)
[![Coverage](https://coveralls.io/repos/github/CyberZHG/torch-position-embedding/badge.svg?branch=master)](https://coveralls.io/github/CyberZHG/torch-position-embedding)

## Install

```bash
pip install torch-position-embedding
```

## Usage

```python
from torch_position_embedding import PositionEmbedding

PositionEmbedding(num_embeddings=5, embedding_dim=10, mode=PositionEmbedding.MODE_ADD)
```

Modes:

* `MODE_EXPAND`: negative indices could be used to represent relative positions.
* `MODE_ADD`: add position embedding to the original tensor.
* `MODE_CAT`: concatenate position embedding to the original tensor.
ordir 1.0.1
Print __dir__ in a readable format
License: MIT

# ordir

A utility to print __dir__() in a readable format.

## Usage

```python
>>> from ordir import ordir
>>> import requests

>>> page = requests.get("https://cnn.com")

>>> ordir(page)
__attrs__
__bool__
__class__
__delattr__
__dict__
__dir__
__doc__
__enter__
__eq__
__exit__
__format__
__ge__
__getattribute__
__getstate__
__gt__
__hash__
__init__
__init_subclass__
__iter__
__le__
__lt__
__module__
__ne__
__new__
__nonzero__
__reduce__
__reduce_ex__
__repr__
__setattr__
__setstate__
__sizeof__
__str__
__subclasshook__
__weakref__
_content
_content_consumed
_next
apparent_encoding
close
connection
content
cookies
elapsed
encoding
headers
history
is_permanent_redirect
is_redirect
iter_content
iter_lines
json
links
next
ok
raise_for_status
raw
reason
request
status_code
text
url

```

https://stackoverflow.com/a/19703412