semvec/pypi-packages huggingface dataset:
trainmote-module-felix-nievelstein-de 0.5.32
Application to create a web server to control a model train environment
Requires Python: >=3, <4

# TRAINMOTE SERVER #


## Install Trainmote server ##

First to install the Trainmote Module open the terminal and perform:

```
sudo pip3 install trainmote-module-felix-nievelstein-de
````
Next you have to activate I2C in your raspberry pi configurations. Herefore go to settings of your raspberry pi and select interfaces. Here activate the I2C interface.

Great you are now ready to start the trainmote server with:
```
sudo trainmote --autostart
````
If you use the option '--autostart' the trainmote server will start automatically on rasperry pi start.

# NOTE:
Project based on python3. Therefor you have to use pip3.
checkbox-parser 0.0.1
this package can parse a list and give a html string
Requires Python: >=3.6

# checkbox-parser
A python module that takes a list object and transforms it to a HTML fieldsets with a question and its answers as checkboxs that can be rendered in flask. The purpose is that the list that is consumed could reside in a noSQL database as a document(MongoDB, Firestore, DynamoDB)

# How it works?
first, you need a list in this structured way 

```
[
    {
        'id_question': 'first', 
        'question': 'What is the most important reason for choosing a gym?', 
        'answers': ['The price', 'That it has personalized attention', 'That it has the best facilities', 'That it has a very long schedule'], 
        'position': 1
    }, 
    
    {
        'id_question': 'third', 
        'question': 'What pay period is the best for you to go to a gym?', 
        'answers': ['Annual', 'Bimonthly', 'Monthly'], 
        'position': 3
    }, 
    
    {
        'id_question': 'second', 
        'question': 'What motivates you the most to join a gym?', 
        'answers': ['Physical appearance', 'Physical condition', 'Know another social circle'], 
        'position': 2
    }
        
]

```
Note:
* make sure that the id_question value does not repeat itself, this is was intended to map the question with the respectives anwsers

Then you just create a html_parser object. This object just needs the list for work
In order to get the html you can use the get_html method, this will return the html as string


```

from checkbox_parser import html_parser


...


parser = html_parser(data)
parser.get_html()
```

# Use with flask

This is a little snippet of how you can use it with flask

```
from flask import Flask, render_template
from checkbox_parser import html_parser


app=Flask(__name__)

@app.route("/")
def survey():

    data = [
    {
        'id_question': 'first', 
        'question': 'What is the most important reason for choosing a gym?', 
        'answers': ['The price', 'That it has personalized attention', 'That it has the best facilities', 'That it has a very long schedule'], 
        'position': 1
    }, 
    
    {
        'id_question': 'third', 
        'question': 'What pay period is the best for you to go to a gym?', 
        'answers': ['Annual', 'Bimonthly', 'Monthly'], 
        'position': 3
    }, 
    
    {
        'id_question': 'second', 
        'question': 'What motivates you the most to join a gym?', 
        'answers': ['Physical appearance', 'Physical condition', 'Know another social circle'], 
        'position': 2
    }
        
    ]

    parser = html_parser(data)
    html = parser.get_html()

    return render_template("your_html_template.html", html=html)

if __name__ == "__main__":
    app.run()
```
Note:
* I recommend that in your ninja template use the decode method for the html object, in case this prevents bad characters to be rendered.

```
    <form action="/endpoint_get" method="GET" name="myForm">

        {{ html.decode('utf-8') | safe }}

    <div class="container">
      <div class="center">
        <button id="submit">submit</button>
      </div>
    </div>

    </form>
```
enrichr 0.0.6
Security Enrichment Framework
Requires Python: >=3.6

# Enrichr Vision

Enrichr is a python framework which sets out to address the security integration problem that vendors and analysts have. While the core functionality of Enrichr is targeted towards security enrichment, plugins are not limited to just enrichment. For example, plugins can push data, dispatch reporting jobs, add indicators to blacklists or other functionality.

There are 3 primary audiences for Enrichr:

- Security analysts
- Data Providers
- Security Integrators

## Security Analysts

Enrichr has a robust command line interface that can be used in day to day workflows. Enrichr provides a consistent method of interacting with many different vendor enrichments and provides a common workflow.

Additionally, since the framework is written in python and has sane defaults, analysts can use enrichr to automate either via bash scripts or simple python scripts.

## Data Providers

If you are a security vendor or provide data products, you no dobut realize how hard it can be to maintain integrations with dozens or hundreds of other products. Enrichr aims to alleviate those issues by providing a sane, tested framework that system integrators such as SIEM, SOAR and MSSP Providers can interface with third party products via a common interface.

Additionally, enrichr plugins are extremely flexible, so it is possible to expose advanced features and use enrichr as the primary API client for your customers to interact with your service.

## Security Integrators

Enrichr provides a high quality, standardized interface to a number of different security products that are supported by the community. This provides a rich ecosystem that integrators such as SOAR vendors, SIEM products and MSSPs can immediately utilize, so they can focus on their core areas of expertise rather than having to constantly worry about integrations.

