semvec/pypi-packages huggingface dataset:
ratp-api 1.0.3
Get RATP data from RATP API.
Requires Python: >=3.6
Keywords: ratp,rer,metro,api,ratp_api,ratp_api-python

# RatpAPI Python Wrapper

## Overview
RatpAPI is a Python wrapper for interacting with the RATP (Régie Autonome des Transports Parisiens) API. This library provides easy access to real-time traffic information, line-specific traffic details, and affluence data for journeys on the RATP network in Paris.

## Features
- Fetch global traffic information on the RATP network.
- Retrieve traffic information for specific lines using the `LineID` enum for easy reference.
- Get affluence data for journeys on particular lines.
- Utilizes Pydantic models for data validation and parsing.


## Installation
To use RatpAPI in your project, you can install it via pip:
```bash
pip install ratp-api-python
```

## Usage
a
### Setting Up
First, import the `RatpAPI` class and initialize it with your API key:

```python
from ratp_api.main import RatpAPI

api = RatpAPI()
```

### Using the LineID Enum
The `LineID` enum provides a convenient way to reference specific lines by their IDs:
```python
from ratp_api.enums import LineID

# Example: Using LineID for RER A
line_id = LineID.RER_A
```

### Fetching Global Traffic Information
To get global traffic data:
```python
global_traffic = api.get_global_traffic()
print(global_traffic)
```

### Fetching Line-Specific Traffic
To get traffic information for a specific line using the `LineID` enum:
```python
line_data = api.get_line_traffic(line_id=LineID.METRO_14)
for situation in line_data.situations:
    print(situation)
# Output:
# isActive=True isPlanned=True criticity='HIGH' messages=["Jusqu'au 04/02, le week-end, trafic interrompu sur l'ensemble de la ligne en raison de travaux. Bus de remplacement. Plus d'informations sur la page dédiée."]
# isActive=False isPlanned=True criticity='HIGH' messages=["Du 01/02 au 08/02, du lundi au jeudi à partir de 22h, trafic interrompu sur l'ensemble de la ligne en raison de travaux. Bus de remplacement. Plus d'informations sur la page dédiée."]
# isActive=False isPlanned=True criticity='HIGH' messages=["Jusqu'au 31/01, du lundi au jeudi à partir de 22h, trafic interrompu sur l'ensemble de la ligne en raison de travaux. Bus de remplacement. Plus d'informations sur la page dédiée."]

```

### Fetching Affluence for Journeys
To get affluence data for a specific journey on a line:
```python
line_id = LineID.RER_A          # Using LineID enum

affluence_data = api.get_line_affluence(line_id=line_id)
print(affluence_data)
```

### Fetching Affluence for All Lines
To get affluence data for all lines:
```python
all_lines_affluence = api.get_all_lines_affluence()
print(all_lines_affluence)
```

## Contributing
Contributions to the RatpAPI project are welcomed!

## License
This project is licensed under the MIT License.

---
tongueswitcher 1.0.7
A package for identification of German--English code-switching

## TongueSwitcher v2

TongueSwitcher was designed to be a code-switching identification system for German-English. It is mostly rule-based, using specially created wordlists for most of the heavy-lifting. It is therefore fast and efficient.

Identification is performed at the word and sub-word level, and then the identity of still unknown words is computed by the nearest identified tokens.

### Usage 

```python
from tongueswitcher.executor import Executor

ts = Executor()

sentences = ["ich glaub ich muss echt rewatchen like i feel so empty was soll ich denn jetzt machen"]

results = ts.tongueswitcher_detect(sentences)

>>> [[{'lan': 'D', 'pos': 'PRON', 'token': 'ich'},
      {'lan': 'D', 'pos': 'VERB', 'token': 'glaub'},
      {'lan': 'D', 'pos': 'PRON', 'token': 'ich'},
      {'lan': 'D', 'pos': 'AUX', 'token': 'muss'},
      {'lan': 'D', 'pos': 'ADV', 'token': 'echt'},
      {'breakdown': 're+watch+en',
       'lan': 'M',
       'lans': 'E+E+D',
       'pos': 'VERB',
       'prefixes': {'lans': ['E'], 'text': ['re']},
       'roots': {'lans': ['E'], 'text': ['watch']},
       'suffixes': {'lans': ['D'], 'text': ['en']},
       'token': 'rewatchen'},
      {'lan': 'E', 'pos': 'SCONJ', 'token': 'like'},
      {'lan': 'E', 'pos': 'PRON', 'token': 'i'},
      {'lan': 'E', 'pos': 'VERB', 'token': 'feel'},
      {'lan': 'E', 'pos': 'ADV', 'token': 'so'},
      {'lan': 'E', 'pos': 'ADJ', 'token': 'empty'},
      {'lan': 'D.ILH', 'pos': 'ADV', 'token': 'was'},
      {'lan': 'D', 'pos': 'AUX', 'token': 'soll'},
      {'lan': 'D', 'pos': 'PRON', 'token': 'ich'},
      {'lan': 'D', 'pos': 'ADV', 'token': 'denn'},
      {'lan': 'D', 'pos': 'ADV', 'token': 'jetzt'},
      {'lan': 'D', 'pos': 'VERB', 'token': 'machen'}]]
```

