semvec/pypi-packages huggingface dataset:
smpplib 2.2.4
SMPP library for python

`python-smpplib`
================

[![Version](https://img.shields.io/pypi/v/smpplib.svg?style=flat)](https://pypi.org/project/smpplib/#history)
[![Python versions](https://img.shields.io/pypi/pyversions/smpplib.svg?style=flat)](https://pypi.org/project/smpplib/)
[![PyPI downloads](https://img.shields.io/pypi/dm/smpplib.svg?style=flat)](https://pypi.org/project/smpplib/#files)
![License](https://img.shields.io/pypi/l/smpplib.svg?style=flat)
[![CircleCI](https://circleci.com/gh/python-smpplib/python-smpplib.svg?style=svg)](https://circleci.com/gh/python-smpplib/python-smpplib)

SMPP library for Python. Forked from [Google Code](https://code.google.com/p/smpplib/).

Example:

```python
import logging
import sys

import smpplib.gsm
import smpplib.client
import smpplib.consts

# if you want to know what's happening
logging.basicConfig(level='DEBUG')

# Two parts, UCS2, SMS with UDH
parts, encoding_flag, msg_type_flag = smpplib.gsm.make_parts(u'Привет мир!\n'*10)

client = smpplib.client.Client('example.com', SOMEPORTNUMBER, allow_unknown_opt_params=True)

# Print when obtain message_id
client.set_message_sent_handler(
    lambda pdu: sys.stdout.write('sent {} {}\n'.format(pdu.sequence, pdu.message_id)))
client.set_message_received_handler(
    lambda pdu: sys.stdout.write('delivered {}\n'.format(pdu.receipted_message_id)))

client.connect()
client.bind_transceiver(system_id='login', password='secret')

for part in parts:
    pdu = client.send_message(
        source_addr_ton=smpplib.consts.SMPP_TON_INTL,
        #source_addr_npi=smpplib.consts.SMPP_NPI_ISDN,
        # Make sure it is a byte string, not unicode:
        source_addr='SENDERPHONENUM',

        dest_addr_ton=smpplib.consts.SMPP_TON_INTL,
        #dest_addr_npi=smpplib.consts.SMPP_NPI_ISDN,
        # Make sure thease two params are byte strings, not unicode:
        destination_addr='PHONENUMBER',
        short_message=part,

        data_coding=encoding_flag,
        esm_class=msg_type_flag,
        registered_delivery=True,
    )
    print(pdu.sequence)
    
# Enters a loop, waiting for incoming PDUs
client.listen()
```
You also may want to listen in a thread:
```python
from threading import Thread
t = Thread(target=client.listen)
t.start()
```
**Note:** When listening, the client will automatically send an `enquire_link` command when the socket timeouts. You may override that behavior by passing `auto_send_enquire_link=False` as an argument to `listen()`. In that case, `socket.timeout` exceptions will bubble up.

The client supports setting a custom generator that produces sequence numbers for the PDU packages. Per default a simple in memory generator is used which in conclusion is reset on (re)instantiation of the client, e.g. by an application restart. If you want to keep the sequence number to be persisted across restarts you can implement your own storage backed generator.

Example:

```python
import smpplib.client

import mymodule

generator = mymodule.PersistentSequenceGenerator()
client = smpplib.client.Client('example.com', SOMEPORTNUMBER, sequence_generator=generator)
...
```
heartlens-dataset-lib 0.1.1
Dataset Loader for Heartlens
Requires Python: >=3.7

# Heartlens Datasest Library

This is a library for managing Hearlens Datasets.

To rebuild, run: `python setup.py sdist bdist_wheel`

To push new changes to PyPi:
1. Update the version in `setup.py` and `heartlens_dataset_lib/__init__.py`
2. If you do not have twine installed, run `pip install twine`
3. Run `twine upload dist/*` from the home directory to push changes. You must enter the Heartlens Project API Key to do this.
bioviewer 0.2.5
This library is designed to build visualization tools for biosignals such as EEG or ECG.

# Overview

This library simplifies the process of managing and visualizing multi-channel signal data. It provides a high-level API to encapsulate signal data handling and visualization through flexible and intuitive classes.

The library is designed for data scientists, engineers, and researchers working with signal data, enabling them to focus on analysis and visualization without worrying about low-level implementation details.

# Features

- **Streamlined Signal Management**: Encapsulate multi-channel signal data with metadata such as sampling frequency and scale factors.
- **Dynamic Viscd ualization**: Customize signal plots with channel-specific settings (e.g., colors, labels, and scales).
- **Interactive Viewer**: Navigate through signals with keyboard controls and timestamps for quick analysis.

# Installation

``` bash
pip install bioviewer
```

## Usage

## 1. Signal Creation
Create a Signal instance to encapsulate your data and its display settings:

```python
import numpy as np
from bioviewer import Signal

# Generate example data (6 channels, 1000 time steps)
data = np.random.randn(6, 10000)

# Initialize the signal with custom settings
signal = Signal(
    data=data,
    fs=128,
    scale_factor='auto',
    y_ticks=['Ch1', 'Ch2', 'Ch3', 'Ch4', 'Ch5', 'Ch6'],
    unit='mV',
    colors='rgbcmy',
    linewidth=1,
    show_scale=True
)
```

## 2. Visualize with the Viewer
Combine multiple signals and visualize them interactively:

```python 
from bioviewer import Viewer

# Create signals
signal1 = Signal(data=data, fs=128)
signal2 = Signal(data=data, fs=128, colors='bbbkbr')

# Initialize the viewer
viewer = Viewer(
    signals=[signal1, signal2],
    figsize=(14, 4),
    t_start=0,
    windowsize=15,
    stepsize=13,
    timestamps=[10, 50, 100]
)
```

## 3. Keyboard Controls
- **Right Arrow**: Move forward in time.
- **Left Arrow**: Move backward in time.
- **n / b**: Navigate to the next/previous timestamp.
- **z**: Save the current view as an image.

### Example

```python
from bioviewer import Signal, Viewer
import numpy as np

# Load example signal data
data = np.random.randn(6, 100000)
timestamps = [3, 7, 12, 21]

# Create a signal
signal = Signal(data=data, fs=128, scale_factor='auto', unit='mV')

# Visualize using Viewer
viewer = Viewer(
    signals=[signal],
    timestamps=timestamps,
    windowsize=10
)
```

# Jupyter notebooks
To enable interactive backends for Matplotlib plots in Jupyter Notebooks, use the following magic command:
```python
%matplotlib widget
```
This command activates an interactive plot viewer, allowing you to interact with your visualizations directly within the notebook.

# Contributing
Contributions are welcome! Feel free to submit a pull request or file an issue.

# Support
For questions or issues, open a GitHub issue or contact me at [moritz.alkofer@protonmail.com].
automlst.cli 0.2.0
A CLI tool to rapidly fetch fetch MLST profiles given sequences for various diseases.
Requires Python: >=3.11

# autoMLST.CLI

A command-line interface based program that allows quickly batched requests for obtaining MLST profiles on multiple FASTA sequences and exporting it as a convenient CSV.

This program is simply a command-line interface for [autoMLST.Engine](https://pypi.org/project/automlst.engine).

## Features

This CLI is capable of exactly what [autoMLST.Engine](https://pypi.org/project/automlst.engine) is capable of:
- Import multiple FASTA files
- Fetch the available BIGSdb databases that is currently live and available
- Fetch the available BIGSdb database schemas for a given MLST database
- Retrieve exact/non-exact MLST allele variant IDs based off a sequence
- Retrieve MLST sequence type IDs based off a sequence
- Output all results to a single CSV

## Usage

This CLI can be installed with `pip`. Please ensure [pip is installed](https://pip.pypa.io/en/stable/installation/). Then:

1. Run `pip install automlst-cli` to install the latest version of the CLI for autoMLST.

2. Once installation is complete, run `automlst --version` to test that the installation succeeded (and that you are running the appropriate version).

3. Run `automlst -h` to get information on how to get started.

### Example

Let's say you have a fasta called `seq.fasta` which contains several sequences. You know all sequences in `seq.fasta` are Bordetella pertussis sequences, and you know you have the sequences for the necessary targets of your schema in each of them. You want to retrieve MLST profiles for all of them. This can be done by:

1. Running `automlst info -l` to list all available `seqdef` databases and find the database associated with Bordetella (you should see one called `pubmlst_bordetella_seqdef`).

2. Then, run `automlst info -lschema pubmlst_bordetella_seqdef` to get the available typing schemas and their associated IDs. In this example, let's assume we want a normal MLST scheme. In this case, we would pay attention to the number next to `MLST` (it should be `3`).

3. Then, run `automlst st -h` and familiarize yourself with the parameters needed for sequence typing.

4. Namely, you should find that you will need to run `automlst st seq.fasta pubmlst_bordetella_seqdef 3 output.csv`. You can optionally include multiple `FASTA` files, and/or `--exact` to only retrieve exact sequence types, and/or `--stop-on-fail` to stop typing if one of your sequences fail to retrieve any type. 

5. Sit tight, and wait. The `output.csv` will contain your results once completed.
ws-mcp 0.1.11
Wrap MCP servers with a WebSocket.
Requires Python: >=3.12

# ws-mcp

Wrap MCP stdio servers with a WebSocket.
For use with [kibitz](https://github.com/nick1udwig/kibitz).

## Quickstart

### Prerequisites

Install [uv](https://github.com/astral-sh/uv):
```bash
curl -LsSf https://astral.sh/uv/install.sh | sh
```

### Configuration

The config file specifies which MCP servers to run.
The default config (no `--config` or `--command` args provided) includes:
- [`wcgw`](https://github.com/rusiaaman/wcgw): For general system operations and file management
- [`fetch`](https://github.com/modelcontextprotocol/servers/tree/main/src/fetch): For making HTTP requests

To make a configuration file:

1. Create your configuration file:
   ```bash
   cp sample.config.json config.json
   ```
2. Modify `config.json` to add or remove servers based on your needs.
3. Run with `--config path/to/config.json` to use the new config file.

### Running ws-mcp

Basic usage with default config file (no `--config` or `--command` provided) and port:
```bash
uvx --refresh ws-mcp@latest
```

This will start all configured servers on the default port (`10125`).

To use a config file and port:
```bash
uvx --refresh ws-mcp@latest --config path/to/config --port 10125
```

## Detailed Usage

```bash
# Example using fetch
uvx --refresh ws-mcp --command "uvx mcp-server-fetch" --port 3002

# Example using wcgw
## On macOS
uvx --refresh ws-mcp --command "uvx --from wcgw@latest --python 3.12 wcgw_mcp" --port 3001

## On Linux (or if you have issues on macOS with wcgw)
cd /tmp
git clone https://github.com/nick1udwig/wcgw.git
cd wcgw
git submodule update --init --recursive
git checkout hf/fix-wcgw-on-ubuntu
cd ..
uvx --refresh ws-mcp --command "uvx --from /tmp/wcgw --with /tmp/wcgw/src/mcp_wcgw --python 3.12 wcgw_mcp" --port 3001

# Example using Brave search
export BRAVE_API_KEY=YOUR_API_KEY_HERE
uvx --refresh ws-mcp --env BRAVE_API_KEY=$BRAVE_API_KEY --command "npx -y @modelcontextprotocol/server-brave-search" --port 3003

# Or, with a .env file:
uvx --refresh ws-mcp --env-file path/to/.env --command "npx -y @modelcontextprotocol/server-brave-search" --port 3003

# `--command` can be supplied multiple times!
#  Example serving multiple servers at once:
uvx --refresh ws-mcp --env-file path/to/.env --command "npx -y @modelcontextprotocol/server-brave-search" --command "uvx mcp-server-fetch" --port 3004

# Servers can also be specified in a `.json` file following [the standard MCP format](https://modelcontextprotocol.io/quickstart/user#2-add-the-filesystem-mcp-server)
uvx --refresh ws-mcp --env-file path/to/.env --config path/to/config.json --port 3005
```
mydatabase 0.1.0
Библиотека для подключения к PostgreSQL
Requires Python: >=3.6

# My Database Library

Р‘РёР±Р»РёРѕС‚РµРєР° РґР»СЏ РїРѕРґРєР»СЋС‡РµРЅРёСЏ Рє Р±Р°Р·Рµ РґР°РЅРЅС‹С… PostgreSQL.

## РЈСЃС‚Р°РЅРѕРІРєР°
Р”Р»СЏ СѓСЃС‚Р°РЅРѕРІРєРё Р±РёР±Р»РёРѕС‚РµРєРё РёСЃРїРѕР»СЊР·СѓР№С‚Рµ pip:

```bash
pip install mydatabase
anywise 0.1.9
Anywise let you write your application anywise
Requires Python: >=3.12

# Anywise

Anywise provides a universal and flexible API for your application by abstracting function calls into message passing, 
make it easy to build scalable, maintainable, and testable applications.

- Eliminates direct dependencies on implementation details.
- Improves development speed, reduces testing complexity, and enhances the reusability of the application as a whole.
- Promotes best practices and loose coupling.


## Features

- minimal change to existing code, easy to adopt.
- integrated dependency injection system, automatically inject dependency at runtime.
- type-based message system
- strong support to AOP, middlewares, decorators, etc. 

---

Documentation: https://raceychan.github.io/anywise/

Source Code: https://github.com/raceychan/anywise

---

## Install

```py
pip install anywise
```

## Quck Start

Let start with defining messages:

```py
from anywise import Anywise, MessageRegistry, use

class UserCommand: ...
class CreateUser(UserCommand): ...
class UserEvent: ...
class UserCreated(UserEvent): ...
```

Next step, Register command handler and event listeners.

### handler/listener

for simplicity, we will use `function-based` handler here

```py
from anywise import MessageRegistr, BaseGuard
registry = MessageRegistry(command_base=UserCommand, event_base=UserEvent)

async def create_user(
    command: CreateUser, 
    anywise: Anywise, 
    service: UserService = use(user_service_factory)
):
    await users.signup(command.username, command.user_email)
    await anywise.publish(UserCreated(command.username, command.user_email))

async def notify_user(event: UserCreated, service: EmailSender):
    await service.send_greeting(command.user_email)

class IPContext(TypeDict):
    ip: str

class IPLimiter(BaseGuard):
    def __init__(self, throttle_list: tuple[str], white_lst: WhiteList):
        self._lst = throttle_list
        self._white_lst = white_lst

    async def __call__(self, command: UserCommand, context: IPContext):
        if not await self._white_lst.should_pass(command.user_id):
            if context["ip"] in self._lst:
                return ThrottleResponse()

registry.register(IPLimiter, create_user, notify_user)
```

NOTE: you can also use `registry` as a decorator to register handler/listeners.

### Message Source

Message source is where you can your message from.

Here we use fastapi as our message source, but it can be other choices.

```py
from anywise import Anywise
from anywise.integration.fastapi import FastWise

@app.post("/users")
async def signup(command: CreateUser, anywise: FastWise) -> User:
    return await anywise.send(command)
```