semvec/pypi-packages huggingface dataset:
covid-modeling 0.1.1
COVID-19 Modeling
License: MIT

# COMODELS

Models for COVID - 19

For documentation, see the docstrings!
Much more to come. For help:

```python
import comodels
help(comodels)
help(comodels.PennDeath)
help(comodels.Penn)
```

## Penn Death model

```python
# import the penn model
import matplotlib.pyplot as plt
from comodels import PennDeath

help(PennDeath)
tx = PennDeath(N = 28304596, I = 223, R = 0, D = 3, D_today = 2)

help(PennDeath.sir)

def plot_penn(Pdp: PennDeath, n_days: int) -> None:
    # predict the coming storm and plot it
    curve, admissions = Pdp.sir(n_days)
    fig, ax = plt.subplots(1,3, figsize=(15,5))
    for k, v in curve.items():
        if k not in Pdp.rates.keys() :
            ax[0].plot(v, label=k)
            ax[0].legend()
        else:
            ax[1].plot(v, label=k)
            ax[1].legend()
    ax[1].set_title('Hospital Resource Usage')
    ax[0].set_title('SIR curve')
    for k, v in admissions.items():
        ax[2].plot(v, label = k)
        ax[2].legend()
    ax[2].set_title('Additional Resource Usage by day')
    fig.suptitle(f"No social distancing, total deaths = {int(max(curve['dead']))}")
    plt.show()


plot_penn(tx, 120)
print(curve.keys())
print(occupancy.keys())
```
drf-yasg-examples 0.1.1
Inspector for add example in drf-yasg docs
License: MIT
Requires Python: >=3.6.1,<4.0.0

drf-yasg-examples
-----------------

Add example value on your swagger documentation!


Requirements
============

1. Python 3.6.1 or higher
2. drf-yasg based code base


Install
=======

With pip
++++++++

.. code-block:: sh

   pip install drf-yasg-examples


With Poetry
+++++++++++

.. code-block:: sh

   poetry add drf-yasg-examples


Configuration
=============

Edit your django config file.

.. code-block:: py

   SWAGGER_SETTINGS = {
       'DEFAULT_AUTO_SCHEMA_CLASS': 'drf_yasg_examples.SwaggerAutoSchema',
   }

Note: If you use ``SwaggerAutoSchema`` class other codes, replace them together


Usage
=====

ChoiceField
+++++++++++

Just write verbose text like this in your models.

.. code-block:: py

   class Product(models.Model):

       CATEGORY = [
           ('F', 'Food'),
           ('L', 'Living Item'),
       ]

       category = models.CharField(
           verbose_name='Category',
           max_length=1,
           choices=CATEGORY,
       )


And ModelSerializer might set this field as ChoiceField, and this package
write down enum k-v list on your documentation automatically.


Others
++++++

Write example value in your serializer class like this.

.. code-block:: py

   class ProductSerializer(serializers.ModelSerializer):

       class Meta:
           model = Product
           fields = '__all__'
           example = {
               'name': 'Apple',
               'amount': 6,
               'price': '10.00',
           }


Then drf-yasg will add example on your docs automatically.


LICENSE
=======

MIT
cimren-wkmeans-geo 1.3.4
Weighted KMeans Clustering for Geolocational Problem
License: MIT

Weighted KMeans Clustering for Geolocational Problem
====================================================

Repo for weighted k means clustering for specifically geo locational problems. 

For an example and mathematical explanation:

https://emrahcimren.github.io/data%20science/Greenfield-Analysis-with-Weighted-Clustering/

Prerequisites
-------------

Install environment.yml for prerequisites.

```
conda env create -f environment.yml
```

To recreate environment.yml

```
conda env export > environment.yml
```

To create requirements.txt from environment.yml

```
pip freeze > requirements.txt
```

Installation
------------

```
pip install cimren-wkmeans-geo
```

Inputs
------

*input_locations* is a pandas dataframe with the following format.

LOCATION_NAME | LATITUDE | LONGITUDE | WEIGHT | VOLUME |
--- | --- | --- | --- | --- 
LOC 0 | -27.0065 | 170.583 | 1 | 10

*number_of_clusters*: Number of clusters to be created

*minimum_elements_in_a_cluster*: Minimum elements in a cluster

*maximum_elements_in_a_cluster*: Maximum elements in a cluster

*maximum_volume_in_a_cluster*: Maximum volume that can fit in a cluster; if set to None, then it is disabled

*maximum_iteration*: How many maximum number of steps the algorithm takes to stop if it does not find the solution

*enable_minimum_maximum_elements_in_a_cluster*: True/False to enable minimum and maximum cluster size

*objective_range*: Acceptable difference between objectives at each iteration

Data
----
Package has a sample data set

```
from wkmeans_geo.src import data
data.locations_test
data.number_of_clusters
data.minimum_elements_in_a_cluster
data.maximum_elements_in_a_cluster
data.maximum_volume_in_a_cluster
data.maximum_iteration
data.enable_minimum_maximum_elements_in_a_cluster
data.objective_range
```

How to use
----------

```
from wkmeans_geo.src import data
from wkmeans_geo import wkmeans_clustering as wkc
clusters, locations_with_clusters = wkc.calculate_clusters(
                                       data.locations_test,
                                       data.number_of_clusters,
                                       data.minimum_elements_in_a_cluster,
                                       data.maximum_elements_in_a_cluster,
                                       data.maximum_volume_in_a_cluster,
                                       data.maximum_iteration,
                                       data.objective_range,
                                       data.enable_minimum_maximum_elements_in_a_cluster)
```