python-misc-utils 0.2__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.
- py_misc_utils/__init__.py +0 -0
- py_misc_utils/abs_timeout.py +12 -0
- py_misc_utils/alog.py +311 -0
- py_misc_utils/app_main.py +179 -0
- py_misc_utils/archive_streamer.py +112 -0
- py_misc_utils/assert_checks.py +118 -0
- py_misc_utils/ast_utils.py +121 -0
- py_misc_utils/async_manager.py +189 -0
- py_misc_utils/break_control.py +63 -0
- py_misc_utils/buffered_iterator.py +35 -0
- py_misc_utils/cached_file.py +507 -0
- py_misc_utils/call_limiter.py +26 -0
- py_misc_utils/call_result_selector.py +13 -0
- py_misc_utils/cleanups.py +85 -0
- py_misc_utils/cmd.py +97 -0
- py_misc_utils/compression.py +116 -0
- py_misc_utils/cond_waiter.py +13 -0
- py_misc_utils/context_base.py +18 -0
- py_misc_utils/context_managers.py +67 -0
- py_misc_utils/core_utils.py +577 -0
- py_misc_utils/daemon_process.py +252 -0
- py_misc_utils/data_cache.py +46 -0
- py_misc_utils/date_utils.py +90 -0
- py_misc_utils/debug.py +24 -0
- py_misc_utils/dyn_modules.py +50 -0
- py_misc_utils/dynamod.py +103 -0
- py_misc_utils/env_config.py +35 -0
- py_misc_utils/executor.py +239 -0
- py_misc_utils/file_overwrite.py +29 -0
- py_misc_utils/fin_wrap.py +77 -0
- py_misc_utils/fp_utils.py +47 -0
- py_misc_utils/fs/__init__.py +0 -0
- py_misc_utils/fs/file_fs.py +127 -0
- py_misc_utils/fs/ftp_fs.py +242 -0
- py_misc_utils/fs/gcs_fs.py +196 -0
- py_misc_utils/fs/http_fs.py +241 -0
- py_misc_utils/fs/s3_fs.py +417 -0
- py_misc_utils/fs_base.py +133 -0
- py_misc_utils/fs_utils.py +207 -0
- py_misc_utils/gcs_fs.py +169 -0
- py_misc_utils/gen_indices.py +54 -0
- py_misc_utils/gfs.py +371 -0
- py_misc_utils/git_repo.py +77 -0
- py_misc_utils/global_namespace.py +110 -0
- py_misc_utils/http_async_fetcher.py +139 -0
- py_misc_utils/http_server.py +196 -0
- py_misc_utils/http_utils.py +143 -0
- py_misc_utils/img_utils.py +20 -0
- py_misc_utils/infix_op.py +20 -0
- py_misc_utils/inspect_utils.py +205 -0
- py_misc_utils/iostream.py +21 -0
- py_misc_utils/iter_file.py +117 -0
- py_misc_utils/key_wrap.py +46 -0
- py_misc_utils/lazy_import.py +25 -0
- py_misc_utils/lockfile.py +164 -0
- py_misc_utils/mem_size.py +64 -0
- py_misc_utils/mirror_from.py +72 -0
- py_misc_utils/mmap.py +16 -0
- py_misc_utils/module_utils.py +196 -0
- py_misc_utils/moving_average.py +19 -0
- py_misc_utils/msgpack_streamer.py +26 -0
- py_misc_utils/multi_wait.py +24 -0
- py_misc_utils/multiprocessing.py +102 -0
- py_misc_utils/named_array.py +224 -0
- py_misc_utils/no_break.py +46 -0
- py_misc_utils/no_except.py +32 -0
- py_misc_utils/np_ml_framework.py +184 -0
- py_misc_utils/np_utils.py +346 -0
- py_misc_utils/ntuple_utils.py +38 -0
- py_misc_utils/num_utils.py +54 -0
- py_misc_utils/obj.py +73 -0
- py_misc_utils/object_cache.py +100 -0
- py_misc_utils/object_tracker.py +88 -0
- py_misc_utils/ordered_set.py +71 -0
- py_misc_utils/osfd.py +27 -0
- py_misc_utils/packet.py +22 -0
- py_misc_utils/parquet_streamer.py +69 -0
- py_misc_utils/pd_utils.py +254 -0
- py_misc_utils/periodic_task.py +61 -0
- py_misc_utils/pickle_wrap.py +121 -0
- py_misc_utils/pipeline.py +98 -0
- py_misc_utils/remap_pickle.py +50 -0
- py_misc_utils/resource_manager.py +155 -0
- py_misc_utils/rnd_utils.py +56 -0
- py_misc_utils/run_once.py +19 -0
- py_misc_utils/scheduler.py +135 -0
- py_misc_utils/select_params.py +300 -0
- py_misc_utils/signal.py +141 -0
- py_misc_utils/skl_utils.py +270 -0
- py_misc_utils/split.py +147 -0
- py_misc_utils/state.py +53 -0
- py_misc_utils/std_module.py +56 -0
- py_misc_utils/stream_dataframe.py +176 -0
- py_misc_utils/streamed_file.py +144 -0
- py_misc_utils/tempdir.py +79 -0
- py_misc_utils/template_replace.py +51 -0
- py_misc_utils/tensor_stream.py +269 -0
- py_misc_utils/thread_context.py +33 -0
- py_misc_utils/throttle.py +30 -0
- py_misc_utils/time_trigger.py +18 -0
- py_misc_utils/timegen.py +11 -0
- py_misc_utils/traceback.py +49 -0
- py_misc_utils/tracking_executor.py +91 -0
- py_misc_utils/transform_array.py +42 -0
- py_misc_utils/uncompress.py +35 -0
- py_misc_utils/url_fetcher.py +157 -0
- py_misc_utils/utils.py +538 -0
- py_misc_utils/varint.py +50 -0
- py_misc_utils/virt_array.py +52 -0
- py_misc_utils/weak_call.py +33 -0
- py_misc_utils/work_results.py +100 -0
- py_misc_utils/writeback_file.py +43 -0
- python_misc_utils-0.2.dist-info/METADATA +36 -0
- python_misc_utils-0.2.dist-info/RECORD +117 -0
- python_misc_utils-0.2.dist-info/WHEEL +5 -0
- python_misc_utils-0.2.dist-info/licenses/LICENSE +13 -0
- python_misc_utils-0.2.dist-info/top_level.txt +1 -0
py_misc_utils/varint.py
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import numpy as np
|
|
2
|
+
|
|
3
|
+
from . import alog
|
|
4
|
+
from . import assert_checks as tas
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
def varint_encode(v, encbuf):
|
|
8
|
+
if isinstance(v, (int, np.integer)):
|
|
9
|
+
tas.check_ge(v, 0, msg=f'Cannot encode negative values: {v}')
|
|
10
|
+
|
|
11
|
+
cv = v
|
|
12
|
+
while (cv & ~0x7f) != 0:
|
|
13
|
+
encbuf.append(0x80 | (cv & 0x7f))
|
|
14
|
+
cv >>= 7
|
|
15
|
+
|
|
16
|
+
encbuf.append(cv & 0x7f)
|
|
17
|
+
elif hasattr(v, '__iter__'):
|
|
18
|
+
for xv in v:
|
|
19
|
+
varint_encode(xv, encbuf)
|
|
20
|
+
else:
|
|
21
|
+
alog.xraise(RuntimeError, f'Unsupported type: {v} ({type(v)})')
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def _varint_decode(encbuf, pos):
|
|
25
|
+
value, cpos, nbits = 0, pos, 0
|
|
26
|
+
while True:
|
|
27
|
+
b = encbuf[cpos]
|
|
28
|
+
value |= (b & 0x7f) << nbits
|
|
29
|
+
nbits += 7
|
|
30
|
+
cpos += 1
|
|
31
|
+
if (b & 0x80) == 0:
|
|
32
|
+
break
|
|
33
|
+
|
|
34
|
+
return value, cpos
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
def varint_decode(encbuf):
|
|
38
|
+
values, cpos = [], 0
|
|
39
|
+
try:
|
|
40
|
+
while cpos < len(encbuf):
|
|
41
|
+
value, cpos = _varint_decode(encbuf, cpos)
|
|
42
|
+
values.append(value)
|
|
43
|
+
except IndexError:
|
|
44
|
+
# Handle out-of-range buffer access outside, to avoid checks within the inner loop.
|
|
45
|
+
enc_data = ','.join(f'0x{x:02x}' for x in encbuf[cpos: cpos + 10])
|
|
46
|
+
alog.xraise(ValueError,
|
|
47
|
+
f'Invalid varint encoded buffer content at offset {cpos}: {enc_data} ...')
|
|
48
|
+
|
|
49
|
+
return values
|
|
50
|
+
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import collections
|
|
2
|
+
|
|
3
|
+
import numpy as np
|
|
4
|
+
|
|
5
|
+
from . import core_utils as cu
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
def _compute_shape(data, indices):
|
|
9
|
+
shape = [len(indices)]
|
|
10
|
+
if shape[0] > 0:
|
|
11
|
+
t = data[indices[0]]
|
|
12
|
+
shape.extend(cu.compute_shape(t))
|
|
13
|
+
|
|
14
|
+
return tuple(shape)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class VirtArray(collections.abc.Sequence):
|
|
18
|
+
|
|
19
|
+
def __init__(self, data, indices):
|
|
20
|
+
super().__init__()
|
|
21
|
+
self.data = data
|
|
22
|
+
self.indices = indices if isinstance(indices, np.ndarray) else np.array(indices)
|
|
23
|
+
self.shape = _compute_shape(data, indices)
|
|
24
|
+
|
|
25
|
+
def __getitem__(self, i):
|
|
26
|
+
if isinstance(i, slice):
|
|
27
|
+
return type(self)(self.data, self.indices[i])
|
|
28
|
+
|
|
29
|
+
return self.data[self.indices[i]]
|
|
30
|
+
|
|
31
|
+
def __len__(self):
|
|
32
|
+
return len(self.indices)
|
|
33
|
+
|
|
34
|
+
def to_numpy(self, dtype=None):
|
|
35
|
+
parts = [self.data[i] for i in self.indices]
|
|
36
|
+
if not parts:
|
|
37
|
+
return np.empty((0,))
|
|
38
|
+
if not isinstance(parts[0], np.ndarray):
|
|
39
|
+
parts = [np.array(x) for x in parts]
|
|
40
|
+
|
|
41
|
+
npa = np.stack(parts, axis=0)
|
|
42
|
+
|
|
43
|
+
return npa.astype(dtype) if dtype is not None else npa
|
|
44
|
+
|
|
45
|
+
def __array__(self, dtype=None):
|
|
46
|
+
return self.to_numpy(dtype=dtype)
|
|
47
|
+
|
|
48
|
+
def shuffle(self, rng=None):
|
|
49
|
+
if rng is None:
|
|
50
|
+
rng = np.random.default_rng()
|
|
51
|
+
rng.shuffle(self.indices)
|
|
52
|
+
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import weakref
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class _Gone:
|
|
5
|
+
pass
|
|
6
|
+
|
|
7
|
+
GONE = _Gone()
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class WeakCall:
|
|
11
|
+
|
|
12
|
+
def __init__(self, fn, *args, **kwargs):
|
|
13
|
+
if isinstance(fn, weakref.WeakMethod):
|
|
14
|
+
self._fn = fn
|
|
15
|
+
elif hasattr(fn, '__self__'):
|
|
16
|
+
self._fn = weakref.WeakMethod(fn)
|
|
17
|
+
else:
|
|
18
|
+
self._fn = lambda: fn
|
|
19
|
+
|
|
20
|
+
self._args = args
|
|
21
|
+
self._kwargs = kwargs
|
|
22
|
+
|
|
23
|
+
def __call__(self, *args, **kwargs):
|
|
24
|
+
fn = self._fn()
|
|
25
|
+
if fn is not None:
|
|
26
|
+
cargs = self._args + args
|
|
27
|
+
ckwargs = self._kwargs.copy()
|
|
28
|
+
ckwargs.update(kwargs)
|
|
29
|
+
|
|
30
|
+
return fn(*cargs, **ckwargs)
|
|
31
|
+
else:
|
|
32
|
+
return GONE
|
|
33
|
+
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import contextlib
|
|
2
|
+
import hashlib
|
|
3
|
+
import os
|
|
4
|
+
import pickle
|
|
5
|
+
|
|
6
|
+
from . import fs_utils as fsu
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class WorkException:
|
|
10
|
+
|
|
11
|
+
def __init__(self, exception, **kwargs):
|
|
12
|
+
# Some exceptions cannot be pickled, so the real exception cannot be serialized
|
|
13
|
+
# (or it can be serialized, and failed to be deserialized for missing arguments).
|
|
14
|
+
# In such cases we write a generic exception with the string representation of
|
|
15
|
+
# the original one.
|
|
16
|
+
self._ex_type = type(exception)
|
|
17
|
+
try:
|
|
18
|
+
self._ex_data = pickle.dumps(exception)
|
|
19
|
+
pickle.loads(self._ex_data)
|
|
20
|
+
except:
|
|
21
|
+
self._ex_data = pickle.dumps(Exception(repr(exception)))
|
|
22
|
+
|
|
23
|
+
for k, v in kwargs.items():
|
|
24
|
+
setattr(self, k, v)
|
|
25
|
+
|
|
26
|
+
def do_raise(self):
|
|
27
|
+
raise self.exception()
|
|
28
|
+
|
|
29
|
+
def is_instance(self, *types):
|
|
30
|
+
return any(t == self._ex_type for t in types)
|
|
31
|
+
|
|
32
|
+
def exception(self):
|
|
33
|
+
return pickle.loads(self._ex_data)
|
|
34
|
+
|
|
35
|
+
def __repr__(self):
|
|
36
|
+
exception = pickle.loads(self._ex_data)
|
|
37
|
+
xvars = {k: v for k, v in vars(self).items() if not k.startswith('_')}
|
|
38
|
+
|
|
39
|
+
return f'{repr(exception)}: {xvars}'
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def work_hash(workid):
|
|
43
|
+
return hashlib.sha1(workid.encode()).hexdigest()
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
def work_path(path, workid):
|
|
47
|
+
return os.path.join(path, work_hash(workid))
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
def enum_ready(path):
|
|
51
|
+
with os.scandir(path) as rit:
|
|
52
|
+
for dentry in rit:
|
|
53
|
+
yield rit.name, rit.path
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
_ERROR_TAG = b'#@$ERROR$@#\n'
|
|
57
|
+
|
|
58
|
+
def make_error(msg):
|
|
59
|
+
return _ERROR_TAG + msg
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
def write_result(path):
|
|
63
|
+
return fsu.atomic_write(path)
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
def write_error(path, exception, **kwargs):
|
|
67
|
+
wex = WorkException(exception, **kwargs)
|
|
68
|
+
|
|
69
|
+
with write_result(path) as fd:
|
|
70
|
+
fd.write(make_error(pickle.dumps(wex)))
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
def get_error(data):
|
|
74
|
+
if data.startswith(_ERROR_TAG):
|
|
75
|
+
return pickle.loads(data[len(_ERROR_TAG):])
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
def raise_if_error(data):
|
|
79
|
+
if isinstance(data, WorkException):
|
|
80
|
+
data.do_raise()
|
|
81
|
+
|
|
82
|
+
return data
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
def load_work(wpath, path=None, workid=None):
|
|
86
|
+
wpath = wpath or work_path(path, workid)
|
|
87
|
+
|
|
88
|
+
with open(wpath, mode='rb') as fd:
|
|
89
|
+
data = fd.read()
|
|
90
|
+
|
|
91
|
+
error = get_error(data)
|
|
92
|
+
|
|
93
|
+
return error or data
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
def get_work(wpath, path=None, workid=None):
|
|
97
|
+
data = load_work(wpath, path=path, workid=workid)
|
|
98
|
+
|
|
99
|
+
return raise_if_error(data)
|
|
100
|
+
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import functools
|
|
2
|
+
|
|
3
|
+
from . import alog
|
|
4
|
+
from . import assert_checks as tas
|
|
5
|
+
from . import fin_wrap as fw
|
|
6
|
+
from . import mirror_from as mrf
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
def _writeback(stream, writeback_fn):
|
|
10
|
+
try:
|
|
11
|
+
writeback_fn(stream)
|
|
12
|
+
finally:
|
|
13
|
+
stream.close()
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class WritebackFile:
|
|
17
|
+
|
|
18
|
+
def __init__(self, stream, writeback_fn):
|
|
19
|
+
self._writeback_fn = functools.partial(_writeback, stream, writeback_fn)
|
|
20
|
+
fw.fin_wrap(self, '_stream', stream, finfn=self._writeback_fn)
|
|
21
|
+
mrf.mirror_all(stream, self, name='stream')
|
|
22
|
+
|
|
23
|
+
def close(self, run_writeback=True):
|
|
24
|
+
stream = self._stream
|
|
25
|
+
if stream is not None:
|
|
26
|
+
fw.fin_wrap(self, '_stream', None)
|
|
27
|
+
mrf.unmirror(self, name='stream')
|
|
28
|
+
if run_writeback:
|
|
29
|
+
self._writeback_fn()
|
|
30
|
+
else:
|
|
31
|
+
stream.close()
|
|
32
|
+
|
|
33
|
+
def detach(self):
|
|
34
|
+
self.close(run_writeback=False)
|
|
35
|
+
|
|
36
|
+
def __enter__(self):
|
|
37
|
+
return self
|
|
38
|
+
|
|
39
|
+
def __exit__(self, exc_type, *exc_args):
|
|
40
|
+
self.close(run_writeback=exc_type is None)
|
|
41
|
+
|
|
42
|
+
return False
|
|
43
|
+
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: python_misc_utils
|
|
3
|
+
Version: 0.2
|
|
4
|
+
Summary: A collection of Python utility APIs
|
|
5
|
+
Author: Davide Libenzi
|
|
6
|
+
License-Expression: Apache-2.0
|
|
7
|
+
Project-URL: Homepage, https://github.com/davidel/py_misc_utils
|
|
8
|
+
Project-URL: Issues, https://github.com/davidel/py_misc_utils/issues
|
|
9
|
+
Project-URL: Repository, https://github.com/davidel/py_misc_utils.git
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: Operating System :: OS Independent
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Requires-Python: >=3.9
|
|
14
|
+
Description-Content-Type: text/markdown
|
|
15
|
+
License-File: LICENSE
|
|
16
|
+
Requires-Dist: numpy
|
|
17
|
+
Requires-Dist: pandas
|
|
18
|
+
Requires-Dist: psutil
|
|
19
|
+
Requires-Dist: pyyaml
|
|
20
|
+
Provides-Extra: fs
|
|
21
|
+
Requires-Dist: boto3; extra == "fs"
|
|
22
|
+
Requires-Dist: bs4; extra == "fs"
|
|
23
|
+
Requires-Dist: ftputil; extra == "fs"
|
|
24
|
+
Requires-Dist: google-cloud-storage; extra == "fs"
|
|
25
|
+
Requires-Dist: pyarrow; extra == "fs"
|
|
26
|
+
Dynamic: author
|
|
27
|
+
Dynamic: license-file
|
|
28
|
+
Dynamic: provides-extra
|
|
29
|
+
Dynamic: requires-dist
|
|
30
|
+
Dynamic: summary
|
|
31
|
+
|
|
32
|
+
## Python Utility Code
|
|
33
|
+
|
|
34
|
+
I keep writing the same stuff in different projects, so I finally decided
|
|
35
|
+
to throw stuff into a common boilerplate and stop the cut&paste jobs.
|
|
36
|
+
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
py_misc_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
+
py_misc_utils/abs_timeout.py,sha256=TfcAD5P4fGVv5RVXHXyHD7tbfntpCdPRNE0lw9utb4o,322
|
|
3
|
+
py_misc_utils/alog.py,sha256=wF-tj2FwlGq6MKEBPcxBBqD_uwVDW0JayzC_NT4Skec,8205
|
|
4
|
+
py_misc_utils/app_main.py,sha256=vD6R5QiInO9ERjbxAFIXAwItzwbVOnZ9o6GjkjAkVmg,4898
|
|
5
|
+
py_misc_utils/archive_streamer.py,sha256=15o6q3VVODsTU_IcV6skTKCDiNlcQx4Ox_CZ6AshXVQ,3671
|
|
6
|
+
py_misc_utils/assert_checks.py,sha256=Z-QG5wNDT1BaXT8ru9dv_mAe2OxSf1wH9UuqOrlIR7c,3110
|
|
7
|
+
py_misc_utils/ast_utils.py,sha256=WpXc4nqeZHQhBQPDz3nv3Lj4ya973sdQsjXcsZzDyWs,2786
|
|
8
|
+
py_misc_utils/async_manager.py,sha256=J1F_tAbtG0NhxnESYvzAFLgxP5CklMpuT5yNl5z5HmE,4405
|
|
9
|
+
py_misc_utils/break_control.py,sha256=jblaRrJhj0kJHcV0RF0L1eF0zc2dG3NWZv2TRNuIONo,968
|
|
10
|
+
py_misc_utils/buffered_iterator.py,sha256=QscSp77wt5gXM5KwZIW_SCU3MsBmixoJvNn1Da9WC1M,733
|
|
11
|
+
py_misc_utils/cached_file.py,sha256=xCl_pzxrx1rQ7u4T41NVvlTC59edONrBQCr8mQmorHQ,13810
|
|
12
|
+
py_misc_utils/call_limiter.py,sha256=xXzImO6JBrf4k-zSSaGGpmRohK9MdNVAU8qyRyzOCHA,473
|
|
13
|
+
py_misc_utils/call_result_selector.py,sha256=zQibwD807khxN9GYWPIB-tj6BHQzC1wZUZR1dgXAqLU,166
|
|
14
|
+
py_misc_utils/cleanups.py,sha256=vDwlrNZWKaW71FNAYw-0M6akVgu3hTsy-I4cTrl-dCA,2100
|
|
15
|
+
py_misc_utils/cmd.py,sha256=VF7gCOj-D_AtqJIL_0Bzm_4pq3KDGp2pVvXUYS2pRI4,2228
|
|
16
|
+
py_misc_utils/compression.py,sha256=CN15-V14PaczTzJNr8SbyxK91_9icGilCwFiOv_rzFw,2916
|
|
17
|
+
py_misc_utils/cond_waiter.py,sha256=d0IvrSsozVtB9OCrkLrQlWAOZFkUI1Lz1Y71iSk4Ud4,356
|
|
18
|
+
py_misc_utils/context_base.py,sha256=eJEQp3QzgoVP4Jh36TkillIHZI-rAOmW7S3RSiLxu10,313
|
|
19
|
+
py_misc_utils/context_managers.py,sha256=ttn1rf-pvjCm9GLH1O17Jv1I5o1YFfcpcPs0w9fm9t4,1285
|
|
20
|
+
py_misc_utils/core_utils.py,sha256=_fZcTLyoA9OPihNTWMqrh8JRL3d6plThoFYy16fn8S8,11586
|
|
21
|
+
py_misc_utils/daemon_process.py,sha256=zx9ViUcJEsbXAMnGTr6fpeZiIggeH-STnxdK-eM-IBk,5908
|
|
22
|
+
py_misc_utils/data_cache.py,sha256=eyNXrOsQ5nxfk5AtR1ESRFBlL9fvn7ifNlBvkZKBpSE,1051
|
|
23
|
+
py_misc_utils/date_utils.py,sha256=7jvUv4xe-e_R9Vf5697IdIEwaxQAExHwxspvF-f5kn4,2095
|
|
24
|
+
py_misc_utils/debug.py,sha256=uq0nh_dovg4kc4l7kkV4akjFMYTLOte4IGaVcg2oXwM,600
|
|
25
|
+
py_misc_utils/dyn_modules.py,sha256=x-RCjb-upJjb-rYRsZdrhXlivz_gexPf5NWlA8e1B44,1490
|
|
26
|
+
py_misc_utils/dynamod.py,sha256=mbG74N_5jbFt8iWnVOxe51xblu8Jr2vgYqGZKG836L4,2532
|
|
27
|
+
py_misc_utils/env_config.py,sha256=KJftxNw_EOurv1b-dIDhhklZhqL-NA0XVl5sK49jWIQ,930
|
|
28
|
+
py_misc_utils/executor.py,sha256=N__RhLMKNIsxaCI_OqV5UYe0_BN2gNq5oVr4eehYdkE,6096
|
|
29
|
+
py_misc_utils/file_overwrite.py,sha256=rgtzO5trR1fqyWvVzNuWKSjiiK2jK8jZqW0OSmby4Ig,611
|
|
30
|
+
py_misc_utils/fin_wrap.py,sha256=6xpI6qYhPaHp0mqM_BmdlgWlRmrbsBJbB6uK2-I4pHE,1676
|
|
31
|
+
py_misc_utils/fp_utils.py,sha256=10gNXrAlMd2W3ZfjDk-NL30g40Rf11Cpwvb4oPVpmgY,874
|
|
32
|
+
py_misc_utils/fs_base.py,sha256=9Y4U3ChmQWBrheVdotF4WOpNz5eiekmwskot_Ueh5Y4,2378
|
|
33
|
+
py_misc_utils/fs_utils.py,sha256=aj8LXi3x-1Pgjlp2Mn5Ez3tdcsT0iTF7rLI6PhIYnA0,4467
|
|
34
|
+
py_misc_utils/gcs_fs.py,sha256=GtDCnSg3zanRqVy8y6yNlzrSrZR80edrdxIRvmrN0mA,4853
|
|
35
|
+
py_misc_utils/gen_indices.py,sha256=bVb2UGfFfP39oV7cURXP0z9ZwT71V7ftULFyyk-k6og,1454
|
|
36
|
+
py_misc_utils/gfs.py,sha256=SadbnMfgaismqHwYEMPg2lRW-PRKg7bUjz4kSZu4_Jg,7918
|
|
37
|
+
py_misc_utils/git_repo.py,sha256=d-wqWVtQ3MtsgrUUfU9Z-lVb2dEE_EOpHJyXKfvcqMg,1956
|
|
38
|
+
py_misc_utils/global_namespace.py,sha256=EGV0wqu5EzvZFot-JN1d2Xif1m2KfrzeUyvkg-vkddE,3383
|
|
39
|
+
py_misc_utils/http_async_fetcher.py,sha256=Z1lhGAbPidwCIURoKl-E1b0Ql-jrlZSIno8n33PXtrc,3635
|
|
40
|
+
py_misc_utils/http_server.py,sha256=dKXI8as6JlNwPpHGVEMsFyTnpavr7Kje2XYAs2EcSCU,6443
|
|
41
|
+
py_misc_utils/http_utils.py,sha256=uPOPKUIbnCzqyNwVvwtaS-S9wxvxEvQtqzJ46aPcPJQ,3424
|
|
42
|
+
py_misc_utils/img_utils.py,sha256=fXOSxt4r5Qo8xKMqvfgbEbeJ-5ypcYX_1X1ANrVQyi0,417
|
|
43
|
+
py_misc_utils/infix_op.py,sha256=o22aSkSwoad_HdEd5Ro3F199FEof7amI_Mv1PzMfod4,450
|
|
44
|
+
py_misc_utils/inspect_utils.py,sha256=5QldaVQgQcMO9_qyI6npa2engGvbed5WvJNWT_-pbRo,5048
|
|
45
|
+
py_misc_utils/iostream.py,sha256=VZwKzhDMyNhtFULestmq1UKty297ZaMVTNmDcLYegQg,509
|
|
46
|
+
py_misc_utils/iter_file.py,sha256=c0mu7R0EP8rYJ5g6s9RJDJHscwZfo_REI9ArBPBKTzI,2553
|
|
47
|
+
py_misc_utils/key_wrap.py,sha256=c8MZb_IvghG1tur5XOOVBZ5wiJhyootPDcGuWvatsuo,891
|
|
48
|
+
py_misc_utils/lazy_import.py,sha256=ri96cfi1zmr7nVwioCm66pojVg4z5TE9Nw0R5VYtFrM,708
|
|
49
|
+
py_misc_utils/lockfile.py,sha256=9Mv6inPeauLtjtXcNY1nxMLskUjejN3wPmCvkiBfT5k,4381
|
|
50
|
+
py_misc_utils/mem_size.py,sha256=W_Rq3FfmcI2wvH-6uZU4qBlI8QL9UANshNXPU23aQ1g,1157
|
|
51
|
+
py_misc_utils/mirror_from.py,sha256=9ob7s3RdEAUob-HIG9Bj6OA3_TGZN_OYGzuokmfTlNA,1586
|
|
52
|
+
py_misc_utils/mmap.py,sha256=2uMazPiJ04NkegP2Up46JlFERH1cLilLnv1IaxnyDgI,419
|
|
53
|
+
py_misc_utils/module_utils.py,sha256=q5T67g9FcsuGQxVaAqrmq6Qsw6Q62ZJ-3TGpugHOBxs,5308
|
|
54
|
+
py_misc_utils/moving_average.py,sha256=YDRMVJieWD8D-p_CEUq4V7XOLRvq50XFYYZDU2qCYE0,435
|
|
55
|
+
py_misc_utils/msgpack_streamer.py,sha256=UQIC439VukDJShgLBKSYDnijWKYm9t-kEto-Nar61b4,595
|
|
56
|
+
py_misc_utils/multi_wait.py,sha256=PT-0V73HmwSzBcDDgLjLy4ixIbFGmrQAPuPaRzOSCQI,539
|
|
57
|
+
py_misc_utils/multiprocessing.py,sha256=tfFEqUXLekhlYamo0x2ZbIY4xQTEtNI--pv-ILE-ozA,2226
|
|
58
|
+
py_misc_utils/named_array.py,sha256=U_QnvediPoW4DIurAYc1Z5EDPcZEjKU3ABnjUM2S3Hc,5826
|
|
59
|
+
py_misc_utils/no_break.py,sha256=Yh6k469xV7eEjDTmaEqoY6o1IZUX8zVk2BNUfly2QUU,960
|
|
60
|
+
py_misc_utils/no_except.py,sha256=DjY88OtR6Y6lVlSY8SDhM1QkiK0dnZkYDTMk8WRTwMg,755
|
|
61
|
+
py_misc_utils/np_ml_framework.py,sha256=WZfNP5cEBQqbm4yaXIKatsshR4UmR-cOMTAW4ADbFdw,4433
|
|
62
|
+
py_misc_utils/np_utils.py,sha256=P8YEHu71jKrTGKOVT3R1yqnkw3EEe4vT4J2JsUcszx8,7799
|
|
63
|
+
py_misc_utils/ntuple_utils.py,sha256=a_kdVknrsdtK9PYSkgNcecMsdWcW9SF0T7NtQZr8bNc,1227
|
|
64
|
+
py_misc_utils/num_utils.py,sha256=bOkWZOFwdLwmv8yf5NNpokrFqOKuA1bDF9sMeCvqZdE,798
|
|
65
|
+
py_misc_utils/obj.py,sha256=udKD7gPDT-SosCuuQA5l5CCJsuYlrF60-TN1VRVlCg4,1430
|
|
66
|
+
py_misc_utils/object_cache.py,sha256=P5ZUg2QomouLEyfAx2mbhYcMi92CqQemVpMaFqSvpwY,2373
|
|
67
|
+
py_misc_utils/object_tracker.py,sha256=RLG6ob5FBHpXGB2PLW7IpfB4ZWehA7uX1YAjaRoD184,2208
|
|
68
|
+
py_misc_utils/ordered_set.py,sha256=u1hRkAp-4lPUMEna5hd18U-aVcfRkRAH004wIB86vZE,1336
|
|
69
|
+
py_misc_utils/osfd.py,sha256=tNmHh1F8r95P8-AO7AMXJp_rLGC6jY3a4Mm_TooANLQ,624
|
|
70
|
+
py_misc_utils/packet.py,sha256=8YSnfBsKb8Uv3JChxsdKB8z9WfhFLJclGztI_0NDUvY,385
|
|
71
|
+
py_misc_utils/parquet_streamer.py,sha256=R_avvHZnL1jSkhTbpfIplIrm-0deZnaK4vpfZn7xIiI,1898
|
|
72
|
+
py_misc_utils/pd_utils.py,sha256=vuVUZzkjxtL-neEwgR6cwJBY_FX2s3jby8ApZu7AwF4,7855
|
|
73
|
+
py_misc_utils/periodic_task.py,sha256=2rxjFlk9nN2H5HLYljX6fJgPIPB4yR5yLbbzhFqf8xE,1742
|
|
74
|
+
py_misc_utils/pickle_wrap.py,sha256=HuSlSGtGu0_gy4pWHm-dRcBHX2VVP597DVwNWK2M76I,2534
|
|
75
|
+
py_misc_utils/pipeline.py,sha256=pr4mk_tfs9gMARPa4_nB9COWT1gf9-AgpGT7HfSYYP4,2628
|
|
76
|
+
py_misc_utils/remap_pickle.py,sha256=VOthK9rtvyFoUpE17APAtZ4Z_w2pPpd_fywwo5l-IYQ,1194
|
|
77
|
+
py_misc_utils/resource_manager.py,sha256=Ie86yPfiLh7RsndGG2NajTVzv2g237ArBGHvar2wadw,4471
|
|
78
|
+
py_misc_utils/rnd_utils.py,sha256=UYgXr4-I6p6fSgtAEn1WcnVyXdxjgq7TltbxoeLMA00,1150
|
|
79
|
+
py_misc_utils/run_once.py,sha256=gYMpPsYJlMWhArLC2n2JjUUSM0LANY1qCJp_KtGnpU0,315
|
|
80
|
+
py_misc_utils/scheduler.py,sha256=6uT-MEEn3SCpW91cO-8feRr8F5mPiEc9Uq4YWH3k7S4,3583
|
|
81
|
+
py_misc_utils/select_params.py,sha256=39EvYyb7kKdHuY5VejK5PCkVt5HBGEWE83QJuuz2qj4,8995
|
|
82
|
+
py_misc_utils/signal.py,sha256=y_eByy7HolVZXm8H8YYdy4Dv4q8nzyi3AucZSab2Chk,3077
|
|
83
|
+
py_misc_utils/skl_utils.py,sha256=dr7scZj-vcxzEoZAfvDJOD1VcI-N9VTuwYBW91d_WwM,7795
|
|
84
|
+
py_misc_utils/split.py,sha256=J5aCGO5zWtkQBJX8vKgojEwoGYNSuy02mST5yHqI9SE,3467
|
|
85
|
+
py_misc_utils/state.py,sha256=43mg_hCIoJaHnLw9HCiloKepWuDBQSIcFe0KUTmXXZ0,1078
|
|
86
|
+
py_misc_utils/std_module.py,sha256=xzY4Fto_7F-rjbULYCA_4kFRP5VNe9w3LRoa0UD1ddA,1285
|
|
87
|
+
py_misc_utils/stream_dataframe.py,sha256=DAmdXwcvFs_dSePKPQlexKjeBwgo78JxvpLJk-yCBLw,4942
|
|
88
|
+
py_misc_utils/streamed_file.py,sha256=5YE4gGkHHcwp-onvtj8pggMLcD7Y7n59kIP4e8n7Asg,3275
|
|
89
|
+
py_misc_utils/tempdir.py,sha256=F-p8kPv-iz-LwEKFXJi9j7Nu7VEPhX0q-TgY60PvmQw,1614
|
|
90
|
+
py_misc_utils/template_replace.py,sha256=jEeWCtRtZeoEmEdAL-snBB0FABzDQlWzSU9Blx20ZMg,1154
|
|
91
|
+
py_misc_utils/tensor_stream.py,sha256=AvFwXX6zgXriMPFv1xjLmqf1Gjj8187Wy4Xy5zQgcys,8049
|
|
92
|
+
py_misc_utils/thread_context.py,sha256=MTaORCbQg3YUqWOJS2iojvXXehCLOE66vKn31udggQA,541
|
|
93
|
+
py_misc_utils/throttle.py,sha256=AkKnnhz9dz4gWYx8XXu41HjjDi_Yi7VzY59U8iTaidQ,597
|
|
94
|
+
py_misc_utils/time_trigger.py,sha256=Pz6JfuI3cDFHq42xi00uxsLu3oDrHoVXC9pKSFHfrzs,306
|
|
95
|
+
py_misc_utils/timegen.py,sha256=O8XIV-O8VHsCgP7SjTZ-ecxUPeLF2N4LizzBB9jmzps,148
|
|
96
|
+
py_misc_utils/traceback.py,sha256=TYesLCceIpY5Os_-srcN6KfldwQKqAg9_4TgaRff0F8,836
|
|
97
|
+
py_misc_utils/tracking_executor.py,sha256=ZkLRTN2Gf8Wv2muc-bjBa7P1v3WJnwxc_8GxIWvAAvM,2236
|
|
98
|
+
py_misc_utils/transform_array.py,sha256=4tDtSAc_X8KCDxaVY5evPzAt_OA6FUJGJliOQEAYP2s,1033
|
|
99
|
+
py_misc_utils/uncompress.py,sha256=tdi9Q226B6rKqoz2UL5i2ViFCmv9SFEJVqwkY2OHqyE,696
|
|
100
|
+
py_misc_utils/url_fetcher.py,sha256=lYUICUhpOu_HVr_2Hpqb2CL9GKCrQ9CIiRGNBAaUnXA,3580
|
|
101
|
+
py_misc_utils/utils.py,sha256=WMDUUhIsIjfu9KkeUeK0ZtFJrE8EPpv2Zc0e5Vw07L0,12013
|
|
102
|
+
py_misc_utils/varint.py,sha256=3dXFoAWnmnmftjvw8i9Yuy-bYLyV8wxamwdoH2w242o,1198
|
|
103
|
+
py_misc_utils/virt_array.py,sha256=9GgN_xKsZ_tAIq4yjtbKZCMZTajxAc9sWw3_FDDVwRo,1203
|
|
104
|
+
py_misc_utils/weak_call.py,sha256=S17dyH_07DQnwvS92tO8_s0J_1Jp378GfMr7tbPR8xI,584
|
|
105
|
+
py_misc_utils/work_results.py,sha256=lTimKAjNMXIiIdB7wwi4OuSrHloG0UVbmc2wlUsl3Pk,2179
|
|
106
|
+
py_misc_utils/writeback_file.py,sha256=wFYpKh75sbiJT-SR4BymoZQcW3xodENfab3BjAsP7MU,965
|
|
107
|
+
py_misc_utils/fs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
108
|
+
py_misc_utils/fs/file_fs.py,sha256=8P8wD-7gBXGQYA5BSMmzTWlkKJ8vZu0B99_hSoE3K0A,3369
|
|
109
|
+
py_misc_utils/fs/ftp_fs.py,sha256=qOLYQEg_6pqKC5YzICgEdOH9maomJtMv8c3exEY8BLE,6356
|
|
110
|
+
py_misc_utils/fs/gcs_fs.py,sha256=4dfWa_4nqy9Q-HqEnuhMgkmk8z1NLiymY1WkP-90WCo,5100
|
|
111
|
+
py_misc_utils/fs/http_fs.py,sha256=6mQifdI50OQFd2d8yIfU0J3YYXC4yUVk-Wcz7uA0vvk,7040
|
|
112
|
+
py_misc_utils/fs/s3_fs.py,sha256=RAhUQf1tjLyTeeu1NqsLHn_HXPouCqbOd3-tYsjkec4,11492
|
|
113
|
+
python_misc_utils-0.2.dist-info/licenses/LICENSE,sha256=djKp2doA3Fnx8LziguL9FWzCoGczXLbj_87qtbywYQI,555
|
|
114
|
+
python_misc_utils-0.2.dist-info/METADATA,sha256=qUdmyDV8u3oCTxJTDFvfZRX6qJr0V_aOTZ7wge3xdw0,1160
|
|
115
|
+
python_misc_utils-0.2.dist-info/WHEEL,sha256=YCfwYGOYMi5Jhw2fU4yNgwErybb2IX5PEwBKV4ZbdBo,91
|
|
116
|
+
python_misc_utils-0.2.dist-info/top_level.txt,sha256=Hqg8W5M7VvZLd-TlUDZLkZyaKat_Tf6OSx8IKAQC7t0,14
|
|
117
|
+
python_misc_utils-0.2.dist-info/RECORD,,
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
Copyright 2023 Davide Libenzi
|
|
2
|
+
|
|
3
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
you may not use this file except in compliance with the License.
|
|
5
|
+
You may obtain a copy of the License at
|
|
6
|
+
|
|
7
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
|
|
9
|
+
Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
See the License for the specific language governing permissions and
|
|
13
|
+
limitations under the License.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
py_misc_utils
|