semvec/pypi-packages huggingface dataset:
algorithm-prep 0.0.2
Programming algorithm training package for programmers and students
Requires Python: >=3.6

#Algorithm Training for Python

This project is for programmers and students to practice the programming of algorithms. The test cases and example implementation are included and ready to use.

## Installation

```
$ pip install algorithm-training
```

## Usage

### Test your own algorithm

Let's take sorting algorithm as an example. You can create your own algorithm in a function, then add a main block to test your function.

```
from algorithm_training import test
from algorithm_training.classic.sort import test_cases

def my_sort_function(arr):
    # my implementation
    return arr

if __name__ == '__main__':
    test(my_sort_function, test_cases)
```

### Benchmark your algorithm against reference implementations

```
from algorithm_training import benchmark
from algorithm_training.classic.sort import algorithms, test_cases

def my_sort_function(arr):
    # my implementation
    return arr

if __name__ == '__main__':
    benchmark(my_sort_function, algorithms, test_cases)
```

## Implemented Algorithms

### Sort

Following import statement should be included in your code.

```
from algorithm_prep import test, benchmark
from algorithm_prep.classic.sort import test_cases, algorithms
```

Define your sorting function

```
def your_sort_algorithm(arr):
	"""
    :type arr: List[int]
    :rtype: List[int]
    """
	# your codes go here
```

To test the function

```
test(your_sort_algorithm, test_cases)
```

To benchmark your algorithm

```
benchmark(your_sort_algorithm, algorithms, test_cases)
```

Following reference algorithms are implemented for benchmark

* Bubble Sort
* Insertion Sort
* Merge Sort
* Quick Sort
* Heap Sort
* Radix Sort

### String Search
miniconfig 0.6.0
-
Requires Python: >=3.6

