semvec/pypi-packages huggingface dataset:
obj-struct-lib 2022.1b2
An object-oriented alternative to the built-in struct module.
Requires Python: >=3.9

# Object Struct Library
[![Pytest](https://github.com/ModernMAK/Object-Struct-Library/actions/workflows/pytest.yaml/badge.svg)](https://github.com/ModernMAK/Object-Struct-Library/actions/workflows/pytest.yaml)
![PyPI](https://img.shields.io/pypi/v/obj-struct-lib)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/obj-struct-lib)
![PyPI - License](https://img.shields.io/pypi/l/obj-struct-lib)
</br>
An object-oriented alternative to python's struct module.</br>

## Installation (Pip)
### Installing from PyPI (Recommended)
```
pip install obj-struct-lib
```
### Installing from GitHub
For more information, see [pip VCS support](https://pip.pypa.io/en/stable/topics/vcs-support/#git)
```
pip install git+https://github.com/ModernMAK/Object-Struct-Library
```
kabbes-cryptography 0.1.0
Easy implementation of professional Python cryptography packages
Requires Python: >=3.7

[GitHub Pages](https://jameskabbes.github.io/cryptography)<br>
[PyPI](https://pypi.org/project/kabbes-cryptography)

# cryptography
Easy implementation of professional Python cryptography packages

<br> 

# Installation
`pip install kabbes_cryptography`


<br>

# Usage
For more in-depth documentation, read the information provided on the Pages. Or better yet, read the source code.

```python
import kabbes_cryptography as kcryp
import dir_ops as do
```

## RSA

```python
# Initializing RSA tokens
RSA_inst = kcryp.RSA()
RSA_inst.get_new_Keys( set = True )
RSA_inst.export_public_Key( do.Path( 'publickey' ) )
RSA_inst.export_private_Key( do.Path( 'privatekey' ) )
```

```python
#Encryption with RSA
RSA_inst.encrypt( bytes('test', encoding = 'utf-8') )
print (RSA_inst.encrypted)
```

```
>>> b'nb\\\x02|:M\x82\x8a\xe1\xc7U\xfd\x1e\xc5O\xcc\x7f\x06\xc2~\xaf\x85"\ -- ETC -- '
```

```python
#Decryption with RSA
dec_message = RSA_inst.decrypt()
print (dec_message.decode( 'utf-8' ))
```

```
>>> 'test'
```

## AES
```python
# Initializing AES
AES_inst = kcryp.AES()
AES_inst.prep_for_encrypt()
```

```python
AES_inst.encrypt( bytes('test', encoding = 'utf-8') )
print (AES_inst.encrypted)
```
```
>>> b'\xd1\xf8\x0b='
```
```python
dec_message = AES_inst.decrypt()
print (dec_message.decode( 'utf-8' ))
```
```
>>> 'test'
```

## Combined

```python
# Initializing Combined
Combined_inst = kcryp.Combined( Dir = do.Dir( do.get_cwd() ).join_Dir( path = 'CombinedEncryption' ) )
Combined_inst.RSA.import_private_Key( do.Path( 'privatekey' ), set=True )
Combined_inst.RSA.import_public_Key( do.Path( 'publickey' ), set=True )
```

```python
Combined_inst.encrypt( bytes('test', encoding = 'utf-8' ) )
print (Combined_inst.encrypted)
```

```
>>> b'\xdeA\xe7\x1e'
```

```python
dec_message = Combined_inst.decrypt()
print (dec_message.decode( 'utf-8 '))
```

```
>>> 'test'
```

<br>

# Author
James Kabbes
SBAUtil 0.1.0
Semi-automatic Pipeline for Markerless Pose Estimation and Behavior classification of mouse.
Requires Python: >=3.6

# SBA

Untility functions for interaction classifcation. The module provides functions for pre-SIMBA and post-SIMBA processing.

# Installation

```bash
pip install SBAUtil
```


# Tutorial

```python
import SBA
```

Initalize the configuration file:
```python
SBA.initConfig('./',projectName = "newProject", experimenter = "Yiyang")
```

### dynamic cut

[SIMBA gives error](https://github.com/sgoldenlab/simba/blob/master/docs/FAQ.md#3-i-get-a-qhull-eg-qh6154-or-6013-error-when-extracting-the-features) if the h5file input from DLC contains a portion where there is only one mouse.  `SBA.batch_dynamic_cropVideo` will 
1. dynamically crop out this portion based on the given h5file from DLC.  
2. modify the original DLC h5 file to match the extracted video.
3. The new videos and new h5files can then be used for SIMBA analysis  

```python
SBA.batch_dynamic_cropVideo(config_path,videos,h5files,videoType="avi")
```

`videos`: The path to directory of the videos.

`h5files`: The path to the directory of the DLC h5 outputs.


### Post SIMBA processing

`finalizeSimBaOutput` does the following:
1. Simplify the final output from SIMBA. 
2. Modify the frame number field so that it matches the original video. 


```python
SBA.finalizeSimBaOutput(config, simbaFiles, classifier ,destDir = None)
```

`config`: path to the SBA configuration file. 

`simbaFiles`: path to the SIMBA output directory. It's by default in project_folder/csv/machine_results.

`classifier`: list of strings containing the classifier names. For example, `["isInteraction"]` or `["Unilateral", "Reciprocal", "Passive"]`. 
Make sure the spelling matches the names defined in the SIMBA model.