semvec/pypi-packages huggingface dataset:
pk-prob-distributions 0.3
Gaussian and Binomial distributions

# pk_prob_distributions

Summary of the package

## Files

Explanation of files in the package

## Installation

Use the package manager [pip](https://pip.pypa.io/en/stable/) to install pk_prob_distributions.

```bash
pip install pk_prob_distributions
```

## Usage

```python
from pk_prob_distributions import Gaussian, Binomial

gaussian_one = Gaussian(10, 7) # a Gaussian Distribution with mean 10 and standard deviation 7

gaussian_one.calculate_mean() # returns the mean of the Gaussian Distribution

gaussian_one.calculate_stdev() # returns the standard deviation of the Gaussian Distribution

gaussian_one.pdf(k) # probability density function, being k the point for calculating the probability density function

```

## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

## License
[MIT](https://choosealicense.com/licenses/mit/)
libdnb 0.0.1
German National library api
Requires Python: >=3.5

# LibDNB

<img alt="LibDNB" src="https://img.shields.io/badge/python-3.5%20%7C%203.6%20%7C%203.7-blue">  <img alt="PyPI - Status badge" src="https://img.shields.io/badge/status-stable-brightgreen">  <img alt="PRs welcome" src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg">

> This project is *heavily* inspired by [calibre-dnb](https://github.com/citronalco/calibre-dnb)


## About
I needed a way to fetch basic book metadata from the German National Libraries "API", I found [calibre-dnb](https://github.com/citronalco/calibre-dnb), but it is not suitable for my usage case, so I modified it.
You can visit the portal here: [portal.dnb.de](https://portal.dnb.de).

## Get started

### Obtain Token
You need to apply for an API-Key at schnittstellen-service@dnb.de in order to get access to the catalogue. This library uses the `SRU-API`, you need a `SRU Access Token`.

### Installation
`pip install libdnb`

### Usage
Code Example:
```py
import libdnb

dnbclient = libdnb.LibDNB("Your-SRU-Access-Token-Here")
result = dnbclient.lookup("9783346111098") # ISDN, Title, or any other metadata to search for here
if result: # Result might be None if nothing was found
    print(result["title"])
```
#### Fields
| Key | Datatype |
| -- | -- |
| `title` | String |
| `authors` | String |
| `author_sort` | List |
| `languages` | List |
| `pubdate` | datetime.datetime |
| `publisher_location` | String |
| `publisher_name` | String |
| `subtitle` | String |
| `tags` | List |
| `comments` | String |
| `isbn` | String |
| `urn` | String |
| `idn` | String |
| `ddc` | String |

> Note that some fields might be empty, you have to figure out on which fields you want to rely upon.
lamb 0.0.1.post1
Express lambdas without `lamdbda`
Requires Python: >=3.6

# Lamb ��: Concise Function Expression in Python
This module introduces a new way to express small functions in a compact and intutive way using a single object called `lamb`. Any expression in which a `lamb` appears turns into a function of which `lamb` is a parameter. Check `demo.py` to see a demonstration:

```python
from lamb import *
# Primary purpose: Creating small anonymous functions
res = filter(lamb % 5 < 3, range(30))

# Arbitrary arithmetic and boolean operators are allowed:
f   = (lamb ** 2 % 6) - 28 != 5 / 4
f_l = lambda x: (x ** 2 % 6) - 28 != 5 / 4
f(2) == f_l(2) # The two expressions are equivalent

# Empty function calls, index and attribute access are possible as well
g = lamb().x[2] - 3 == None

# Lambs can be chained with other functions using the righshift operator
h = g >> f >> lamb + 2 # make sure the first function is a lamb

# For multi-variable lambs, different lamb names improve clarity
from lamb.vs import * # Imports a, b, c, ..., z
from lamb.l_vs_ import * # Import l_a_, l_b_, .. arbitrary pre- and postfixes are possible
g = (l_a_ - b) * c

# g is now a function of three arguments, or rather: functions returning functions,
# with one argument each (shoutout to Haskell)
g(1)(2)(3) == g(1, 2)(3) == g(1, 2, 3)

# Arguments replace lambs left-to-right. The following will output -3:
g(1, 2, 3)

# Note that `a_ is b_` and `a_ is lamb`; they differ only in their identifier. 
# In other words, the following are equivalent:
g2 = (lamb - lamb) * lamb
g(1, 2, 3) == g2(1, 2, 3)

# Lambs can be nested. Parents inherit un-evaluated lambs from their children.
# For clarity, lambs can be added as placeholder for unevaluated args:
h  = g(1, 2) + g(3) 
h2 = g(1, 2, a) + g(3, a, b)
h(1, 2, 3) == h2(1, 2, 3)

# In a select few cases, this will work, but is discouraged. Use g = lamb >> f instead.
f = lambda x: x + 2 == 5
g = f(lamb)
f(2) == g(2)
```

## Installation
`lamb` is installable from PyPI:

```
python -m pip install lamb
```
flask-feature-flag 0.2.1
Flask feature flag
Requires Python: >=3.6

# Flask feature flag

Tool to activate and deactivate project functionalities

[![pipeline status](https://gitlab.com/terminus-zinobe/flask-feature-flag/badges/master/pipeline.svg)](https://gitlab.com/terminus-zinobe/flask-feature-flag/-/commits/master) [![coverage report](https://gitlab.com/terminus-zinobe/flask-feature-flag/badges/master/coverage.svg)](https://gitlab.com/terminus-zinobe/flask-feature-flag/-/commits/master)


## Package installation
- Installation
    ```shell
    $ pip3 install flask-feature-flag
    ```

## Configuration

- Feature flag type availables.
    * FLASK_CONFIG
    * MONGO

- Define the following to your `config.py`
    ```python
    FEATURE_FLAG_TYPE=
    ```
    `FEATURE_FLAG_TYPE` is required.

- You should add this to your `config.py` if it's feature type `FLASK_CONFIG`
    ```python
    FEATURE_FLAGS = {
        'ROUTE_ENABLED': os.environ.get('ROUTE_ENABLED', True)
    }
    ```
    `FEATURE_FLAGS` is required.

## Docs

- [Flask-Feature-Flag’s documentation](https://flask-feature-flag-docs.readthedocs.io/en/latest/index.html)

Example:

`is_enabled` this decorator allows to activate or deactivate a functionality and receives as parameters a function to return in case feature is disabled and the name of the feature

```python
from flask import Flask
from flask_caching import Cache
from flask_feature_flag import Flag

config = {
    "DEBUG": True,
    "CACHE_TYPE": "simple",
    "FEATURE_FLAG_TYPE": "MONGO"
}
app = Flask(__name__)
# tell Flask to use the above defined config
app.config.from_mapping(config)
cache = Cache(app)
flag = Flag(app, cache)

def error():
    return dict(massage='this is a mistake')

@flag.is_enabled(error, 'ENV_HELLO')
def hello(name):
    return dict(message=f'Hi, {name}')
```
django-totd 1.0.2
Django app for adding a Tip of the Day to any page
Requires Python: >=3.5

# Tip of the Day (totd)

A Django application that allows you to create tips or hints to be displayed at the top of specific pages on your website. This app allows you to define tips in the Django Admin, assign them to specific pages, and give a date range in which they should be displayed.

# Installation

Install the Django Tip of the Day package:

`pip install django-totd`

# Settings

Totd requires the Django Sites application.

Add `django.contrib.sites` and `totd` to your INSTALLED_APPS:

```
INSTALLED_APPS = [
    ...
    'django.contrib.sites'
    `totd',
]
```

Add the `tips` Context Processor:

```
TEMPLATES = [
    {
        "BACKEND": "django.template.backends.django.DjangoTemplates",
        "DIRS": [],
        "APP_DIRS": True,
        "OPTIONS": {
            "context_processors": [
                ...
                "totd.context_processors.tips",
            ]
        },
    }
]
```

# Templates

Totd works a lot like the Django Messages framework, you should add it to the top of the content portion of your base template so that it can be used in any page extending that template. The URL path of the request will be used to decide which Tip to show.

Add the following snippet to your base template:
```
{% if tip %}
<div class="alerts">
    <div class="alert {{ tip.tags }}"><strong>{% trans "Tip:" %} </strong>{{ tip.text|safe }}</div>
</div>
{% endif %}
```
p-privacy-metadata 0.0.5
Privacy metadata in process mining

## Introduction
This project implements the privacy metadata proposed in the paper [Privacy-Preserving Data Publishing in Process Mining](https://www.researchgate.net/publication/342048551_Privacy-Preserving_Data_Publishing_in_Process_Mining).
## Python package
The implementation has been published as a standard Python package. Use the following command to install the corresponding Python package:

```shell
pip install p-privacy-metadata
```

## Usage
```python
from p_privacy_metadata.privacyExtension import privacyExtension
from p_privacy_metadata.ELA import ELA
from pm4py.objects.log.importer.xes import factory as xes_importer_factory
from pm4py.objects.log.exporter.xes import factory as xes_exporter
import pandas as pd

event_log = "paper_sample.xes"
log = xes_importer_factory.apply(event_log)

# privacyExtension Part
prefix = 'privacy:'
uri = 'paper_version_uri/privacy.xesext'
privacy = privacyExtension(log, prefix, uri)
privacy.set_anonymizer(operation='suppression', level='event', target='org:resource')

statistics={}
statistics['no_modified_traces'] = 15
statistics['no_modified_events'] = 20
desired_analyses= {}
desired_analyses['1']='process discovery'
desired_analyses['2']='social network discovery'
message = privacy.set_optional_anonymizer(layer = 1, statistics=statistics, desired_analyses=desired_analyses, test='test' )
print(message)

layer = privacy.get_anonymizer(layer=1)
anon = privacy.get_anonymizations()

xes_exporter.export_log(log, 'ext_paper_sample.xes')

# ELA Part
try:
    log_name = log.attributes['concept:name']
except Exception as e:
    log_name = "No mame is given for the event log!"

ela = ELA()
ela_desired_analyses = ['analysis 1', 'analysis 2']
data = {'Name': ['Tom', 'nick', 'krish', 'jack'], 'Age': [20, 21, 19, 18]}
df = pd.DataFrame(data)
ela.set_values(origin=log_name, method='method 1', desired_analyses=ela_desired_analyses,data=df.copy())
ela.create_xml('ela_paper_sample.xml')
print(ela.get_values()['data'])
ela = ela.read_xml("ela_paper_sample.xml")
print(ela)
```
jsonpathgenerator 0.0.2
Get Json path from a nested json document. specify notation dot or bracket
Requires Python: >=3.5, <4
Keywords: Json Jsonpath xpath jsonnotation json parser safe parser

# JSONPathGenerator
  Python project to generate Json path in notations dot or bracket.

  funtion to convert a nested json to nested dictionary enumerating the lists to child dictionaries

# INSTALLATION

   pip install jsonpathgenerator

# USAGE

   from jsonpathgenerator import jsonpath

   js = jsonpath()

   js.get_json_path(json-line,notation='dot')

   notation = "dot"

   notation = "bracket"


# Usage Examples


    js = jsonpath()

    with open('sample_json.json','r') as file:
        json_line=json.load(file)
        json_path_list=js.get_json_path(json_line,notation="bracket")
        print(json_path_list)
backcall 0.2.0
Specifications for callback functions passed in to an API

========
backcall
========

.. image:: https://travis-ci.org/takluyver/backcall.png?branch=master
        :target: https://travis-ci.org/takluyver/backcall

Specifications for callback functions passed in to an API

If your code lets other people supply callback functions, it's important to
specify the function signature you expect, and check that functions support that.
Adding extra parameters later would break other peoples code unless you're careful.

backcall provides a way of specifying the callback signature using a prototype
function::

    from backcall import callback_prototype
    
    @callback_prototype
    def handle_ping(sender, delay=None):
        # Specify positional parameters without a default, and keyword
        # parameters with a default.
        pass
    
    def register_ping_handler(callback):
        # This checks and adapts the function passed in:
        callback = handle_ping.adapt(callback)
        ping_callbacks.append(callback)

If the callback takes fewer parameters than your prototype, *backcall* will wrap
it in a function that discards the extra arguments. If the callback expects
more arguments, a TypeError is thrown when it is registered.

For more details, see the `docs <http://backcall.readthedocs.org/en/latest/>`_ or
the `Demo notebook <http://nbviewer.ipython.org/github/takluyver/backcall/blob/master/Demo.ipynb>`_.

The tests are run with `pytest <http://pytest.org/latest/>`_. In the root directory,
execute::

    py.test
uptodate 0.3.4
Command line script checking if your requirements are uptodate
Keywords: requirements, requirements.txt, uptodate

# Uptodate
Program checking if your requirements are up to date.  
Only "Package==1.0" format is supported.

## Installations
```
pip install uptodate

```

## Examples
```
uptodate
uptodate requrements.txt
uptodate requrements.txt requirements-dev.txt
```
automl-utils 0.1.0a1
Facilitating reproducible AutoML research.
Requires Python: ~=3.7
Keywords: PyTorch AutoML NAS reproducibility

# AutoML Utils
While machine learning is facing a [reproducibility crisis](https://youtube.videoken.com/embed/jH0AgVcwIBc), the problem
is exacerbated in the subdiscipline of automated machine learning [[1](https://arxiv.org/abs/1902.07638), 
[2](https://arxiv.org/abs/1912.12522)] where the number of potential hyperparameters and variations in search and 
training regimens can be vast.

When combined with the duplication of code across projects, often with subtle differences in implementation, it can be
challenging to resolve whether changes in performance stem from improved methodology or from changes in configuration.

This repository aims to facilitate these comparisons by providing reference implementations of commonly used components.
It is designed to be minimal and unopinionated to ensure maximum flexibility for the researcher.

**Note**: This work is intentionally being released in an early state of development to enable use in other projects and
guide future efforts based on feedback received.