semvec/pypi-packages huggingface dataset:
sports-news-collector 0.1
Provide services by collecting various sports news
Requires Python: >=3

# Sports-News-Collector
---
- Sports-News-Collector collects sports news and offers several services.  
- It is provided using various models provided by [Pororo](https://github.com/kakaobrain/pororo).



## Installation
---
`pip install sports_news_collector`

## Usage
---
- After the import, you can check the events currently supported by the `sports_news_collector` through the following commands
```python
>>> from sports_news_collector import SportsNewsCollector
>>> SportsNewsCollector.available_events()
['kbaseball', 'wbaseball', 'kfootball', 'wfootball', 'basketball', 'volleyball', 'golf', 'general', 'esports']
```  
- If you want to collect news from a specific event, you can put the event name in the `event` argument   
```python
>>> from sports_news_collector import SportsNewsCollector
>>> collector = SportsNewsCollector(event='wfootball')
```  
- After creating the object, you can use it like this:
```python
>>> collector.collect()
```   

- Then, it is sent to your e-mail through the following procedure.
-- 1.  Collect the news of the sport you have chosen.
-- 2.  Summarize the news and analyze the sentiment of the news.
-- 3.  Send them to your email periodically
  
- Please click [here] for details.

## License
```
Copyright 2021 Sangchun Ha.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
```
argupy 0.0.3
Easy-to-use argument manager for Python3.
Requires Python: >=3.6

# argupy
Easy-to-use argument manager for Python3.

## Instalation
To install argupy, run
``` bash
pip3 install argupy
```

## Usage
To use it in a Python script, first you need to import it.
``` python
from argupy import *
```

Then, initialize the `Args` class
``` python
argupy = Args()
```
and define any parameters you'll want to use later on.
``` python
argupy.setarg('--testarg', BOOL)
```
You can optionally pass a list of parameters to `Args()`, but if you don't, it defaults to `sys.argv`. The first item will be ignored.

The `setarg` function takes these parameters:
* **name**: the parameter name, for example, '--test'.
* **type_**: the parameter type, pass a constant like `BOOL`, `STR`, `INT`, or `FLOAT`. Note the underscore to prevent conflicts with the built-in `type()` function.
* **default_value**: *optional*. The default value to return if the argument is not present. Defaults to `False` if the argument is of type `BOOL`.
* **short**: *optional*. The short name for the argument, usually one letter. For example, long: `--help`, short: `-h`.

To use short names, do it like this:
``` python
argupy.setarg('--testarg', BOOL, short='-t')
```

To define an argument which takes a value, use the types `STR`, `INT` or `FLOAT`. Then retreive it with the `Args.arg()` method.
``` python
argupy.setarg('--testarg', STR)

value = argupy.arg('--testarg')

print(type(value), value)
# Running this code like this: 
# python3 file.py --testarg hello
# would output: <class 'str'> hello
```

If the argument type is set to `STR`, the returned value will be of type `str`. And again, if the argument is of type `INT` or `FLOAT`, the returned value will be of type `int` or `float`, so you don't have to pass it through `int()` or `float()`. Unless the argument is not present and the default value you specify is not of the corresponding type.
To pass `STR` values with spaces, put double-quotes around them, like this:
``` bash
python3 file.py --testarg "Chicago, Los Angeles"
```

Also, for debugging purposes, if you print an argument like this
``` python
print(argupy.args['--testarg'])
```
the output will be something like:
``` bash
Arg(name='--testarg', type_='boolean', default_value=False)
```
or
``` bash
Arg(name='--testarg', type_='boolean', default_value=False, link=True, target='--anotherarg')
```
or
``` bash
Arg(name='--testarg', type_='boolean', default_value=False, links=['--anotherarg'])
```
config-wrapper 0.0.12
Simple wrapper for cofigparser
Requires Python: >=3.7

# Config wrapper

Simple package that wraps `configparser` module. It loads configuration file and keeps it in singleton object. 

Main requirements are:
* have type hints in IDE (like PyCharm)
* easy to add new sections and fields
* automatic type casting based on on dataclass attribute type

Currently only following field types are supported: `str`, `bool`, `ini`, `float`, `list`.


## Simple example
Preparing config manager:
```
# define config section templates
from dataclasses import dataclass

@dataclass
class ExampleSection1:
    field_1: str
    field_2: int

@dataclass
class ExampleSection2:
    field_1: bool
    field_2: float
    field_3: list

# prepare config manager
from config_wrapper import ConfigManager

class AppConfig(ConfigManager):
    section_1: ExampleSection1
    section_2: ExampleSection2
``` 

Prepare `config.ini` file:

```
[section_1]
field_1 = value 123
field_2 = 42

[section_2]
field_1 = no
field_2 = 3.14
field_3 = item1;item2;item3
```

Load configuration & access to values loaded from `config.ini` file:
```
AppConfig.load('config.ini', list_sep=';')

print(AppConfig.section_1.field_1)
# value 123

print(AppConfig.section_2.field_1)
# False

print(AppConfig.section_2.field_3)
# ['item1', 'item2', 'item3']
```

## Config section template
Config section template is simple dataclass. It's attributes represents fields in configuration in section.  

To point type of field one must pass type hint to dataclass attribute (e.g. `field_name: int`).

Section example:
```
from dataclasses import dataclass

@dataclass
class MySection:
    field_1: str  # name of field in config file
    field_2: int    
``` 

Attention! Default values of attributes are ignored and overwritten by values from configuration file!

## Passing sections to config manager
Having config sections class one can create class that inherits from `ConfigManager` class and add class attribute of section template type.
This attribute name is associated with section name from configuration file.

Simple example:
```
from dataclasses import dataclass

from config_wrapper import ConfigManager

@dataclass
class MySection:
    field_1: str  # name of field in config file
    field_2: int


class AppConfig(ConfigManager):
    my_section_name: MySection    
```

Above example corresponds to following configuration structure:

```
[my_section_name]
field_1 =
field_2 =
```

## TODO

1. Add unit tests for generating raw config file from ConfigManager.
1. Generating config file from ConfigManager using default values from template sections.
1. While generating config file if file exist and field has value it will be copied to newly generated file.
1. Maybe support for JSON and YAML files.
1. Maybe support for more types.
mosaik-schedule-flocker.schedule-flocker 0.1.0rc20210331153201
Generate flocks of schedules from parameters.

# mosaik.Schedule-Flocker

Create flocks of schedules for electricity units described by a set of
parameters. These  example schedules can capture the flexibility of a 
model electricity unit.

## Status

[![pipeline status](https://gitlab.com/offis.energy/mosaik/mosaik.flocker/badges/master/pipeline.svg)](https://gitlab.com/offis.energy/mosaik/mosaik.flocker/pipelines)
[![coverage report](https://gitlab.com/offis.energy/mosaik/mosaik.flocker/badges/master/coverage.svg)](https://gitlab.com/offis.energy/mosaik/mosaik.flocker/-/jobs)

##  Compatibility

This mosaik component uses the stack of SemVer forks instead of the upstream 
versions of SimPy, mosaik, and its API components.

##  Installing system-level prerequisites

-   Python >= 3.7

##  Creating the virtual environment

    python3.8 -m venv venv

##  Installing venv-level requirements

    venv/bin/python -m pip install -r requirements.d/venv.txt

##  Setting up the runtime environment

    venv/bin/python -m tox -e py38 --notest

##  Executing the tests

    venv/bin/python -m tox -e py38

##  Upgrading the requirements

    venv/bin/python -m pur -r requirements.d/venv.txt

    venv/bin/python -m pur -r requirements.d/base.txt

## Freezing the requirements

    venv/bin/python -m pip freeze --all --exclude-editable | \
        grep -v "pkg-resources" > requirements.d/venv.txt

    .tox/py38/bin/python -m pip freeze --all --exclude-editable | \
        grep -v "pkg-resources" > requirements.d/base.txt
mosaik-schedule-flocker.flocker 1.2.1
Generate flocks of schedules from parameters.

# mosaik.Schedule-Flocker

Create flocks of schedules for electricity units described by a set of
parameters. These  example schedules can capture the flexibility of a 
model electricity unit.

## Status

[![pipeline status](https://gitlab.com/offis.energy/mosaik/mosaik.flocker/badges/master/pipeline.svg)](https://gitlab.com/offis.energy/mosaik/mosaik.flocker/pipelines)
[![coverage report](https://gitlab.com/offis.energy/mosaik/mosaik.flocker/badges/master/coverage.svg)](https://gitlab.com/offis.energy/mosaik/mosaik.flocker/-/jobs)

##  Compatibility

This mosaik component uses the stack of SemVer forks instead of the upstream 
versions of SimPy, mosaik, and its API components.

##  Installing system-level prerequisites

-   Python >= 3.7

##  Creating the virtual environment

    python3.8 -m venv venv

##  Installing venv-level requirements

    venv/bin/python -m pip install -r requirements.d/venv.txt

##  Setting up the runtime environment

    venv/bin/python -m tox -e py38 --notest

##  Executing the tests

    venv/bin/python -m tox -e py38

##  Upgrading the requirements

    venv/bin/python -m pur -r requirements.d/venv.txt

    venv/bin/python -m pur -r requirements.d/base.txt

## Freezing the requirements

    venv/bin/python -m pip freeze --all --exclude-editable | \
        grep -v "pkg-resources" > requirements.d/venv.txt

    .tox/py38/bin/python -m pip freeze --all --exclude-editable | \
        grep -v "pkg-resources" > requirements.d/base.txt