semvec/pypi-packages huggingface dataset:
dispatch-reactor 2.1.1
Module for dispatching jobs and timed operations
Keywords: tools

# dispatch
Python package for timed dispatching of events or work

# Usage

	### The Reactor ###
	from dispatch import Reactor

	r = Reactor()
	# The dispatch function needs two parameters, a schedule and an action
	schedule = r.schedule_interval(seconds=2) # Run every 2 seconds
	action = r.action(print, "hello") # Call the print function with the parameter "hello"
	r.dispatch(schedule, action)
	r.run()
	

	### The Actions ###
	# There are two helper functions that build actions based on functions:
	
	r.action(func, parameter, parameter2, kwarg1=value) # Runs in main loop
	r.background_action(func, parameter, parameter2, kwarg1=value) # Runs in new thread

	### The Schedules ###
	# A schedule is just an iterator that returns timestamps but there are 
	# several constructors included which make needing to write one rare

	from datetime import datetime

	# Run once on April 1st 2012 at 4 am
	r.schedule_one_time(datetime(2020,4,1,4)) 

	# Run on August 5th and 8th, 2020 
	timestamps = [datetime(2020, 8, 1), datetime(2020, 8, 5)]
	schedule = iter(timestamps) 

	# To run at 8am and 5pm on Tuesdays and thursdays
	r.schedule_calendar(days_of_week=["Tuesday", "Thursday"], hours=[8, 17])

	# To run hourly on the 15th minute
	r.schedule_hourly(minute=15)

	# To run daily at 5:12 pm 
	r.schedule_daily(hour=17, minute=12)

	# To run every hour and a half
	r.schedule_interval(hours=1, minutes=30)

	# To run every 26 hours till the year 2020 
	r.schedule_interval(days=1 hours=2, till=datetime(2020, 1, 1))

	# To run on the 1st 5th, 10th, 15th, 20th, and 25th of the month @ midnight
	r.schedule_calendar(days=[1,5,10,15,20,25])

	# To run mondays on every hour 
	r.schedule_calendar(days_of_week=['Monday'], hours='*')
svart 1.0.0
Change between dark/light mode depending on the ambient light intensity

<h1 align="center">
svart
</h1>
<p align="center">
Change between dark/light mode depending on the ambient light intensity
<img src="images/preview.gif" align="center">
<br>

## Installation

### Install using `pip`
```console
$ python3 -m pip install --user svart
```

### Install using `git`
```
$ git clone git@github.com:sdushantha/svart.git
$ cd svart
$ python3 setup.py install
```

## Usage
```console
$ svart --help
usage: svart [options]

positional arguments:
  ambient               Dark mode when ambient light reaches this level (default: 1,100,000) (commas are not needed)

optional arguments:
  -h, --help            show this help message and exit
  --verbose, -v, --debug, -d
                        Show some information that might be useful during debugging
  --timeout TIMEOUT, -t TIMEOUT
                        Seconds between each check of the ambient level (default: 0)
  --version             Show version number
 ```
trade-py-core 0.0.26
Helpers core for python micro services
Requires Python: >=3.6

# ZPy Flask MSC
> Zurck'z  Py Flask Micro Services

This package contains some helpers for python microservices using Flask framework

## Installation

Use the package manager [pip](https://pip.pypa.io/en/stable/) to install py flask micro service core .

```bash
pip install trade-py-core
```

## Usage

```python
#Define api
@api(base='/v1', config=config,hooks=hk,middlewares=mw)
def create_api():
    #Define all dependencies for enterprise resources
    service = CompanyService(repository=CompanyRepositoryImpl(db))
    #Set all supported resource for this web service.
    return \
    [
        ZResource('/', CompanyResource,service=service),
        ...
    ]
```

## 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/)

## Authors
[Noé Cruz](noe.isc20@gmail.com)
MiSiC 1.0.10
Microbe segmentation in dense colonies
Requires Python: >=3.5

# MiSiC
### Microbe segmentation in dense colonies.

## Installation
Requires version python version 3.6/7

`pip install MiSiC`


## Usage

### use package
```python
from MiSiC.MiSiC import *
from skimage.io import imsave,imread
from skimage.transform import resize,rescale

filename = 'awesome_image.tif'

# read image using your favorite package
im = imread(filename)

# Parameters that need to be changed
## Ideally, use a single image to fine tune two parameters : mean_width and noise_variance (optional)

#input the approximate mean width of microbe under consideration
mean_width = 8

# compute scaling factor
scale = (10/mean_width)

# Initialize MiSiC
misic = MiSiC()

# preprocess using inbuit function or if you are feeling lucky use your own preprocessing
im = rescale(im,scale,preserve_range = True)

# add local noise
img = add_noise(im,sensitivity = 0.13,invert = True)

# segment
yp = misic.segment(img,invert = True)
yp = resize(yp,[sr,sc,-1])

# watershed based post processing
yp = postprocess_ws(img,yp)

# save 8-bit segmented image and use it as you like
imsave('segmented.tif', yp.astype(np.uint8))
''''

### In case of gpu error, one might need to disabple gpu before importing MiSiC [ os.environ["CUDA_VISIBLE_DEVICES"]="-1" ]
naddrtools 0.1.2
A module for manipulating IP addresses, ranges, and networks, supplementing the netaddr module.
Requires Python: >=3.6

# naddrtools
**naddrtools** is a simple library for manipulating IP addresses, ranges, and networks and acts as an extension of the netaddr module.

```
>>> import naddrtools as nat
>>> mylist = ["100.25.13.11", "172.20.31.0/24", "172.20.30.1 - 172.20.30.254"]
>>> ipset = nat.build_ipset(mylist, buff_network_ranges=True)
>>> print(ipset)
IPSet(['100.25.13.11/32', '172.20.30.0/23'])
>>> print(nat.convert_ipset_to_ranges_as_string(ipset))
100.25.13.11, 172.20.30.0 - 172.20.31.255
```

## Installing naddrtools
naddrtools is available on PyPI:

```console
$ python -m pip install naddrtools
```