semvec/pypi-packages huggingface dataset:
vanilla-transformer-jax 0.0.4b0
JAX/Flax implimentation of 'Attention is All You Need' by Vaswani et al.
Requires Python: >=3.6
Keywords: transformer,JAX,Flax,Deep-Learning

# Vanilla Transformer
[![PyPI version](https://badge.fury.io/py/vanilla-transformer-jax.svg)](https://badge.fury.io/py/vanilla-transformer-jax)


JAX/Flax implimentation of 'Attention Is All You Need' by Vaswani et al. (https://arxiv.org/abs/1706.03762)  


## Installation

Use the package manager [pip](https://pip.pypa.io/en/stable/) to install the package in the following way:

```bash
pip install vanilla-transformer-jax
```

## Usage

To use the entire Transformer model (encoder and decoder), you can use the following way:

```python
from jax import random
from vtransformer import Transformer # imports Transformer class

model = Transformer() # model hyperparameters can be tuned, otherwise defualts mentioned in paper shall be used

prng = random.PRNGKey(42)

example_input_src = jax.random.randint(prng, (3,4), minval=0, maxval=10000)
example_input_trg = jax.random.randint(prng, (3,5), minval=0, maxval=10000)
mask = jax.array([1, 1, 1, 0, 0])

init = model.init(prng, example_input_src, example_input_trg, mask) #initializing the params of model

output = model.apply(init, example_input_src, example_input_trg, mask) # getting output
```

To use Encoder and Decoder seperately, you can do so in the following way:

```python
encoding = model.encoder(init, example_input_src)  #using only the encoder
decoding = model.decoder(init, example_input_trg, encoding, mask) #using only the decoder
```


## Contributing

This library is not perfect and can be improved in quite a few factors. 

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.


## License
[MIT](https://choosealicense.com/licenses/mit/)
matplotlib-latex-bridge 0.2.0
Functions and shortcuts to create latex-ready images from matplotlib
Requires Python: >=2.7

# matplotlib-latex-bridge

[![Documentation Status](https://readthedocs.org/projects/matplotlib-latex-bridge/badge/?version=latest)](https://matplotlib-latex-bridge.readthedocs.io/en/latest/?badge=latest)

This library provides a set of functions and shortcuts to create latex-ready images with matplotlib.

This library is not a replacement for matplotlib, it can just be used to set sensible settings in order to have figures with readable text and with a font size that is consistent both among various figures and with the rest of the text in the document.

Example:

![example](https://github.com/loreucci/matplotlib-latex-bridge/raw/master/mlb-example.png)


## Install

The latest stable version can be installed via pip:

```commandline
pip install matplotlib-latex-bridge
```

Otherwise, the library can be installed from sources:

```commandline
git clone https://github.com/loreucci/matplotlib-latex-bridge.git
cd matplotlib-latex-bridge
pip install -e .
```

## Quickstart

Initialize the library using one of the presets provided:

```python
import matplotlib_latex_bridge as mlb

mlb.setup_page(**mlb.formats.article_letterpaper_10pt_singlecolumn)
```
Create a new figure and use it as normal:
```python
mlb.figure_textwidth()  # for full page images
mlb.figure_columnwidth()  # for full column images

plt.plot(...)  # use matplotlib as normal

fig.savefig("image.png")
```
Include it in the latex file without scaling:
```latex
\begin{figure}
    \centering
    \includegraphics[scale=1]{image.png}
\end{figure}
```
That's it!

For more options please refer to the [online documentation](https://matplotlib-latex-bridge.readthedocs.io).
oauth2token 0.0.3
Oauth2 token management for cli applications
Requires Python: >=3.6

###############
# Oauth2token #
###############

Simple cli tools to create and use oauth2token


Configuration
-----------------------

You need to create :code:`config.json` and :code:`scopes.json` at
:code:`$XDG_CONFIG_HOME/oauth2token/<provider>/` for each provider you want
to use.

:code:`config.json`
~~~~~~~~~~~~~~~~~~~~

The main configuration file.
Follow the format on client_secret.json_, using your own information obtained
from your provider.

.. _client_secret.json: https://github.com/googleapis/google-api-python-client/blob/master/docs/client-secrets.md

Example (Just change the :code:`client_id` and :code:`client_secret` values to
the ones you got from Google):

.. code-block:: json

    {
        "web": {
            "client_id": "asdfjasdljfasdkjf",
            "client_secret": "1912308409123890",
            "auth_uri": "https://accounts.google.com/o/oauth2/auth",
            "token_uri": "https://accounts.google.com/o/oauth2/token"
        }
    }

:code:`scopes.json`
~~~~~~~~~~~~~~~~~~~~

The scope your application needs. It's a json array containing the URLs.

Example :

.. code-block:: json

    ["https://mail.google.com/"]


Usage
-----


:code:`oauth2create` <provider> <account>

Obtain and store credentials for the account in
:code:`$XDG_DATA_HOME/oauth2token/<provider>/<account>`, using the configuration
for that provider. It opens a browser where you'll need to log in the account
you want to use.

:code:`oauth2get` <provider> <account>

Output the access token for that account, refreshing it if needed with the
associated refresh token.