### Official Plugins

Official plugins have rigorous standards that ensure integrators have a supported interface when interacting with different security products. These standards require that each plugin include things like unit tests, documentation, examples, packaging and continuous integration.

### Community Plugins

Plugins that do not meet the standards or are maintained by third parties are considered community plugins. While they still have standards that they conform to, these plugins might be missing things like unit tests, examples or comprehensive documentation.

## Repository and Module Structure

Enrichr splits each plugin into its own python module and repository. The main reason for this is a practical one, if there are third party dependencies that are required for a module to be supported, for example a yara or fuzzy hashing library that need to have C dependencies, enrichr shouldn't pull those in by default. Additionally, each plugin should be pushed to the Python Package Index through CI.
gerel 0.0.6
Simple genetic algorithms library for reinforcement learning.
Requires Python: >=3.6

## GeReL

GeReL is a simple library for genetic algorithms applied to
reinforcement learning.

_NOTE_: GeReL is in development.

### Example:

The following uses [REINFORCE-ES](https://www.jmlr.org/papers/volume15/wierstra14a/wierstra14a.pdf) to solve openai
[cartpole environment](https://gym.openai.com/envs/CartPole-v1/)

```python
from gerel.genome.factories import dense
from gerel.algorithms.RES.population import RESPopulation
from gerel.algorithms.RES.mutator import RESMutator
from gerel.model.model import Model
import gym
import numpy as np
from gerel.populations.genome_seeders import curry_genome_seeder
from string import Template


def compute_fitness(genome):
    model = Model(genome)
    env = gym.make("CartPole-v0")
    state = env.reset()
    fitness = 0
    action_map = lambda a: 0 if a[0] <= 0 else 1  # noqa
    for _ in range(1000):
        action = model(state)
        action = action_map(action)
        state, reward, done, _ = env.step(action)
        fitness += reward
        if done:
            break

    return fitness


if __name__ == '__main__':
    genome = dense(
        input_size=4,
        output_size=1,
        layer_dims=[2, 2, 2]
    )

    weights_len = len(genome.edges) + len(genome.nodes)
    init_mu = np.random.uniform(-1, 1, weights_len)

    mutator = RESMutator(
        initial_mu=init_mu,
        std_dev=0.1,
        alpha=0.05
    )

    seeder = curry_genome_seeder(
        mutator=mutator,
        seed_genomes=[genome]
    )

    population = RESPopulation(
        population_size=50,
        genome_seeder=seeder
    )

    report_temp = Template('generation: $generation, mean: $mean, best: $best')
    for generation in range(100):
        for genome in population.genomes:
            genome.fitness = compute_fitness(genome.to_reduced_repr)
        population.speciate()
        data = population.to_dict()
        mutator(population)
        report = report_temp.substitute(
            generation=generation,
            mean=data['mean_fitness'],
            best=data['best_fitness'])
        print(report)
```

___

### Tests:

To run all unittests:

```shell
nosetests
```

___
accudata 1.0.1
Simple module to store data with arbitrary structure in dict or Pandas DataFrame
Requires Python: >=3.6

### Do you collect a heterogeneous data step by step?

Here you find a convinient solution of this problem.
class AccumulativeData provides a simple interface to store data step by step.
The data can be consisted of:
1. Numbers
2. Lists / arrays
3. Objects

You can store it as pickled object or Pandas Dataframe.

### Installation

The module can be installed from pip
```
pip install accudata
```

### For example

You have a social data collecting process. You must collect on every step heterogeneous data:
1. Name of a person
2. Age
3. Interests
4. Preferences by categories: food, pets, sport, politics

You can make a class:
```python
from accudata import AccumulativeData

class PeopleAccData(AccumulativeData):
	def __init__(self):
		lists = ['name', 'age', 'interests']
		dicts = {'pref': ['food', 'pets', 'sport', 'politics]}
		super().__init__(lists=lists, dicts=dicts)
```

After that you can make an iterative collecting process as follows:
```python
Data = PeopleAccData()
for item in raw_data:
	Data.next()
	# \\\ A complicated code to extract data
	name, age, interests, food, pets, sport, politics, _ = extract_data(item)
	Data.append(name, age, interests,
		    pref=[food, pets, sport, politics])
	
```

It is simple to get data:
```python
names = Data.name
# Make the dataframe
dataframe = Data.todf()
print(dataframe.name)
```
cowin-app-services 0.0.3
Python Library for CoWin API
Requires Python: >=3.6, <4
Keywords: cowin,covid,vaccine

# Cowin Tracker

Python API wrapper for CoWin, to help citizens register themselves for the vaccination drive by booking an appointment at the nearby vaccination centres

This wrapper is meant to enable folks to build their own versions of a system to lookup for vaccine availablity either
in a district or in a particular pin code.

# Install

`pip install taranvir-cowin-api-services`

# Usage

The wrapper currently covers four endpoints used by the CoWin portal specified below.

## Initialize

```python
from cowin_api import CoWinAPI

cowin = CoWinAPI()
```

## Get all the available states

Returns the list of states in which vaccine drive is being conducted. This also returns the `state_id` which would be
required in the subsequent requests.

```python
from cowin_api import CoWinAPI

cowin = CoWinAPI()
states = cowin.get_states()
print(states)
```

---
## Get all the available districts

Returns the list of districts in a particular states in which vaccine drive is being conducted. This also returns
the `district_id` which would be required in the subsequent requests.

In this method, you would need to pass the `state_id` retrieved from the previous method.

```python
from cowin_api import CoWinAPI

state_id = '<give state_id here>'
cowin = CoWinAPI()
districts = cowin.get_districts(state_id)
print(districts)

```

## Get all the centers available using the district_id

Use this method to lookup for centers based on a `district_id` or a list of `district_ids`. This method is broader than
searching by pin code as it covers the whole district.

In this method, you would need to pass the `district_id` retrieved from the previous methods. By default, the method
looks-up for slots with today's date. For any other dates pass the date in DD-MM-YYYY format.

```python
from cowin_api import CoWinAPI

district_id = '<give the district_id here>'
date = '<Give the date here>'  # Optional. Takes today's date by default
min_age_limit = 18  # Optional. By default returns centers without filtering by min_age_limit

cowin = CoWinAPI()
available_centers = cowin.get_availability_by_district(district_id, date, min_age_limit)
print(available_centers)
```

---

## Get all the available centers using a pin code

Use this method to lookup for centers based on a `pin_code` or a list of `pin_codes`. By default, the method looks-up
for slots with today's date. For any other dates pass the date in DD-MM-YYYY format.

```python
from cowin_api import CoWinAPI

pin_code = "<give pincode here>"
date = '<give date here>'  # Optional. Default value is today's date
min_age_limit = 18  # Optional. By default returns centers without filtering by min_age_limit

cowin = CoWinAPI()
available_centers = cowin.get_availability_by_pincode(pin_code, date, min_age_limit)
print(available_centers)
```

---
# Contributions

Contributions are always welcome!

Feel free to modify according to your requirement.

---

# License:

MIT License
get-datetime 0.1.0
get Simple time int and str
Requires Python: >=3.5

# get-datetime

get_datetime is a Python 3 Package, that returns you a time int or str.

# Install

Via pypi:
```
$ pip install get-datetime
```

Manuel:  
[Github Repo](https://github.com/JohannLULW/get_time)

# Documentation
## Info:
Time at the Documentation: 5 June 2021 20:27:14 (8 PM)
<hr>

## get year int:

Code:
```
from get_datetime import *

print(get_date_year())
``` 

Output:
```
$ python main.py
2021
```
<hr>

## get month int:

Code:
```
from get_datetime import *

print(get_date_month())
```

Output:
```
$ python main.py
6
```
<hr>

## get day int:

Code:
```
from get_datetime import *

print(get_date_day())
```

Output:
```
$ python main.py
5
```
<hr>

## get Day and month str:

Code:
```
from get_datetime import *

print(get_date_DM("."))
```

Output:
```
$ python main.py
5.6
```
<hr>

## get Day, Month and Year str:

Code:
```
from get_datetime import *

print(get_date_DMY("."))
```
You can write any string between the brackets.

Output:
```
$ python main.py
5.6.2021
```
<hr>

## get Month, Day and Year str:

Code:
```
from get_datetime import *

print(get_date_DMY("/"))
```
You can write any string between the brackets.

Output:
```
$ python main.py
6/5/2021
```
<hr>

## get hour int:

Code:
```
from get_datetime import *

print(get_time_hour())
```

Output:
```
$ python main.py
20
```
<hr>

## get minute int:

Code:
```
from get_datetime import *

print(get_time_minute())
```

Output:
```
$ python main.py
27
```
<hr>

## get second int:

Code:
```
from get_datetime import *

print(get_time_second())
```

Output:
```
$ python main.py
14
```
<hr>

## get hour and minute str:

Code:
```
from get_datetime import *

print(get_time_HM(":"))
```
You can write any string between the brackets.

Output:
```
$ python main.py
20:27
```
<hr>

## get hour, minute and second str:

Code:
```
from get_datetime import *

print(get_time_HMS(":"))
```
You can write any string between the brackets.

Output:
```
$ python main.py
20:27:14
```
wzarp 0.0.4
Wzarp is a Weather library
Requires Python: >=3.7

# Wzarp 

Wzarp is a Python library for outputting of weather of Russian cities to the console.

## Installation
Use the package manager [pip](https://pypi.org/project/wzarp/0.0.1/) to install wzarp.

```bash
pip install wzarp
```
## Usage

```python
from wzarp.CityWeather import WeatherOfCity

city = input("Enter the name of the city: ")

city_weather = WeatherOfCity(city) # creating object of class WeatherOfCity
# During the initialization of an object you need 
# to put proper name of the city in English

city_weather.print_weather() # returns weather in chosen city

city_weather.print_temp() # returns temperature in chosen city
```