- Notifications
You must be signed in to change notification settings - Fork0
Toolkit to manage sets of closed intervals.
License
NotificationsYou must be signed in to change notification settings
oar-team/procset.py
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Toolkit to manage sets of closed intervals.
procset is a pure python module to manage sets of closed intervals. It can beused as a small python library to manage sets of resources, and is especiallyuseful when writing schedulers.
- Free Software: licensed under LGPLv3 (seeLICENSE.rst).
- Pure Python module :)
- Thoroughly tested!
- Drop-in replacement for interval_set (seeintsetwrap.py).
- The provided implementation target only Python 3 (I do not want to maintainold stuff :P).
- The intervals bounds have to be non-negative integers.
- setuptools>=34.4.0
What does it look like to useprocset? Here is a simple example program:
fromprocsetimportProcSetfree_cores=ProcSet((0,7))# I have 8 cores to work withjob_cores=ProcSet((2,5))# let's use some cores for a jobfree_cores-=job_coresprint('remaining cores:',str(free_cores))
And it looks like this when run:
$ python example.pyremaining cores: 0-1 6-7
About
Toolkit to manage sets of closed intervals.
Topics
Resources
License
Contributing
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
No packages published
Uh oh!
There was an error while loading.Please reload this page.