semvec/pypi-packages huggingface dataset:
pycheckmate 1.0.1
src is a library designed to analyze Python code for various properties, focusing primarily on the evaluation of code authored by programming novices
License: MIT
Requires Python: >=3.9

# pycheckmate

pycheckmate is a library designed to analyze Python code for various properties, focusing primarily on the evaluation of code authored by programming novices.


## Installation

pycheckmate requires at least the following Python packages:

* python >= 3.9 (only for method `print_ast`)
* ast

# Documentation

The documentation for the latest pycheckmate is currently in progress.


## Example Usage
```
from pycheckmate import PyCheckMate

#store code as str in variable source_code
with open("testing_file.py") as file:
    source_code = file.read()

reqs_args = {
    'param1': { 'default': 0 },
    'param2': { 'type': int }
}

pcm = PyCheckMate(source_code) 

check_func_name = pcm.has_function("test_function")
# check_func_name is a dictionary, could be for example:
#{'passed': True, 'note': "Function 'test_function' found."}

check_func_params = pcm.function_has_parameters("test_function", required_args=reqs_args, required_vararg=False, required_kwarg="kwarg")
# check_func_params is a dictionary, could be for example:
#{'passed': False, 'note': 
    "Parameter 'param1' of function 'test_function' is completly missing.
    Parameter 'param2' of function 'test_function' is of wrong type, expected '<class 'int'>', got 'None'..
    Your function has a parameter to pass a variable number of arguments to the function. Here you are not allowed to use this type of parameter.
    Your function is missing a parameter to pass a variable number of keyworded arguments to the function."}
```

## Testing


```
python -m unittest discover tests "*_tests.py"
```
topsis-taanisha-10210323 1.1.2
TOPSIS implementation by Divyam Malik
License: MIT

# Topsis Python Package

Made By
Taanisha Agarwal(Roll No. 102103123)

## Description

The Topsis Python Package is a Python library that provides an implementation of the Technique for Order of Preference by Similarity to Ideal Solution (TOPSIS) method. TOPSIS is a multi-criteria decision-making method used to determine the best alternative among a set of alternatives based on their performance on multiple criteria.


<h2 id="usage">Usage</h2>

<p>
    Use the following command to perform TOPSIS analysis on a dataset:
</p>

<code>topsis data.csv "1,0,1,0,1" "+,-,+,-,+"</code>

<p>
    - <code>data.csv</code>: Path to the input CSV file containing the dataset.<br>
    - <code>"1,0,1,0,1"</code>: Weights for each criterion separated by commas.<br>
    - <code>"+,-,+,-,+"</code>: Impacts for each criterion (either <code>+</code> for maximizing or <code>-</code> for minimizing).
</p>

<p>
    The output will be saved in a file named <code>output.csv</code>.
</p>
amqp-workers 0.1.5
amqp-worker is a Python-based multi-threaded RabbitMQ consumer framework
License: MIT
Requires Python: >=3.8,<4.0
Keywords: amqp,rabbitmq

# 🐰amqp-worker

English | [简体中文](https://git.loom.run/Coder/amqp-worker/src/branch/master/README_zh.md)


amqp-worker is a Python-based multi-threaded RabbitMQ consumer framework. It allows you to consume messages more efficiently and stably.

## Features

- Batch consumption: process messages in batches, improve consumption efficiency.
- Automatic reconnection: when RabbitMQ service disconnects, amqp-worker will automatically reconnect, ensuring uninterrupted consumption.
- Customizable consumption mode: freely decide to use multi-threading and coroutines in the consumption function.
- Configurable message acknowledgment mode: support automatic acknowledgment and manual acknowledgment modes, configure according to your consumption needs.
- Configurable exception handling: support global configuration of message exception consumption mode, re-enter queue, re-insert, consume message.

## Installation

You can use pip tool to install amqp-worker:

```
pip install amqp-workers
```

## Usage

First, you need to import the amqp_worker module in your Python code:

```python
from amqpworker.app import App
```

Then, you need to instantiate an App object, and the App object depends on the AMQPConnection object:

```python
from amqpworker.connections import AMQPConnection
amqp_conn = AMQPConnection(hostname='127.0.0.1', username='guest', password='guest', port=5672)

app = App(connections=[amqp_conn])
```



Next, you need to define the consumption function:

```python
@app.amqp.consume(
    ['test'],
    options=AMQPRouteOptions(bulk_size=1024 * 8, bulk_flush_interval=2)
)
def _handler(msgs: List[RabbitMQMessage]):
    print(f"Recv {len(msgs)} {datetime.now().isoformat()}")
```


In the above code we give the consumption function a decorator, giving the consumption queue, the number of consumption per batch, it is worth noting that the parameter type of the consumption function is `List[RabbitMQMessage]`

Finally, just call the `run` method to start consuming:

```python
app.run()
```

## Example code

Below is a simple example code that will consume messages from a queue named `test`:

```python
from datetime import datetime
from typing import List

from amqpworker.app import App
from amqpworker.connections import AMQPConnection
from amqpworker.rabbitmq import RabbitMQMessage
from amqpworker.routes import AMQPRouteOptions

amqp_conn = AMQPConnection(hostname='127.0.0.1', username='guest', password='guest', port=5672)
app = App(connections=[amqp_conn])

@app.amqp.consume(
    ['test'],
    options=AMQPRouteOptions(bulk_size=1024 * 8, bulk_flush_interval=2)
)
def _handler(msgs: List[RabbitMQMessage]):
    print(f"Recv {len(msgs)} {datetime.now().isoformat()}")

app.run()

```

## Contributors

- [@JimZhang](https://git.loom.run/zzl221000)

## License

amqp-worker uses MIT license. Please refer to LICENSE file for details.