semvec/pypi-packages huggingface dataset:
swe-airflow-tools 0.0.3
Tools for Apache Airflow Application

# Apache Airflow Tools

Shared tools for Apache Airflow

## Generating distribution archives

Update setuptools from pip:

```
python3 -m pip install --user --upgrade setuptools wheel
```

Generete setup:

```
python3 setup.py sdist bdist_wheel
```

Install Twine:

```
python3 -m pip install --user --upgrade twine
```

Upload files in [Pypi](https://test.pypi.org/account/register/).

```
python3 -m twine upload --repository-url https://test.pypi.org/legacy/ dist/*
```

Install and test your package:

```
python3 -m pip install --index-url https://test.pypi.org/simple/ example-pkg-your-username
```
skasip-pbc 1.3.1a1
SIP Processing Block Controller library.

# SKA SDP SIP Processing Block Controller

This package contains a Celery worker for executing Processing Block 
workflows within the SDP SIP prototype code. This is implemented as a set 
of [Celery](http://www.celeryproject.org/) tasks which can be used to 
asynchronously execute SIP Processing Block workflows on a Processing
Block Controller (*Celery Worker*) instance.

## Library installation

```bash
pip install skasip-pbc
```

## Starting a containerised PBC instance

For the Processing Block Controller to function, a *Redis Database* instance
must be created, which provides the role of the *Celery Broker* and 
*Execution Control Configuration Database*. Once this is available,
a *Processing Block Controller (Celery Worker)* can be started. 

For the *Redis Database*m a standard redis container can be started (eg. using 
the official [`redis:5.0.1-alpine`](https://hub.docker.com/r/library/redis/) 
image). *The Processing Block Controller Celery worker* can be started using 
the image [`skasip/processing_block_controller`](https://cloud.docker.com/u/skasip/repository/docker/skasip/processing_block_controller).  

A Docker Compose file (`docker-compose.dev.yml`) is provided in this folder 
for starting a Redis instance and a PBC Celery worker. This can be used with
the following command: 

```bash
docker stack deploy -c docker-compose.dev.yml pbc
``` 


## Typical usage

**Note:** Requires a *Celery Worker*, *Celery Broker*, and a
*SKA SIP Execution Control Configuration Database* instance are running 
(see above)!  

```python
# coding: utf-8
"""Example SIP PBC usage."""
import sip_pbc

# Get the PBC version.
result = sip_pbc.version.delay()
version = result.get(timeout=1)
print(version)

# Execute a PB workflow.
result = sip_pbc.execute_processing_block.delay(pb_id='...')
```
durham-XNet 0.0.4
A CNN to segment X-Ray images

# XNet

XNet is a Convolutional Neural Network designed for the segmentation
of X-Ray images into bone, soft tissue and open beam
regions. Specifically, it performs well on small datasets with the aim
to minimise the number of false positives in the soft tissue class.

## Architecture

![](./Images/architecture.jpg)

* Built on a typical encoder-decoder architecture as
inspired by [SegNet](http://mi.eng.cam.ac.uk/projects/segnet/).

* Additional feature extraction stage, with weight sharing across some
  layers.

* Fine and coarse grained feature preservation through concatenation
  of layers.

* L2 regularisation at each of the convolutional layers, to decrease overfitting. 

The architecture is described in the ```XNet.py``` file.

## Output

XNet outputs a mask of equal size to the input images.

![](./Images/predictions.png)

## Training

XNet is trained on a small dataset which has undergone
augmention. Examples of this augmentation step can be found in the
```augmentations.ipynb``` notebook in the ```Augmentations``` folder. Similarly the ```Training``` folder contains python scripts that perform the necessary augementations.

Running ```train.py``` from the ```Training``` folder calls various other scripts to perform one of two possible ways of augmenting the images:

* 'On the fly augmentation' where a new set of augmentations is generated at each epoch.

* Pre-augmented images.

## Benchmarking

XNet was benchmarked against two of the leading segmentation networks:

* Simplified [SegNet](https://arxiv.org/abs/1511.00561) (found in the
  ```SimpleSegNet.py``` file)

* [UNet](https://arxiv.org/abs/1505.04597) (found in the ```UNet.py```
  file)

## Data

We trained on a dataset of:

* 150 X-Ray images.

* No scatter correction.

* 1500x1500 ```.tif``` image downsampled to 200x200

* 20 human body part classes.

* Highly imbalanced.

As this work grew out of work with a corporation we are sadly unable to share the propriatory data we used.

## More information

For more information and context see the conference poster
```Poster.pdf```.

Please note that some of the path variables may need to be corrected in order to utilise the current filing system. These are planned to be updated in the future.
pygamemadeeasy 2019.2.11
A module intended to abstract away some of the complexity of using PyGame for beginner programmers.
Requires Python: >=3
Keywords: python pygame beginner

# Pygame Made Easy

This project aims to some of the complexity of using Pygame for beginner level programmers.

This project has been initially developed for use within my own classes that I teach but I hope it might find use for others too.

## PROJECT HOME

* [PygameMadeEasy](https://pbaumgarten.com/pygamemadeeasy)

## INSTALL

```
pip install pygame pygamemadeeasy
```

## USAGE

Sorry, documentation still to come :-(

## AUTHOR

* [Paul Baumgarten](https://pbaumgarten.com/)

## LICENSE

MIT License (C) 2019 Paul Baumgarten
drf-replace-ordering-filter 1.0.1
Django Rest Framework OrderingFilter backend to replace field name in ordering params.

# drf-replace-ordering-filter
Django Rest Framework OrderingFilter backend to replace field name in ordering params.

This package is useful if you have custom hidden fields in you model to help with a better ordering.

## Usage
You can user ```ReplaceFieldOrderingFilter``` as a Default Filter Backend in Rest Framework setting or specifying in a certain APIView.

```ReplaceFieldOrderingFilter``` works in the same way as ```rest_framework.filters.OrderingFilter```, if you do not define fields in a View to be replaced.


### 1. As a default setting
First of all, add ```ReplaceFieldOrderingFilter``` to DEFAULT_FILTER_BACKENDS in ```setting.py``` file of your Django's project.

``` python
REST_FRAMEWORK = {
  'DEFAULT_FILTER_BACKENDS': (
    'drf_replace_ordering_filter.filters.ReplaceFieldOrderingFilter',
  )
}
```

Lastly, in a view that you want to change some ordering filed to another, add the following attribute.

```python
from rest_framework import views


class MyAPIView(views.APIView):
  replace_ordering_fields = {
    'field_to_be_replaced': 'new_field'
  }

  def get(self, request, *args, **kwargs):
    pass
```

### 2. In a specific view
The second option is using ```ReplaceFieldOrderingFilter``` only in a specfic view or viewset.

For example:

```python
from drf_replace_ordering_filter.filters import ReplaceFieldOrderingFilter
from rest_framework import views


class MyAPIView(views.APIView):
  filter_backends = (ReplaceFieldOrderingFilter,)
  replace_ordering_fields = {
    'field_to_be_replaced': 'new_field'
  }

  def get(self, request, *args, **kwargs):
    pass
```
repathlib 0.1.5
pathlib with regular expressions

# `repathlib`

`repathlib` is a package that combines
[`repathlib`](https://docs.python.org/3/library/pathlib.html) and
[`re`](https://docs.python.org/3/library/re.html), enabling you to
search, match, etc., on `Path` objects, and to search directories with
`Path.reiterdir`: 

```python
from repathlib import Path
docs = Path('docs')
docs.search('d[a-z]+')
```
`<re.Match object; span=(0, 4), match='docs'>`

```python
list(docs.reiterdir('\.rst'))
```
`[PosixPath('docs/api.rst'), PosixPath('docs/index.rst')]`

Complete documentation is on [readthedocs](https://repathlib.readthedocs.io/en/latest/).