### Labels

TongueSwitcher v2 identifies words with the following acronyms:

```
E = English
D = German
M = Mixed
NE = Named Entity
O = Other
```

With possible subcategorizations:

```
.ILH = Interlingual homograph
.B = Borrowed word
.HT = Hashtag
.E  = Emoji
.P  = Punctuation
```

### Dependencies

Other than the wordlists, we used Flair for POS tagging and a finetuned RoBERTa model for binary named entity recognition.

We used python version 3.7.

### Citation

For more detail, please refer to our paper:

```
@inproceedings{sterner2023tongueswitcher,
  author    = {Igor Sterner and Simone Teufel},
  title     = {TongueSwitcher: Fine-Grained Identification of German-English Code-Switching},
  booktitle = {Sixth Workshop on Computational Approaches to Linguistic Code-Switching},
  publisher = {Empirical Methods in Natural Language Processing},
  year      = {2023},
}
```
wave-rover-serial 0.5
A package to simplify the wave rover serial communication
Requires Python: >=3.8

# Wave Rover Serial

`wave_rover_serial` is a Python package designed for controlling and interacting with the Wave Rover robotic systems via serial communication. It offers a comprehensive set of functionalities to command various aspects of the robot, including movement, servo control, sensor data acquisition, and wireless communication management.

## References

https://www.waveshare.com/wiki/WAVE_ROVER

## Features

- Control motor speeds, servo angles, and other robotic components.
- Read sensor data and system information from the Wave Rover.
- Manage wireless connections, including WiFi scanning and connection.
- Simplified interface for robust serial communication with the robot.

## Installation

To install `wave_rover_serial`, use the following pip command:

```bash
pip install wave_rover_serial
```

## Dependencies

- pyserial: This is required for handling serial communication with the robot.

## Usage

Here's a quick example of how to use the wave_rover_serial package:

```python
from wave_rover_serial import Robot

# Initialize the Robot with the appropriate serial port and baud rate
robot = Robot('/dev/ttyUSB0')

# Connect to the robot
robot.connect()

# Send a command to set motor speeds
robot.speed_input(left_speed=100, right_speed=100)

# Send a command to get the IMU information and read the response
data = robot.imu_info()
print(data)

# Safely disconnect when done
robot.disconnect()
```

You can also use the `with` statement to automatically connect and disconnect from the robot:

```python
from wave_rover_serial import Robot

# Initialize the Robot with the appropriate serial port and baud rate
with Robot('/dev/ttyUSB0') as robot:
    # Send a command to set motor speeds
    robot.speed_input(left_speed=100, right_speed=100)

    # Send a command to get the IMU information and read the response
    data = robot.imu_info()
    print(data)
```

## Documentation

Each method within the Robot class is designed to interact with specific functionalities of the Wave Rover robotic system. Detailed descriptions and usage instructions for each method can be found in the module's documentation.

## Contributing

We welcome contributions to the wave_rover_serial package. Feel free to submit pull requests, report bugs, or propose new features.

## License

wave_rover_serial is distributed under the MIT License.

## Issues

For inquiries or support regarding wave_rover_serial, please file an issue on this repo.
decorator-http 0.0.6
A easy way to use requests but with decorators
Requires Python: >=3.6

# decorator-http

To simplify handling HTTP requests in Python, you can utilize the `decorator-http` package, which allows you to employ decorators for various HTTP methods. Begin by installing the package using the following pip command:

```bash
pip install decorator-http
```

Now, let's explore how to use this package with different HTTP methods:

## GET

```python
from decorator_http import get

@get('https://some-website.com', headers={'Content-Type': 'application/json'})
def get_example(data=None, response=None, error=None):
    if error:
        print('Failed to request details:', error)
        return

    print('Response data:', data)
    print('Response status:', response.status_code)

get_example()
```

### Handling Errors
You can handle errors by checking the `error` parameter within the decorator function. If an error occurs, it will be passed to the function, allowing you to handle it accordingly.

```python
@get('https://wrong-website.com', headers={'Content-Type': 'application/json'})
def get_example(data=None, response=None, error=None):
    if error:
        print('Failed to request details:', error)
        return

    print('Response data:', data)
    print('Response status:', response.status_code)

get_example()
```

## POST

```python
from decorator_http import post, put, delete

@post('https://some-website.com', body={"hello": "world"}, headers={'Content-Type': 'application/json'})
def post_example(data=None, response=None, error=None):
    if error:
        print('Error:', error)
        return

    print('Response data:', data)
    print('Response status:', response.status_code)

post_example()
```

## Example for PUT and DELETE

For PUT and DELETE requests, you can use the respective decorators in a similar manner. Here's an example for DELETE:

```python
@delete('https://some-website.com', headers={'Content-Type': 'application/json'})
def delete_example(data=None, response=None, error=None):
    if error:
        print('Error:', error)
        return

    print('Response data:', data)
    print('Response status:', response.status_code)

delete_example()
```

Similarly, you can use `@put` for PUT requests following a comparable structure.