bluer-options 5.157.1__py3-none-any.whl → 5.162.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- bluer_options/.bash/list.sh +7 -0
- bluer_options/__init__.py +1 -1
- bluer_options/list/__main__.py +5 -1
- bluer_options/timer.py +15 -0
- {bluer_options-5.157.1.dist-info → bluer_options-5.162.1.dist-info}/METADATA +1 -1
- {bluer_options-5.157.1.dist-info → bluer_options-5.162.1.dist-info}/RECORD +9 -9
- {bluer_options-5.157.1.dist-info → bluer_options-5.162.1.dist-info}/WHEEL +0 -0
- {bluer_options-5.157.1.dist-info → bluer_options-5.162.1.dist-info}/licenses/LICENSE +0 -0
- {bluer_options-5.157.1.dist-info → bluer_options-5.162.1.dist-info}/top_level.txt +0 -0
bluer_options/.bash/list.sh
CHANGED
|
@@ -85,6 +85,13 @@ function bluer_ai_list_resize() {
|
|
|
85
85
|
"${@:3}"
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
+
function bluer_ai_list_reverse() {
|
|
89
|
+
python3 -m bluer_options.list \
|
|
90
|
+
reverse \
|
|
91
|
+
--items "$1" \
|
|
92
|
+
"${@:2}"
|
|
93
|
+
}
|
|
94
|
+
|
|
88
95
|
function bluer_ai_list_sort() {
|
|
89
96
|
python3 -m bluer_options.list \
|
|
90
97
|
sort \
|
bluer_options/__init__.py
CHANGED
bluer_options/list/__main__.py
CHANGED
|
@@ -7,7 +7,9 @@ from bluer_options.logger.config import logger
|
|
|
7
7
|
|
|
8
8
|
NAME = module.name(__file__, NAME)
|
|
9
9
|
|
|
10
|
-
LIST_OF_TASKS =
|
|
10
|
+
LIST_OF_TASKS = (
|
|
11
|
+
"filter|in|intersect|item|len|log|next|nonempty|prev|resize|reverse|sort"
|
|
12
|
+
)
|
|
11
13
|
|
|
12
14
|
parser = argparse.ArgumentParser(NAME)
|
|
13
15
|
parser.add_argument(
|
|
@@ -146,6 +148,8 @@ elif args.task == "prev":
|
|
|
146
148
|
print(prev_item)
|
|
147
149
|
elif args.task == "resize":
|
|
148
150
|
print(delim.join(list_of_items[: args.count] if args.count >= 0 else list_of_items))
|
|
151
|
+
elif args.task == "reverse":
|
|
152
|
+
print(delim.join(list_of_items[::-1]))
|
|
149
153
|
elif args.task == "sort":
|
|
150
154
|
if args.unique:
|
|
151
155
|
list_of_items = list(set(list_of_items))
|
bluer_options/timer.py
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import time
|
|
2
|
+
|
|
2
3
|
from bluer_options import string
|
|
4
|
+
from bluer_options.logger import logger
|
|
3
5
|
|
|
4
6
|
|
|
5
7
|
class Timer:
|
|
@@ -7,6 +9,7 @@ class Timer:
|
|
|
7
9
|
self,
|
|
8
10
|
period: int,
|
|
9
11
|
name: str,
|
|
12
|
+
log: bool = False,
|
|
10
13
|
):
|
|
11
14
|
self.count = 0
|
|
12
15
|
self.hot = False
|
|
@@ -15,6 +18,18 @@ class Timer:
|
|
|
15
18
|
self.name = name
|
|
16
19
|
self.start_time = time.time()
|
|
17
20
|
|
|
21
|
+
if log:
|
|
22
|
+
logger.info(
|
|
23
|
+
"{}: {} every {}.".format(
|
|
24
|
+
self.__class__.__name__,
|
|
25
|
+
name,
|
|
26
|
+
string.pretty_duration(
|
|
27
|
+
period,
|
|
28
|
+
include_ms=True,
|
|
29
|
+
),
|
|
30
|
+
)
|
|
31
|
+
)
|
|
32
|
+
|
|
18
33
|
def reset(self):
|
|
19
34
|
self.hot = False
|
|
20
35
|
self.last_hot = time.time()
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
bluer_options/__init__.py,sha256=
|
|
1
|
+
bluer_options/__init__.py,sha256=XCocAjniJkB01BG0-9PbE-GlcZgnNHWi0HtEW2tZOYQ,288
|
|
2
2
|
bluer_options/__main__.py,sha256=-6ce9W1uXkle4YtEYlSUMWxSmsur3dRDA4_MvNNhEVg,236
|
|
3
3
|
bluer_options/config.env,sha256=2AG3xuWiMqaNmlCNDWQOJ_AssKk7KXhn0XDIkHWNQ2Q,30
|
|
4
4
|
bluer_options/elapsed_timer.py,sha256=46e-g-bjC7J4hGOGKD12R90ficXzFYn84xlLX6l34I8,545
|
|
5
|
-
bluer_options/timer.py,sha256=
|
|
5
|
+
bluer_options/timer.py,sha256=UPmsfCjbEWpcjXgMpYemXieheMJH_UpuemhVGsKYVoE,2470
|
|
6
6
|
bluer_options/urls.py,sha256=paHaYlLMQOI46-EYNch5ohu9Q09BMkF2vvJy1QufrVI,19
|
|
7
7
|
bluer_options/.bash/alias.sh,sha256=8-t6sTIy3YjyMkFLArRc45U1lNBWWmG0dIhYuN3-wRo,890
|
|
8
8
|
bluer_options/.bash/assert.sh,sha256=3QvFWBS0-fyodXR7ZWIx5rCtQilrlV3r5zXQ8AZmsFg,1677
|
|
@@ -15,7 +15,7 @@ bluer_options/.bash/eval.sh,sha256=JnataqjT1-ROVvKjFJRud2b-jyLQqbHg6qOgmzQqYHc,8
|
|
|
15
15
|
bluer_options/.bash/generic_task.sh,sha256=o0W_XQqV9SfmhDiy3jegx6P9XQsLKWny7l931TlIICQ,1205
|
|
16
16
|
bluer_options/.bash/help.sh,sha256=n0JnRWmqigfbJfyxBQ4WZaOsCdLL-ctN2U5C0Kuv0JQ,591
|
|
17
17
|
bluer_options/.bash/install.sh,sha256=lUF5Pfs7ND0UJTjopGU_P5VTspKHL3eaB3jj9VqWAt0,594
|
|
18
|
-
bluer_options/.bash/list.sh,sha256=
|
|
18
|
+
bluer_options/.bash/list.sh,sha256=CumfbaPqEc4Pkh_n4Hex7QZ_ub7JloU0HoVxsRiat3o,1879
|
|
19
19
|
bluer_options/.bash/logging.sh,sha256=pxfTELOanA7OOJeZnS8mMsF4OmlbF_2w47IpdZoynUA,1533
|
|
20
20
|
bluer_options/.bash/open.sh,sha256=WjQn-4iNLuAsxfmhu-nUQcFCYhM4iaLRV17uqg7Ahps,614
|
|
21
21
|
bluer_options/.bash/options.sh,sha256=2geExu7e_bHYBqajTdUbvssO53FNMC5G2FDGDI-hd-M,587
|
|
@@ -50,7 +50,7 @@ bluer_options/host/__init__.py,sha256=Cy_zamSTzv7F2sktvO6_gdK21eeps4FI7EIaltXU7U
|
|
|
50
50
|
bluer_options/host/__main__.py,sha256=A0Z-sAG9lVpQx9ULzroAINPw2sZyzouUvwrYU_8QtSs,775
|
|
51
51
|
bluer_options/host/functions.py,sha256=SZnEaPp1dvQuWi8K_skwI3wQXr7PKtwUBI1qJ2RqoIM,4036
|
|
52
52
|
bluer_options/list/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
53
|
-
bluer_options/list/__main__.py,sha256=
|
|
53
|
+
bluer_options/list/__main__.py,sha256=er69iqdooU9Hb-7Vl6CAUMgQmZApSq_BTDnLT4xCjWI,3646
|
|
54
54
|
bluer_options/logger/__init__.py,sha256=RBE9wNeOlBcbQFCYjJEbTMvCmY-aqKdZ-uNRJYTBzP4,137
|
|
55
55
|
bluer_options/logger/config.py,sha256=4wzy55DpBcTBC7d8krhwd1ZKeBfrdZ6koc3lup14EvI,3198
|
|
56
56
|
bluer_options/options/__init__.py,sha256=q0Ymi9oCBwgN0g7NVeYh4XgiICOtH8W8Wuaa52NH-rw,50
|
|
@@ -63,8 +63,8 @@ bluer_options/string/functions.py,sha256=cvP4_b0CUk3xXWLTpqy17NOw8ldiiUx3GLpggap
|
|
|
63
63
|
bluer_options/terminal/__init__.py,sha256=kyNhbC5NVCuqrUhbbTeAOTW1ZO7MRRbi0RtXGBFKtJc,73
|
|
64
64
|
bluer_options/terminal/__main__.py,sha256=3o465bp44c2f1KHDn4j664hpbvu8wKOwQ2c1OPoa6Xc,902
|
|
65
65
|
bluer_options/terminal/functions.py,sha256=A23uHLeU4JIctmecOFk_KhIfOeHu-WMjnSzBj2KiF3U,1947
|
|
66
|
-
bluer_options-5.
|
|
67
|
-
bluer_options-5.
|
|
68
|
-
bluer_options-5.
|
|
69
|
-
bluer_options-5.
|
|
70
|
-
bluer_options-5.
|
|
66
|
+
bluer_options-5.162.1.dist-info/licenses/LICENSE,sha256=ogEPNDSH0_dhiv_lT3ifVIdgIzHAqNA_SemnxUfPBJk,7048
|
|
67
|
+
bluer_options-5.162.1.dist-info/METADATA,sha256=_tm4RLSYPOLrncZveWkbcGXwt8tJPG4incvJgjQMnYw,4951
|
|
68
|
+
bluer_options-5.162.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
69
|
+
bluer_options-5.162.1.dist-info/top_level.txt,sha256=yw9slt8n3R7IiYmf83OtHtB8Z-EgP9UwyQTk1EGiAJU,14
|
|
70
|
+
bluer_options-5.162.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|