semvec/pypi-packages huggingface dataset:
amplitude-sdk 1.0.4
Amplitude Python 3 SDK.
License: MIT
Keywords: amplitude sdk Amplitude v2  bahav HTTP api V2 Batch Event Upload  Identify  Attribution  Behavioral Cohorts  Chart Annotations  Dashboard REST  Export  Group Identify  Releases  SCIM  Taxonomy  User Privacy  User Profile

Amplitude Python SDK
--------------------

SDK for Amplitude API

    | SDK for Amplitude API.
    | https://developers.amplitude.com/docs
    | https://github.com/paulokuong/amplitude

Requirements
------------

-  Python 3.7.0

Goal
----

| To provide a python API client for Amplitude API.
| (More clients to be implemented)

Code sample
-----------

| Requesting Behavioral Cohorts API

.. code:: python

  from amplitude_sdk import BehavioralCohortsClient
  b = BehavioralCohortsClient(
  api_key='xxxxxxx',
  secret='yyyyyyyy')
  b.list_cohorts()


Contributors
------------

-  Paulo Kuong (`@paulokuong`)

.. @pkuong: https://github.com/paulokuong
aocp 1.0.0
A collection of convenient parsers for Advent of Code problems.
License: MIT
Requires Python: >=3.8,<4.0
Keywords: advent of code,adventofcode,aoc,aocp,parser,parsers

# Advent of Code Parsers

