semvec/pypi-packages huggingface dataset:
constants-and-utils 0.0.5
Constants and utils
Requires Python: >=3.6

# Constants and Utils

Package with constants and generic utilities

[![pipeline status](https://gitlab.com/terminus-zinobe/constants-and-utils/badges/master/pipeline.svg)](https://gitlab.com/terminus-zinobe/constants-and-utils/-/commits/master) [![coverage report](https://gitlab.com/terminus-zinobe/constants-and-utils/badges/master/coverage.svg)](https://gitlab.com/terminus-zinobe/constants-and-utils/-/commits/master)


## Package installation
- Installation standard
    ```shell
    $ pip3 install constants-and-utils
    ```

- Install with mongoengine utils
    ```shell
    $ pip3 install constants-and-utils[mongoengine]
    ```

## Docs

- [Constants and utils documentation](https://constants-and-utils-docs.readthedocs.io/en/latest/index.html)

Examples:

`recursive_get` this is a helper, apply a get recursive to the dictionary.

```python
>>> from constants_and_utils.utils.helpers import recursive_get

>>> recursive_get({'NUMBER': {'ONE': 1 }}, 'NUMBER.ONE')
1
```


`HttpCode` this is a class enum, Http code constants.

```python
>>> from constants_and_utils.constants.enums import HttpCode

>>> HttpCode.OK.value
200
```
[More](https://constants-and-utils-docs.readthedocs.io/en/latest/index.html)
pySEED 2.0.0
pySEED is a python inplementation of symmetric-approximation energy-based estimation of distribution (seed): a continuous optimization algorithm, that was published in IEEE Accsses, with DOI: 10.1109/ACCESS.2019.2948199
Requires Python: >=3.5.2

pySEED-EDA is a Python implementation of the Symmetric-Approximation Energy-Based Estimation of Distribution (SEED) algorithm: A Continuous Optimization Algorithm , which allows the optimization in continuous space for independent variable functions, based on distribution estimation algorithms, in the Univariate Marginal Distribution scheme [2], the main idea is to make a generational change in each population evolution under the Boltzmann distribution probability function (PDF-B), because PDF-B is a function that has the property that states with less energy are unlikely, so SEED converges in each evolution to a better or equal energy state.
captivity 0.1.2
Cages in Pandas

# Getting started with Captivity

The only purpose of `captivity` is to support you in writing better `pandas` code by caging in
some of its worst excentricities. `pandas` is great, but `import captivity; import pandas as pd` is better.

The philosophy behind `captivity` is that there's nothing worse than silent failure. If you didn't ask pandas to automagically correct your arguments, it shouldn't.

## Example

To find a comprehensive set of examples, check out the `captivity/tests/` directory. To pique your interest, consider the following:

```python
import pandas as pd

a = pd.DataFrame({
    "x": [1, 2], 
    "y": [3, 4]}
)

b = pd.DataFrame({
    "z": [5, 6],
    "x": [9, 0]
})

a_b = pd.concat([a, b], axis=1)

print(a_b)
>>    x  y  z  x
>> 0  1  3  5  9
>> 1  2  4  6  0 

``` 

Woa! That should definitely not be allowed by default. With `captivity`, it's not.

```python
import captivity
a_b = pd.concat([a, b], axis=1)

>> Traceback (most recent call last):
>> ...
>> captivity.CaptivityException: Column-wise concatenation would result in duplicate column labels for column: {'x'}

```

In addition, captivity currently supports:
* **sensible checks on vertical concatenation (column sets must match)**
* **sensible checks on merges (no more `_x` and `_y` columns - except when `suffixes=("_x", "_y")` is passed explicitly)**
* turning `CaptivityExceptions` into `CaptivityWarnings` - useful when first using `captivity` in an existing codebase

## Does it also catch \<Issue X\> ?
`captivity` is a labor not of love, but of annoying bugs I find in my own code that are caused by careless default arguments in pandas. 
If you find one in yours that you'd like captivity to patch, please raise an issue on GitHub or contact me directly (or better yet, implement
it and put out a PR!)

 ## Running the tests
 
 To test `captivity`, run `pytest --cov` in the root directory of this project.
 
 ## Installation
 To install `captivity`, simply run `pip install git+https://github.com/maxsnijders/captivity.git`.