A bunch tools I have created over the years
Project description
Slurm
This is a collection of tools I have used over the years collected together.
Storage
from slurm import storage
pick = storage.read("file.pickle")
yaml = storage.read("file.yaml")
json = storage.read("file.json")
json = storage.read("file", "json")
data = [1,2,3,4]
storage.write("tom.pickle", data)
storage.write("bob.json", data)
storage.write("guess.file", data, "yml")
Network
from slurm import network
ip = network.get_ip()
print(ip)
Sleep Rate
Will sleep for a prescribed amount of time inside of a loop irregardless of how long the loop takes
from slurm.rate import Rate
rate = Rate(10) # let loop run at 10 Hz
while True:
# so some processing
rate.sleep()
Files
from slurm.files import rmdir, mkdir, run
mkdir("some/path")
rmdir("some/path")
MIT License
Copyright (c) 2014 Kevin J. Walchko
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file slurm-0.4.0.tar.gz
.
File metadata
- Download URL: slurm-0.4.0.tar.gz
- Upload date:
- Size: 6.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.2 CPython/3.7.5 Linux/5.3.0-40-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 971501101fa7ab50f5b33e6a881ff18a5f8bf006c78555c00fb9e32ea44b5766 |
|
MD5 | f706077b8ee8bbf31506a9f4ca7fd4f0 |
|
BLAKE2b-256 | af91bcd977263f3a68f7dc64d7faa565321e5438924895a0ae62aafd7286bcf3 |
File details
Details for the file slurm-0.4.0-py3-none-any.whl
.
File metadata
- Download URL: slurm-0.4.0-py3-none-any.whl
- Upload date:
- Size: 8.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.2 CPython/3.7.5 Linux/5.3.0-40-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d255342bde85b104c4faccbf22524133b9d126db59638465a3ba2499118dff11 |
|
MD5 | f16583a5107db0b0d183f5b7aeafa473 |
|
BLAKE2b-256 | 550d3a037592336885684e7f3724aec2f9d7d81cebe6b4f6723e2614f215490b |