[![Build Status](https://travis-ci.org/podhmo/miniconfig.svg?branch=master)](https://travis-ci.org/podhmo/miniconfig) [![PyPi version](https://img.shields.io/pypi/v/miniconfig.svg)](https://pypi.python.org/pypi/miniconfig) [![](https://img.shields.io/badge/python-3.6+-blue.svg)](https://www.python.org/download/releases/3.6.0/) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://black.readthedocs.io/en/stable/)

# miniconfig

making configuration phase, in your application.
(Tiny version of almost pyramid's configurator object)

```python
# yourapp/__init__.py
from miniconfig import ConfiguratorCore


class Configurator(ConfiguratorCore):
    def make_app(self):
        self.commit()
        return App(self.settings)


class App:
    def __init__(self, settings):
        self.settings = settings
```

yourapp/pluginA.py

```python
class A:
    pass


def includeme(config):
    config.settings["A"] = A()
```

yourapp/pluginB.py

```python
class B:
    pass


def includeme(config):
    config.include(".pluginA")
    config.settings["B"] = B()
```

application user

```python
from yourapp import Configurator

config = Configurator()
config.include("yourapp.pluginB")
app = config.make_app()
print(app.settings.keys())  # dict_keys(['A', 'B'])
```

## Adding directives

directive means that action of configurator.

how to define and use directive

```python
def hello(config, name):
    def register():
        assert config.settings["foo"] == "foo"
        print("hello: {}".format(name))
    discriminator = (hello, name)
    config.action(discriminator, register)


config = Configurator(settings={"foo": "foo"})
config.add_directive("hello", hello)
config.hello("foo")
```

it is also supported that to define directives by dotted name

foo/bar.py

```python
def hello(config):
    def register():
        print("hai")
    discriminator = id(object())  # xxx
    config.action(discriminator, register)
```

yourapp

```python
config = Configurator()
config.add_directive("hello", "foo.bar:hello")
config.hello()
config.commit() # hai
```
PFX 1.0.3
PFX or Python-Effects is a PyPI package for adding effects onto Image Processing
Requires Python: >=3.6

# PFX
PFX or Python-Effects is a PyPI Package which helps in Standard Imaging Techniques.

## How to download :
Enter either of the pip commands on your console to install it.

`pip install PFX`  **or**  `pip install pfx`


## How to use
PFX can apply various effects to a given image

> **The result will be saved in the same file path, a prompt will also be shown as to where the file is saved!**

Following commands can be used:

#### 1. To convert an image into black and white :
```
pfx -bg "filepath.png"
```
**or**
```
pfx -black_white "filepath.png"
```

#### 2. To pixelate the given image :
```
pfx -p "filepath.png"
```
**or**
```
pfx -pixelate "filepath.png"
```
#### 3. To blur the given image :
```
pfx -b "filepath.png"
```
**or**
```
pfx -blur "filepath.png"
```
#### 4. To blur the given image's edges :
```
pfx -be "filepath.png"
```
**or**
```
pfx -bluredge "filepath.png"
```
#### 5. To create a thumbnail of the given image :
```
pfx -tn "filepath.png"
```
**or**
```
pfx -thumbnail "filepath.png"
```
#### 6. To create a PDF of the given image :
```
pfx -pdf "filepath.png"
```
**or**
```
pfx -makepdf "filepath.png"
```
## TL;DR 
Just execute the following snippet if you have an IQ level above average :
```
pfx -h
```
Then figure it out yourself!
## Any Issues:
- This is the first draft of the PYPI package.

- This is prone to bugs. Let me know if any issues come up.

- PFX is a dumb name, waiting for the real name's ownership to clear up.
## More imaging effects arriving soon...
- Feel free to share any open ideas!
phlab 0.0.0.dev5
Phonon contirbution in RIXS
Requires Python: >=3.6

# Package for calculating phonon contribution in RIXS

This package aims to create a convenient set of tools for fitting experimental data and obtaining electron-phonon coupling values from phonon contribution in resonant inelastic X-ray scattering cross-section.

It currently includes:
- Model for 1D harmonic oscillator interacting with a single electronic level.
- Model for 2D harmonic oscillator (two modes active).
- Model for 1D harmonic oscillator, distorted and displaced in the excited state (excited-state potential energy surface (PES), differs from the ground state one).

---
### Installation
It is a python based package and to install it you can simply run in terminal:

`$pip install phlab`

Download examples folder from this page and use it as a template for your projects. You may want to use Jupyter Notebooks, which comes with the examples. If you don't have [Jupyter](https://jupyter.org/documentation) install it  via `pip` as well:

`$pip install jupyterlab`
ktimeout 0.0.7
add timeout to any function
Requires Python: >=3.5

# ktimeout
![python_version](https://img.shields.io/static/v1?label=Python&message=3.5%20|%203.6%20|%203.7&color=blue) [![PyPI downloads/month](https://img.shields.io/pypi/dm/ktimeout?logo=pypi&logoColor=white)](https://pypi.python.org/pypi/ktimeout)

## Description
add timeout to any function

## Install
~~~~bash
pip install ktimeout
# or
pip3 install ktimeout
~~~~

## Usage
~~~~python
# CHECK 'demo.py' FOR ALL EXAMPLES
from typing import Optional
import time

from ktimeout import timeout

def func_with_arguments(sleep_time: float, extra_print: Optional[str] = None):
    while True:
        time.sleep(sleep_time)

        print('Sleeping', sleep_time, 'sec', extra_print or '')

def func():
    func_with_arguments(0.5, extra_print='called from func()')

try:
    timeout.run(func, 2)
except Exception as e:
    print(e)

try:
    timeout.run(
        timeout.partial(func_with_arguments, 0.25, extra_print='extra'),
        2
    )
except Exception as e:
    print(e)

try:
    with timeout.timeout(1):
        while True:
            sleep_time = 0.25
            time.sleep(sleep_time)

            print('Sleeping', sleep_time, 'sec')
except Exception as e:
    print(e)
~~~~
makeelf 0.3.4
ELF reader-writer library

MakeELF is a Python library to parse, modify and create ELF binaries. It provides following features:

 - easy to use, standard Python interface
 - reading existing ELF files to Python representation
 - modification of every aspect of ELF format structures
 - ability to skip any validation to test other parsers for potential errors
 - creating new valid ELF files with just one step
 - easy serialization of every structure present in ELF file