semvec/pypi-packages huggingface dataset:
databricks-session 0.3.0
A simple util to get a spark and mlflow session objects from an .env file
License: MIT
Requires Python: >=3.9,<4.0

# Databricks Session Util
**A simple utility for spark and mlflow session objects**


## Setup

### Quick Install

```shell
python -m pip install databricks_session
```

### Build from source

Clone the repository

```shell
git clone https://github.com/Broomva/databricks_session.git
```

Install the package

``` shell
cd databricks_session && make install
```

### Build manually

After cloning, create a virtual environment

```shell
conda create -n databricks_session python=3.10
conda activate databricks_session
```

Install the requirements

```shell
pip install -r requirements.txt
```

Run the python installation

```shell
python setup.py install
```

## Usage

The deployment requires a .env file created under local folder:

```shell
touch .env
```

It should have a schema like this:

```toml
databricks_experiment_name=''
databricks_experiment_id=''
databricks_host=''
databricks_token=''
databricks_username=''
databricks_password=''
databricks_cluster_id=''
databricks_sql_http_path=''
```

```python
import databricks_session 

# Create a Spark session
spark = DatabricksSparkSession().get_session()

# Connect to MLFLow Artifact Server
mlflow_session = DatabricksMLFlowSession().get_session()
```
permpy 0.2.12
A package for analyzing permutation patterns.
License: MIT
Requires Python: >=3.7,<4.0

# permpy

PermPy is a user-friendly Python library for maniupulating permutation patterns and permutation classes. See [Wikipedia](https://en.wikipedia.org/wiki/Permutation_pattern) for an introduction to permutation patterns.

## Installation

Install `permpy` with `pip`:

```bash
$ python -m pip install permpy
```

## Usage 

`permpy` contains a number of useful Python classes including `permpy.Permutation`, which represents a permutation and can determine containment.
```python
>>> from permpy import Permutation
>>> p = Permutation(1324)
>>> q = Permutation(123)
>>> q <= p
True
>>> r = Permutation(321)
>>> r <= p
False
>>> S = pp.PermSet.all(6)
>>> S
Set of 720 permutations
>>> S.total_statistic(pp.Perm.num_inversions)
5400
>>> S.total_statistic(pp.Perm.num_descents)
1800
>>> from permpy import AvClass
>>> A = AvClass([132])
>>> for S in A:
...     print(S)
... 
Set of 1 permutations
Set of 1 permutations
Set of 2 permutations
Set of 5 permutations
Set of 14 permutations
Set of 42 permutations
Set of 132 permutations
Set of 429 permutations
Set of 1430 permutations 
```

## Build Instructions
For a summary of how PermPy is built, go [here](https://py-pkgs.org/03-how-to-package-a-python#summary-and-next-steps).
```bash
$ python -m poetry build
$ python -m poetry publish
```

## Test Instructions

To run tests, run
```bash
$ python -m poetry build
$ python -m poetry shell
$ python -m pytest tests/
```

To build and install locally, run
```bash
$ python -m poetry install
$ python -m poetry shell
$ python
>>> import permpy
>>>
```