semvec/pypi-packages huggingface dataset:
django-logging-middleware 0.1.2
A small package to log django requests and responses
Requires Python: >=3.6

# Django Logging Middleware

The extension for [django](https://github.com/django/django) to log requests and responses using [loguru](https://github.com/Delgan/loguru).

Sometimes code in django views becomes messy because we log requests and response. Also it takes a lot of time to write logs in every view. Using this extension for django, logging becomes simple: all you need is five minutes of installing this package and setting configuration!


## Requirements
* python >=3.6
* django >=3.0
* django rest framework >= 3.10 (optional)

## Installation

1. Install using `pip`...

   ```pip install django-logging-middleware```

2. Add `'logging_middleware'` to your `INSTALLED_APPS` setting.

    ```
    INSTALLED_APPS = [ 
        ... 
        'logging_middleware'
    ]
    ```

4. Add setting in your `settings.py`:

    ```
    DJANGO_LOGGING_MIDDLEWARE = {
        'DEFAULT_FORMAT': False,
        'MESSAGE_FORMAT': "<b><green>{time}</green> <cyan>{message}</cyan></b>"
    }
    ```

5. Add `'logging_middleware.middlewares.DjangoLoggingMiddleware'` to your `MIDDLEWARE` setting.

    ```
    MIDDLEWARE = {
        ...
        'logging_middleware.middlewares.DjangoLoggingMiddleware'
    }
    ```

**Note `'logging_middleware.middlewares.DjangoLoggingMiddleware'` should be last in the list `MIDDLEWARE`**

You are ready to see log messages like ones below!
```
...
2021-01-08T23:39:33.597138 Request URL: http://localhost:8000/restframework/simple/class/with_query_string/?data=data
2021-01-08T23:39:33.597530 Request METHOD: PUT
2021-01-08T23:39:33.597874 Request HEADERS: {'Cookie': '', 'Content-Length': '26', 'Content-Type': 'application/json'}
...
```

## Configuration
If you missed 4th step in [installation](#installation), default settings would be:
```
DJANGO_LOGGING_MIDDLEWARE = {
    'DEFAULT_FORMAT': True,
    'MESSAGE_FORMAT': "<b><green>{time}</green> <cyan>{message}</cyan></b>"
}
```

### Settings
**`'DEFAULT_FORMAT'`**

`'DEFAULT_FORMAT'` by default is `True`. It means middleware will use default string format for log messages. By setting it to `False`, you should provide in `'MESSAGE_FORMAT'` your own string format.

**`'MESSAGE_FORMAT'`**

`'MESSAGE_FORMAT'` sets the format of log messages. By default is `'<b><green>{time}</green> <cyan>{message}</cyan></b>'`. For making your own format string, please look the [loguru docs](https://loguru.readthedocs.io/en/stable/api/logger.html#color). Note if you set `'DEFAULT_FORMAT'` as `True`, but also set custom string format in `'MESSAGE_FORMAT'`, the log messages will take the default format. Also by setting `'DEFAULT_FORMAT'` as False without providing the `'MESSAGE_FORMAT'`, the format of messages will be default.

## License
MIT-License, see LICENSE file.
wasm-fpga-uart 0.0.0a5
WebAssembly FPGA Uart

# WebAssembly FPGA Uart

This repository implements a UART interface used by the WebAssembly FPGA.

## Documentation

Documentation is available from [wasm-fpga.readthedocs.io].

[wasm-fpga.readthedocs.io]: https://wasm-fpga.readthedocs.io/en/latest/

## Get in touch

- Report bugs, suggest features or view the source code [on GitHub].
- For contributions refer to [the contributors guide].

[on GitHub]: https://github.com/denisvasilik/wasm-fpga

## Continuous Integration (CI)

This repository contains a `.travis.yml` and a `ci` folder which both are used
for CI.

### Pre-Commit Hooks

This repository provides `pre-commit` and `pre-push` hooks. They are installed
using the following commands:

```console
~$ pre-commit install -t pre-commit
~$ pre-commit install -t pre-push
```

The following command runs the hooks and checks all files.

```console
~$ pre-commit run --all-files --hook-stage push
```

# License

Licensed under the MIT license ([LICENSE-MIT] or http://opensource.org/licenses/MIT).

[the contributors guide]: CONTRIBUTING.md
[LICENSE-MIT]: LICENSE.rst
DeepQ 0.0.3
A small lib to make reinforcement learning easyer
Requires Python: >=3.6

[![made-with-python](https://img.shields.io/badge/Made%20with-Python-1f425f.svg)](https://www.python.org/)
[![Generic badge](https://img.shields.io/badge/using-DeepQ-a83432.svg)](https://pypi.org/project/DeepQ/)
## DeepQ
A reinforcement learning library in Python.

This is a basic reinforcement learning library that works with **gym** and **tensorflow**. It uses a reinforcement learning
approach to machine learning. This is where the program is rewarded if it does the correct thing and if it does the wrong thing
it's punished

To install with [pip] do `pip install DeepQ`
. The other dependencies you need are **tensorflow** and **numpy**

### Example
<p align="center">
    <img src="https://i.ibb.co/HHd2WNZ/ezgif-com-gif-maker.gif" width=200 alt="video" border="0">
</p>

The [example.py] this uses gym (which is a aim training lib), for this example i am using the environment 'LunarLander-v2' which simulates landing a 
spacecraft on the moon. We then give control to the AI that uses DeepQ's Agent(the spacecraft) which then learns to land it!:

```PY
from DeepQ import Agent
import numpy as np
import gym
import tensorflow as tf
import matplotlib.pyplot as plt

if __name__ == '__main__':
    tf.compat.v1.disable_eager_execution()
    env = gym.make('LunarLander-v2')  # loads the lunar lander trainer from gym
    learning_rate = 0.001
    n_games = 500  # this is the number of games to loops through
    agent = Agent(gamma=0.99, epsilon=1.0, lr=learning_rate,
                  input_dims=env.observation_space.shape, n_actions=env.action_space.n, mem_size=1000000,
                  batch_size=64, epsilon_end=0.01)
    scores = []
    epsilon_history = []

    for i in range(n_games):
        done = False
        score = 0
        observation = env.reset()
        while not done:
            action = agent.choose_action(observation)
            observation_, reward, done, info = env.step(action)
            score += reward
            agent.store_transition(observation, action, reward, observation_, done)
            observation = observation_
            agent.learn()
        epsilon_history.append(agent.epsilon)
        scores.append(score)
        avg_score = np.mean(scores[-100:])
        print("Episode:", i, " Score %.2f" % score,
              "Average score %.2f" % avg_score,
              "epsilon %.2f" % agent.epsilon)

    plt.plot(scores)
    plt.title("A graph of the score increase over each episode of learning 'LunarLander-v2'")
    plt.ylabel("score")
    plt.xlabel("Episode")
    plt.show()  # plots the scores
```

[pip]:https://pypi.org/project/DeepQ/
[example.py]:https://github.com/Madmegsox1/DeepQ/blob/main/example.py

## Documentation

The documentation [_**link**_]:



##### For more info Dm on Discord **Madmeg#4882**


[_**link**_]:https://github.com/Madmegsox1/DeepQ/blob/main/docs/agent.md