[![pyversions](https://img.shields.io/pypi/pyversions/aocp)](https://www.python.org/)


A collection of convenient Python parsers for Advent of Code problems.


## Installation

```bash
pip install aocp
```

## Quickstart

You can import parsers from the base module. There are two main types of parsers:
 * Iterable parsers, which return a sequence of elements from parsing a `str`, such as `list`, `tuple` or `dict`
 * Transform parsers, which return a single object from parsing a `str`, such as an `int`, `bool` or another `str`

Iterable parsers can be composed with other parsers nested within, including Transform parsers and other Iterable parsers. They can also be nested with some base types such as `int`.

Transform parsers cannot have nested parsers, but they can be composed with other parsers in a sequence using `ChainParser`.

This way, the structure of the output data mirrors that of the expression used to instantiate the parser transform.

Here is a basic usage example:

```python
raw_data = "46,79,77,45,57,34,44,13,32,88,86,82,91,97"
parser = ListParser(IntParser)
parser.parse(raw_data)
```

Which results in:
```
[46, 79, 77, 45, 57, 34, 44, 13, 32, 88, 86, 82, 91, 97]
```

And here is a more advanced example, from [AoC 2021 day 4](https://adventofcode.com/2021/day/4):
```python
raw_data = """7,4,9,5,11,17,23,2,0,14,21,24,10,16,13,6,15,25,12,22,18,20,8,19,3,26,1

22 13 17 11  0
 8  2 23  4 24
21  9 14 16  7
 6 10  3 18  5
 1 12 20 15 19

 3 15  0  2 22
 9 18 13 17  5
19  8  7 25 23
20 11 10 24  4
14 21 16 12  6

14 21 17 24  4
10 16 15  9 19
18  8 23 26 20
22 11 13  6  5
 2  0 12  3  7"""
parser = TupleParser(
    (
        IntListParser(),
        ListParser(ListParser(IntListParser())),
    )
)
parser.parse(raw_data)
```

Which results in:
```
(
    [7, 4, 9, 5, 11, 17, 23, 2, 0, 14, 21, 24, 10, 16, 13, 6, 15, 25, 12, 22, 18, 20, 8, 19, 3, 26, 1], 
    [[[22, 13, 17, 11, 0],
     [8, 2, 23, 4, 24],
     [21, 9, 14, 16, 7],
     [6, 10, 3, 18, 5],
     [1, 12, 20, 15, 19]],
    [[3, 15, 0, 2, 22],
     [9, 18, 13, 17, 5],
     [19, 8, 7, 25, 23],
     [20, 11, 10, 24, 4],
     [14, 21, 16, 12, 6]],
    [[14, 21, 17, 24, 4],
     [10, 16, 15, 9, 19],
     [18, 8, 23, 26, 20],
     [22, 11, 13, 6, 5],
     [2, 0, 12, 3, 7]]]
)
```

By default, the splitting elements in an iterable are guessed from the string provided. However, you can provide them through the `splitter` argument. This can be a strings or a sequence of strings, which will all act as splitters.

A notebook with more examples from Aoc 2021 is available [here](./examples/aoc-2021.ipynb).

## To be done
 * Full testing coverage
 * Documentation page (full docstrings are available, though)
 * More examples from other previous years
 * Regex Parser
 * Defaults in tuple parser in case of missing components in origin string
## Source code

[https://github.com/miguel-bm/advent-of-code-parsers](https://github.com/miguel-bm/advent-of-code-parsers)
sumo-docker-pipeline 2.0
A pipeline to call a traffic simulator: SUMO
License: MIT
Requires Python: >=3.7,<4.0

# sumo_docker_pipeline
- - -

The package `sumo_docker_pipeline` enables you to run a traffic simulator [SUMO](https://sumo.dlr.de/docs/index.html) efficiently 
and to interact with Python easily. 
The package is valid when you need to run SUMO iteratively.

SUMO is often tricky to install locally because of its dependencies. 
Thus, it's a straightforward idea to run SUMO in a docker container.

However, another issue arises when we run SUMO in a docker container. 
It is challenging to construct a pipeline between SUMO and API.

The package provides an easy-to-use API; 
at the same time, 
SUMO runs in a docker container.

# Requirement

- python > 3.5
- docker 
- docker-compose

# Install

## Pull the image (or build of a docker image with SUMO)

The existing image is on the [Dockerhub](https://hub.docker.com/repository/docker/kensukemi/sumo-ubuntu18).

```shell
docker pull kensukemi/sumo-ubuntu18
```

If you prefer to build with yourself, you run the following command.

```shell
docker-compose build 
```

## Install a python package

```shell
make install
```

# Example case: iterative run with parameter updates

Let's say that you want to run SUMO iteratively.
At the same time, you want to change input parameters depending on the results of a simulation. 

In that case, you need to check the output of SUMO and update the parameters.
`sumo_docker_pipeline` package enables you to make the process automatic.

[![](https://user-images.githubusercontent.com/1772712/119264146-34563500-bbe2-11eb-9288-2e4e841ff803.png)]()

## Setups

1. creation of a directory where you save SUMO's configuration.
2. creation of template-files of SUMO's configuration.
3. running the pipeline.

## 1. creation of a directory

It is a directory that SUMO accesses.
Let's say that we create `test/resources/config_template`

## 2. creation of SUMO's configuration

You prepare configuration files which SUMO requires.
The format of the conf. files are totally same as SUMO's requirements.

The only difference is that you write wildcard `?` at the place where you wanna replace during pipeline.

For example, `tests/resources/config_template/grid.flows.xml` has the following element,

```xml
<vType vClass="passenger" id="passenger"  tau="0.5" speedDev="0.1" maxSpeed="?" minGap="?" accel="?" decel="?" latAlignment="center" />
```

With the `sumo_docker_pipeline` package, you can replace the attributes with the wildcards `?`.

## 3. running the pipeline

See `examples` directory.



# For developer

```shell
pytest tests
```

# license and credit

The source code is licensed MIT. The website content is licensed CC BY 4.0.


```
@misc{sumo-docker-pipeline,
  author = {Kensuke Mitsuzawa},
  title = {sumo-docker-pipeline},
  year = {2021},
  publisher = {GitHub},
  journal = {GitHub repository},
  howpublished = {\url{https://github.com/Kensuke-Mitsuzawa/sumo_docker_pipeline}},
}
```