semvec/pypi-packages huggingface dataset:
App-pkg-ElladanGE 0.0.1
COVID-19 Alarm Clock
Requires Python: >=3.6

# Covid-19 Alarm Clock


## Introduction

The purpose of this project was to create a dynamic alarm clock which can provide regular updates on covid-19 cases, the news and the weather.
Users can choose to submit alarm clocks with options to include top news stories and/or local weather and will always provide a local covid-19 update. These alarm clocks will use vocal announcements. Additionnaly, text based notifications will be updated regularly providing covid-19, news and weather updates.

## Prerequisites
This project was written in Python 3. The user will need a working Python 3 interpreter.

## Installation

You can dowload the package from Github using:
```sh
$ git clone https://github.com/ElladanGE
$ cd COVID_AlarmClock
```

Additionnal packages required:
  - pyttsx3
  - flask
  - requests
  - json
  - uk-covid19
  - sched
  - time
  - logging

If you do not have these packages pre-installed, you can download them using:
```sh
$ pip install <package name>
```

## Getting started

First you will have to create your config file which must have the name:
```sh
config_file.json
```
Inside this file you must use this structure:
```sh
{
    "API_keys": {
      "news" : "<your news API key here>",
      "weather" : "<your weather API key here>"
    },
    "Location": {
      "my-city" : "<city name>",
      "country" : "gb"
    },
    "News-sources": {
      "my-sources": ["<source1", ..., "<sourceN>"]
    },
    "Notif_period": {
      "time": "<notification update time in seconds>"
    }
}
```
Once you have done this, save it in \COVID_AlarmClock.

Voila, the program is now ready to run.
To run the program, in \COVID_AlarmClock\App> simply type:
```sh
python main.py
```

### Usage
You can now go to:
```sh
http://127.0.0.1:5000/
```
To access the alarm clock.

To set alarm, select a date and time, select if you want to include news and/or weather, add a label and press submit.
The name of your alarm clock, when it is set and it's content should now appear on the left.
On the right hand side, you will see 3 notification boxes. One for COVID update, one for news and one for weather. These notifications will regurlaly be updated depending on what delay you put in the config file. The news stories will be the top news articles from the sources you provided and the weather will be the local weather from the city you provided.



## Testing
To run the test, in the root directory, simply type:
```sh
$ pytest testing.py
```
## Developper documentation

## Details
### Author
- **Duncan Watson**

### Link to source

[Link to Github](https://github.com/ElladanGE)

### Licence

This project is licensed under the MIT Licence - see the [license.md](license.md) for details.

### Acknowledgements
I would like to thank Dr. Matt Collison and all the TA's for their help during the developpement of this project.
hadar 0.5.0
python adequacy library
Requires Python: >=3.6

# Hadar
[![PyPI](https://img.shields.io/pypi/v/hadar)](https://pypi.org/project/hadar/)
[![GitHub Workflow Status (branch)](https://img.shields.io/github/workflow/status/hadar-simulator/hadar/main/master)](https://github.com/hadar-simulator/hadar/action)
[![https://sonarcloud.io/dashboard?id=hadar-solver_hadar](https://sonarcloud.io/api/project_badges/measure?project=hadar-solver_hadar&metric=alert_status)](https://sonarcloud.io/dashboard?id=hadar-solver_hadar)
[![https://sonarcloud.io/dashboard?id=hadar-solver_hadar](https://sonarcloud.io/api/project_badges/measure?project=hadar-solver_hadar&metric=coverage)](https://sonarcloud.io/dashboard?id=hadar-solver_hadar)
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/hadar-simulator/hadar/master?filepath=examples)
[![website](https://img.shields.io/badge/website-hadar--simulator.org-blue)](https://www.hadar-simulator.org/)
[![GitHub](https://img.shields.io/github/license/hadar-simulator/hadar)](https://github.com/hadar-simulator/hadar/blob/master/LICENSE)


Hadar is a adequacy python library for deterministic and stochastic computation

## Adequacy problem
### Basic

Each kind of network has a needs of adequacy. On one side, some network nodes need to consume
items such as watt, litter, package. And other side, some network nodes produce items.
Applying adequacy on network, is tring to find the best available exchanges to avoid any lack at the best cost.

For example, a electric grid can have some nodes wich produce too more power and some nodes which produce not enough power.

![adequacy](examples/Get%20Started/figure.png)


### Complexity comes soon
Above example is simple, but problem become very tricky with 10, 20 or 500 nodes !

Moreover all have a price ! Node can have many type of production, and each kind of production has its unit cost. Node can have also many consumptions with specific unavailability cost. Links between node have also max capacity and cost.

Network adequacy is not simple.

## Hadar
Hadar computes adequacy from simple to complex network. For example, to compute above network, just few lines need:

``` python
import hadar as hd

study = hd.Study(horizon=3)\
    .network()\
        .node('a')\
            .consumption(cost=10 ** 6, quantity=[20, 20, 20], name='load')\
            .production(cost=10, quantity=[30, 20, 10], name='prod')\
        .node('b')\
            .consumption(cost=10 ** 6, quantity=[20, 20, 20], name='load')\
            .production(cost=10, quantity=[10, 20, 30], name='prod')\
        .link(src='a', dest='b', quantity=[10, 10, 10], cost=2)\
        .link(src='b', dest='a', quantity=[10, 10, 10], cost=2)\
    .build()

optimizer = hd.LPOptimizer()
res = optimizer.solve(study)
```

And few more lines to display graphics results.

```python
plot = hd.HTMLPlotting(agg=hd.ResultAnalyzer(study, res),
                       node_coord={'a': [2.33, 48.86], 'b': [4.38, 50.83]})
plot.network().node('a').stack()
plot.network().map(t=0, zoom=2.5)
```

Get more information and examples at [https://www.hadar-simulator.org/](https://www.hadar-simulator.org/)