No project description provided
Project description
Random Tools
random_tools.Signal
from random_tools import Signal
on_event = Signal()
on_event.connect(print)
on_event.emit("this will be printed")
random_tools.true_every
from random_tools import true_every
this_true_every_3_calls = true_every(3) # will return True every 3 calls
false_1 = next(this_true_every_3_calls) # False
false_2 = next(this_true_every_3_calls) # False
true_1 = next(this_true_every_3_calls) # True
false_3 = next(this_true_every_3_calls) # False
false_4 = next(this_true_every_3_calls) # False
true_2 = next(this_true_every_3_calls) # True
random_tools.CSS4_ColorPicker
A tool for sampling CSS4 compatible color names
from random_tools import CSS4_ColorPicker
color_picker = CSS4_ColorPicker()
colors = set()
for i in range(nb_color):
color = color_picker.sample_color()
assert color not in colors
colors.add(color)
# The picker reset automatiquely when all color have been sampled
# but you can reset it manually too
color_picker.reset()
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
random_tools-0.2.0.tar.gz
(2.3 kB
view hashes)
Built Distribution
Close
Hashes for random_tools-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5280063cf492026c0ce301aad67c01c5cc909d11184e9d2c53980dc18defe60c |
|
MD5 | fdfd958e47a04580e2c4266cc0946cc9 |
|
BLAKE2b-256 | fa1106fd2c196a5e1005ac52321e85a72f8661f7b184b2519aeddf0da137e08f |