semvec/pypi-packages huggingface dataset:
contextif 0.0.5
Run the function only in a specific context
Requires Python: >=3.7

![logo](https://raw.githubusercontent.com/pomponchik/contextif/develop/docs/assets/logo_3.svg)

[![Downloads](https://static.pepy.tech/badge/contextif/month)](https://pepy.tech/project/contextif)
[![Downloads](https://static.pepy.tech/badge/contextif)](https://pepy.tech/project/contextif)
[![codecov](https://codecov.io/gh/pomponchik/contextif/graph/badge.svg?token=krgDghlvu7)](https://codecov.io/gh/pomponchik/contextif)
[![Hits-of-Code](https://hitsofcode.com/github/pomponchik/contextif?branch=main)](https://hitsofcode.com/github/pomponchik/contextif/view?branch=main)
[![Test-Package](https://github.com/pomponchik/contextif/actions/workflows/tests_and_coverage.yml/badge.svg)](https://github.com/pomponchik/contextif/actions/workflows/tests_and_coverage.yml)
[![Python versions](https://img.shields.io/pypi/pyversions/contextif.svg)](https://pypi.python.org/pypi/contextif)
[![PyPI version](https://badge.fury.io/py/contextif.svg)](https://badge.fury.io/py/contextif)
[![Checked with mypy](http://www.mypy-lang.org/static/mypy_badge.svg)](http://mypy-lang.org/)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)

# contextif: run the function only in a specific context

Sometimes we may need to run a function only if it happens in a strictly defined context. In this case, we can use this mini library.

Install it:

```bash
pip install contextif
```

And use:

```python
from contextif import state

with state:
    state(print, 'hello,', 'world!')  # It will be printed.

state(print, "it's me, Mario!")  # It won't.
```

Using `state` as a function, you can pass another function and arguments to it there. It will be called only if it happens in a context created also using `state`. The function will not be called out of context.

For convenience, after the first import of `state`, this variable becomes builtin and you can access it in other modules of your program without importing.
rustx3dh 0.0.1
Embeded the xxxdh, which iplementation of the Extended Triple Diffie-Hellman key exchange protocol written in Rust, on Python. xxxdh is written by Olexander Yermakov.
Requires Python: >=3.8
Keywords: crypto,cryptography,x3dh

# RustX3DH

Embeded the [xxxdh](https://github.com/alexyer/xxxdh/tree/master), which iplementation of the Extended Triple Diffie-Hellman key exchange protocol written in Rust, on Python. [xxxdh](https://github.com/alexyer/xxxdh/tree/master) is written by [Olexander Yermakov](https://github.com/alexyer).

Implementation is close to the [Signal Spec](https://signal.org/docs/specifications/x3dh/), but Ristretto point Curve25519 used as a *curve* for the default implementation. Though underlying algorithms could be changed fairly easily.

## Usage

```python
//! Basic example.

from x3dh import x3dh_ser

u1_shared_secret_key, u2_shared_secret_key = x3dh_ser.gen_3xdh_secrets_key_pairs()

print(f"[u1_shared_secret_key]:{u1_shared_secret_key}")
print(f"[u2_shared_secret_key]:{u2_shared_secret_key}")
```
sma-rsi-indicators 0.1.5
A basic package to calculate sma and rsi indicators
Keywords: python,sma,rsi,csv

## 'A package that allows you to calculate sma and rsi indicators from a given csv file and outputs the indicators to a given csv file.'

### Example Usage:
```Python
import sma_rsi_indicators

csv_path = "orcl.csv" # Insert the path to your csv file here
list_of_data = sma_rsi_indicators.convert_to_dict(csv_path)

sma_rsi_indicators.calculate_sma(list_of_data,"orcl-sma.csv")
sma_rsi_indicators.calculate_rsi(list_of_data,"orcl-rsi.csv")

```
***
Your csv file should contain columns called "Date" and "Close" indicating the dates and the closing values of those dates for this module to work.