pypipr 1.0.98__py3-none-any.whl → 1.0.100__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.
- pypipr/__init__.py +1 -1
- pypipr/ifunctions/irange.py +17 -60
- pypipr/ifunctions/irange.py.bak +81 -0
- {pypipr-1.0.98.dist-info → pypipr-1.0.100.dist-info}/METADATA +260 -232
- {pypipr-1.0.98.dist-info → pypipr-1.0.100.dist-info}/RECORD +8 -7
- /pypipr/{ibuiltins → ifunctions}/ivars.py +0 -0
- {pypipr-1.0.98.dist-info → pypipr-1.0.100.dist-info}/WHEEL +0 -0
- {pypipr-1.0.98.dist-info → pypipr-1.0.100.dist-info}/entry_points.txt +0 -0
pypipr/__init__.py
CHANGED
@@ -21,7 +21,6 @@ from .ibuiltins.int_to_chr import int_to_chr
|
|
21
21
|
from .ibuiltins.is_empty import is_empty
|
22
22
|
from .ibuiltins.is_iterable import is_iterable
|
23
23
|
from .ibuiltins.is_valid_url import is_valid_url
|
24
|
-
from .ibuiltins.ivars import ivars
|
25
24
|
from .ibuiltins.password_generator import password_generator
|
26
25
|
from .ibuiltins.random_bool import random_bool
|
27
26
|
from .ibuiltins.restart import restart
|
@@ -65,6 +64,7 @@ from .ifunctions.irange import irange
|
|
65
64
|
from .ifunctions.ireplace import ireplace
|
66
65
|
from .ifunctions.iscandir import iscandir
|
67
66
|
from .ifunctions.isplit import isplit
|
67
|
+
from .ifunctions.ivars import ivars
|
68
68
|
import asyncio
|
69
69
|
import colorama
|
70
70
|
import csv
|
pypipr/ifunctions/irange.py
CHANGED
@@ -1,7 +1,8 @@
|
|
1
|
-
from ..ibuiltins.
|
1
|
+
from ..ibuiltins.chr_to_int import chr_to_int
|
2
|
+
from ..ibuiltins.int_to_chr import int_to_chr
|
2
3
|
|
3
4
|
|
4
|
-
def irange(start,
|
5
|
+
def irange(start, stop=None, step=1, index=0, numbers="abcdefghijklmnopqrstuvwxyz"):
|
5
6
|
"""
|
6
7
|
Meningkatkan fungsi range() dari python untuk pengulangan menggunakan huruf
|
7
8
|
|
@@ -13,69 +14,25 @@ def irange(start, finish, step=1):
|
|
13
14
|
print(list(irange(10, 5)))
|
14
15
|
```
|
15
16
|
"""
|
17
|
+
if stop is None:
|
18
|
+
stop = start
|
19
|
+
start = 0
|
16
20
|
|
17
|
-
|
18
|
-
|
19
|
-
finish_int = isinstance(finish, int)
|
20
|
-
start_str = isinstance(start, str)
|
21
|
-
finish_str = isinstance(finish, str)
|
22
|
-
start_numeric = start.isnumeric() if start_str else False
|
23
|
-
finish_numeric = finish.isnumeric() if finish_str else False
|
21
|
+
if isinstance(start, int) and isinstance(stop, int):
|
22
|
+
return range(start, stop, step)
|
24
23
|
|
25
|
-
|
26
|
-
|
27
|
-
return (int, str)
|
24
|
+
elif isinstance(start, str) and isinstance(stop, str):
|
25
|
+
return char_range(start, stop, step, index=index, numbers=numbers)
|
28
26
|
|
29
|
-
|
30
|
-
|
31
|
-
# irange("1", 5)
|
32
|
-
# irange(1, "5")
|
33
|
-
# irange(1, 5)
|
34
|
-
return (int, int)
|
27
|
+
else:
|
28
|
+
raise Exception("start dan stop tidak diketahui")
|
35
29
|
|
36
|
-
if start_str and finish_str:
|
37
|
-
# irange("a", "z")
|
38
|
-
# irange("p", "g")
|
39
|
-
return (ord, chr)
|
40
30
|
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
"""
|
45
|
-
# irange(1, 'a') -> irange('1', 'a')
|
46
|
-
# irange(1, '5') -> irange(1, 5)
|
47
|
-
# irange('1', 5) -> irange(1, 5)
|
48
|
-
# irange('a', 5) -> irange('a', '5')
|
49
|
-
#
|
50
|
-
# if start_str and finish_int:
|
51
|
-
# # irange("a", 5) -> irange("a", "5")
|
52
|
-
# finish = str(finish)
|
53
|
-
# return (ord, chr)
|
54
|
-
#
|
55
|
-
# if start_int and finish_str:
|
56
|
-
# # irange(1, "g") -> irange("1", "g")
|
57
|
-
# start = str(start)
|
58
|
-
# return (ord, chr)
|
31
|
+
def char_range(start, stop, step, numbers, index):
|
32
|
+
start = chr_to_int(start, start=index, numbers=numbers)
|
33
|
+
stop = chr_to_int(stop, start=index, numbers=numbers)
|
59
34
|
|
60
|
-
|
35
|
+
for i in range(start, stop, step):
|
36
|
+
yield int_to_chr(i, start=index, numbers=numbers)
|
61
37
|
|
62
|
-
counter_class, converter_class = casting_class()
|
63
|
-
start = counter_class(start)
|
64
|
-
finish = counter_class(finish)
|
65
38
|
|
66
|
-
step = 1 if is_empty(step) else int(step)
|
67
|
-
|
68
|
-
faktor = 1 if finish > start else -1
|
69
|
-
step *= faktor
|
70
|
-
finish += faktor
|
71
|
-
|
72
|
-
for i in range(start, finish, step):
|
73
|
-
yield converter_class(i)
|
74
|
-
|
75
|
-
|
76
|
-
if __name__ == "__main__":
|
77
|
-
from .iargv import iargv
|
78
|
-
from .iprint import iprint
|
79
|
-
|
80
|
-
if (s := iargv(1)) and (f := iargv(2)):
|
81
|
-
iprint(irange(s, t))
|
@@ -0,0 +1,81 @@
|
|
1
|
+
from ..ibuiltins.is_empty import is_empty
|
2
|
+
|
3
|
+
|
4
|
+
def irange(start, finish, step=1):
|
5
|
+
"""
|
6
|
+
Meningkatkan fungsi range() dari python untuk pengulangan menggunakan huruf
|
7
|
+
|
8
|
+
```python
|
9
|
+
print(irange('a', 'c'))
|
10
|
+
print(irange('z', 'a', 10))
|
11
|
+
print(list(irange('a', 'z', 10)))
|
12
|
+
print(list(irange(1, '7')))
|
13
|
+
print(list(irange(10, 5)))
|
14
|
+
```
|
15
|
+
"""
|
16
|
+
|
17
|
+
def casting_class():
|
18
|
+
start_int = isinstance(start, int)
|
19
|
+
finish_int = isinstance(finish, int)
|
20
|
+
start_str = isinstance(start, str)
|
21
|
+
finish_str = isinstance(finish, str)
|
22
|
+
start_numeric = start.isnumeric() if start_str else False
|
23
|
+
finish_numeric = finish.isnumeric() if finish_str else False
|
24
|
+
|
25
|
+
if start_numeric and finish_numeric:
|
26
|
+
# irange("1", "5")
|
27
|
+
return (int, str)
|
28
|
+
|
29
|
+
if (start_numeric or start_int) and (finish_numeric or finish_int):
|
30
|
+
# irange("1", "5")
|
31
|
+
# irange("1", 5)
|
32
|
+
# irange(1, "5")
|
33
|
+
# irange(1, 5)
|
34
|
+
return (int, int)
|
35
|
+
|
36
|
+
if start_str and finish_str:
|
37
|
+
# irange("a", "z")
|
38
|
+
# irange("p", "g")
|
39
|
+
return (ord, chr)
|
40
|
+
|
41
|
+
"""
|
42
|
+
kedua if dibawah ini sudah bisa berjalan secara logika, tetapi
|
43
|
+
perlu dimanipulasi supaya variabel start dan finish bisa diubah.
|
44
|
+
"""
|
45
|
+
# irange(1, 'a') -> irange('1', 'a')
|
46
|
+
# irange(1, '5') -> irange(1, 5)
|
47
|
+
# irange('1', 5) -> irange(1, 5)
|
48
|
+
# irange('a', 5) -> irange('a', '5')
|
49
|
+
#
|
50
|
+
# if start_str and finish_int:
|
51
|
+
# # irange("a", 5) -> irange("a", "5")
|
52
|
+
# finish = str(finish)
|
53
|
+
# return (ord, chr)
|
54
|
+
#
|
55
|
+
# if start_int and finish_str:
|
56
|
+
# # irange(1, "g") -> irange("1", "g")
|
57
|
+
# start = str(start)
|
58
|
+
# return (ord, chr)
|
59
|
+
|
60
|
+
raise Exception(f"[{start} - {finish}] tidak dapat diidentifikasi kesamaannya")
|
61
|
+
|
62
|
+
counter_class, converter_class = casting_class()
|
63
|
+
start = counter_class(start)
|
64
|
+
finish = counter_class(finish)
|
65
|
+
|
66
|
+
step = 1 if is_empty(step) else int(step)
|
67
|
+
|
68
|
+
faktor = 1 if finish > start else -1
|
69
|
+
step *= faktor
|
70
|
+
finish += faktor
|
71
|
+
|
72
|
+
for i in range(start, finish, step):
|
73
|
+
yield converter_class(i)
|
74
|
+
|
75
|
+
|
76
|
+
if __name__ == "__main__":
|
77
|
+
from .iargv import iargv
|
78
|
+
from .iprint import iprint
|
79
|
+
|
80
|
+
if (s := iargv(1)) and (f := iargv(2)):
|
81
|
+
iprint(irange(s, t))
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: pypipr
|
3
|
-
Version: 1.0.
|
3
|
+
Version: 1.0.100
|
4
4
|
Summary: The Python Package Index Project
|
5
5
|
Author: ufiapjj
|
6
6
|
Author-email: ufiapjj@gmail.com
|
@@ -120,7 +120,7 @@ print(list(chunk_array(arr, 5)))
|
|
120
120
|
|
121
121
|
Output:
|
122
122
|
```py
|
123
|
-
<generator object chunk_array at
|
123
|
+
<generator object chunk_array at 0x749e6d8040>
|
124
124
|
[[2, 3, 12, 3, 3], [42, 42, 1, 43, 2], [42, 41, 4, 24, 32], [42, 3, 12, 32, 42], [42]]
|
125
125
|
```
|
126
126
|
|
@@ -171,9 +171,9 @@ print(datetime_now("Etc/GMT+7"))
|
|
171
171
|
|
172
172
|
Output:
|
173
173
|
```py
|
174
|
-
2024-04-
|
175
|
-
2024-04-
|
176
|
-
2024-04-
|
174
|
+
2024-04-29 15:56:59.444584+07:00
|
175
|
+
2024-04-29 08:56:59.446216+00:00
|
176
|
+
2024-04-29 01:56:59.451028-07:00
|
177
177
|
```
|
178
178
|
|
179
179
|
## dict_first
|
@@ -240,7 +240,7 @@ print(filter_empty(var))
|
|
240
240
|
|
241
241
|
Output:
|
242
242
|
```py
|
243
|
-
<generator object filter_empty at
|
243
|
+
<generator object filter_empty at 0x749e66ed40>
|
244
244
|
```
|
245
245
|
|
246
246
|
## get_by_index
|
@@ -286,8 +286,8 @@ print(list(get_class_method(ExampleGetClassMethod)))
|
|
286
286
|
|
287
287
|
Output:
|
288
288
|
```py
|
289
|
-
<generator object get_class_method at
|
290
|
-
[<function ExampleGetClassMethod.a at
|
289
|
+
<generator object get_class_method at 0x749e66f010>
|
290
|
+
[<function ExampleGetClassMethod.a at 0x749e6e18a0>, <function ExampleGetClassMethod.b at 0x749e6e1760>, <function ExampleGetClassMethod.c at 0x749e6e1940>, <function ExampleGetClassMethod.d at 0x749e6e19e0>]
|
291
291
|
```
|
292
292
|
|
293
293
|
## get_filemtime
|
@@ -443,125 +443,6 @@ True
|
|
443
443
|
True
|
444
444
|
```
|
445
445
|
|
446
|
-
## ivars
|
447
|
-
|
448
|
-
`ivars(obj, skip_underscore=True)`
|
449
|
-
|
450
|
-
Membuat dictionary berdasarkan kategori untuk setiap
|
451
|
-
member dari object.
|
452
|
-
|
453
|
-
```python
|
454
|
-
iprint(ivars(__import__('pypipr')))
|
455
|
-
```
|
456
|
-
|
457
|
-
Output:
|
458
|
-
```py
|
459
|
-
{'module': {'ibuiltins': <module 'pypipr.ibuiltins' from '/data/data/com.termux/files/home/pypipr/pypipr/ibuiltins/__init__.py'>,
|
460
|
-
'iconsole': <module 'pypipr.iconsole' from '/data/data/com.termux/files/home/pypipr/pypipr/iconsole/__init__.py'>,
|
461
|
-
'idjango': <module 'pypipr.idjango' from '/data/data/com.termux/files/home/pypipr/pypipr/idjango/__init__.py'>,
|
462
|
-
'iengineering': <module 'pypipr.iengineering' from '/data/data/com.termux/files/home/pypipr/pypipr/iengineering/__init__.py'>,
|
463
|
-
'ifunctions': <module 'pypipr.ifunctions' from '/data/data/com.termux/files/home/pypipr/pypipr/ifunctions/__init__.py'>,
|
464
|
-
'iflow': <module 'pypipr.iflow' (<_frozen_importlib_external.NamespaceLoader object at 0x7770ee6f90>)>,
|
465
|
-
'asyncio': <module 'asyncio' from '/data/data/com.termux/files/usr/lib/python3.11/asyncio/__init__.py'>,
|
466
|
-
'colorama': <module 'colorama' from '/data/data/com.termux/files/usr/lib/python3.11/site-packages/colorama/__init__.py'>,
|
467
|
-
'csv': <module 'csv' from '/data/data/com.termux/files/usr/lib/python3.11/csv.py'>,
|
468
|
-
'datetime': <module 'datetime' from '/data/data/com.termux/files/usr/lib/python3.11/datetime.py'>,
|
469
|
-
'functools': <module 'functools' from '/data/data/com.termux/files/usr/lib/python3.11/functools.py'>,
|
470
|
-
'inspect': <module 'inspect' from '/data/data/com.termux/files/usr/lib/python3.11/inspect.py'>,
|
471
|
-
'io': <module 'io' (frozen)>,
|
472
|
-
'json': <module 'json' from '/data/data/com.termux/files/usr/lib/python3.11/json/__init__.py'>,
|
473
|
-
'lxml': <module 'lxml' from '/data/data/com.termux/files/usr/lib/python3.11/site-packages/lxml/__init__.py'>,
|
474
|
-
'math': <module 'math' from '/data/data/com.termux/files/usr/lib/python3.11/lib-dynload/math.cpython-311.so'>,
|
475
|
-
'multiprocessing': <module 'multiprocessing' from '/data/data/com.termux/files/usr/lib/python3.11/multiprocessing/__init__.py'>,
|
476
|
-
'operator': <module 'operator' from '/data/data/com.termux/files/usr/lib/python3.11/operator.py'>,
|
477
|
-
'os': <module 'os' (frozen)>,
|
478
|
-
'pathlib': <module 'pathlib' from '/data/data/com.termux/files/usr/lib/python3.11/pathlib.py'>,
|
479
|
-
'pint': <module 'pint' from '/data/data/com.termux/files/usr/lib/python3.11/site-packages/pint/__init__.py'>,
|
480
|
-
'pprint': <module 'pprint' from '/data/data/com.termux/files/usr/lib/python3.11/pprint.py'>,
|
481
|
-
'queue': <module 'queue' from '/data/data/com.termux/files/usr/lib/python3.11/queue.py'>,
|
482
|
-
'random': <module 'random' from '/data/data/com.termux/files/usr/lib/python3.11/random.py'>,
|
483
|
-
're': <module 're' from '/data/data/com.termux/files/usr/lib/python3.11/re/__init__.py'>,
|
484
|
-
'requests': <module 'requests' from '/data/data/com.termux/files/usr/lib/python3.11/site-packages/requests/__init__.py'>,
|
485
|
-
'string': <module 'string' from '/data/data/com.termux/files/usr/lib/python3.11/string.py'>,
|
486
|
-
'subprocess': <module 'subprocess' from '/data/data/com.termux/files/usr/lib/python3.11/subprocess.py'>,
|
487
|
-
'sys': <module 'sys' (built-in)>,
|
488
|
-
'textwrap': <module 'textwrap' from '/data/data/com.termux/files/usr/lib/python3.11/textwrap.py'>,
|
489
|
-
'threading': <module 'threading' from '/data/data/com.termux/files/usr/lib/python3.11/threading.py'>,
|
490
|
-
'time': <module 'time' (built-in)>,
|
491
|
-
'tzdata': <module 'tzdata' from '/data/data/com.termux/files/usr/lib/python3.11/site-packages/tzdata/__init__.py'>,
|
492
|
-
'uuid': <module 'uuid' from '/data/data/com.termux/files/usr/lib/python3.11/uuid.py'>,
|
493
|
-
'webbrowser': <module 'webbrowser' from '/data/data/com.termux/files/usr/lib/python3.11/webbrowser.py'>,
|
494
|
-
'yaml': <module 'yaml' from '/data/data/com.termux/files/usr/lib/python3.11/site-packages/yaml/__init__.py'>,
|
495
|
-
'zoneinfo': <module 'zoneinfo' from '/data/data/com.termux/files/usr/lib/python3.11/zoneinfo/__init__.py'>},
|
496
|
-
'class': {'ComparePerformance': <class 'pypipr.ibuiltins.ComparePerformance.ComparePerformance'>,
|
497
|
-
'RunParallel': <class 'pypipr.ibuiltins.RunParallel.RunParallel'>,
|
498
|
-
'APIMixinView': <class 'pypipr.idjango.APIMixinView.APIMixinView'>,
|
499
|
-
'PintUregQuantity': <class 'pint.Quantity'>},
|
500
|
-
'variable': {'LINUX': True,
|
501
|
-
'WINDOWS': False,
|
502
|
-
'PintUreg': <pint.registry.UnitRegistry object at 0x7776e3fd50>},
|
503
|
-
'function': {'avg': <function avg at 0x777bfb6d40>,
|
504
|
-
'basename': <function basename at 0x777bf868e0>,
|
505
|
-
'chr_to_int': <function chr_to_int at 0x7776d79080>,
|
506
|
-
'chunk_array': <function chunk_array at 0x7776d791c0>,
|
507
|
-
'create_folder': <function create_folder at 0x7776d793a0>,
|
508
|
-
'datetime_from_string': <function datetime_from_string at 0x7776d79580>,
|
509
|
-
'datetime_now': <function datetime_now at 0x7776e21620>,
|
510
|
-
'dict_first': <function dict_first at 0x7776e21580>,
|
511
|
-
'dirname': <function dirname at 0x7776e214e0>,
|
512
|
-
'exit_if_empty': <function exit_if_empty at 0x7776e213a0>,
|
513
|
-
'filter_empty': <function filter_empty at 0x7776e211c0>,
|
514
|
-
'get_by_index': <function get_by_index at 0x7776e20e00>,
|
515
|
-
'get_class_method': <function get_class_method at 0x7776e20cc0>,
|
516
|
-
'get_filemtime': <function get_filemtime at 0x7776e20b80>,
|
517
|
-
'get_filesize': <function get_filesize at 0x7776e209a0>,
|
518
|
-
'int_to_chr': <function int_to_chr at 0x7776e20900>,
|
519
|
-
'is_empty': <function is_empty at 0x7776e21260>,
|
520
|
-
'is_iterable': <function is_iterable at 0x7776e20fe0>,
|
521
|
-
'is_valid_url': <function is_valid_url at 0x7776e207c0>,
|
522
|
-
'ivars': <function ivars at 0x7776e20720>,
|
523
|
-
'password_generator': <function password_generator at 0x7776e205e0>,
|
524
|
-
'random_bool': <function random_bool at 0x7776e20400>,
|
525
|
-
'restart': <function restart at 0x7776e23880>,
|
526
|
-
'set_timeout': <function set_timeout at 0x7776e239c0>,
|
527
|
-
'sets_ordered': <function sets_ordered at 0x7776e23b00>,
|
528
|
-
'str_cmp': <function str_cmp at 0x7776e23ba0>,
|
529
|
-
'to_str': <function to_str at 0x7776e20f40>,
|
530
|
-
'choices': <function choices at 0x7776e23c40>,
|
531
|
-
'console_run': <function console_run at 0x7776e23ec0>,
|
532
|
-
'input_char': <function input_char at 0x7776e44040>,
|
533
|
-
'log': <function log at 0x7776e44220>,
|
534
|
-
'print_colorize': <function print_colorize at 0x7776e442c0>,
|
535
|
-
'print_dir': <function print_dir at 0x7776e44400>,
|
536
|
-
'print_log': <function print_log at 0x7776e440e0>,
|
537
|
-
'print_to_last_line': <function print_to_last_line at 0x7776e23e20>,
|
538
|
-
'text_colorize': <function text_colorize at 0x7776e23f60>,
|
539
|
-
'batch_calculate': <function batch_calculate at 0x7770ef1760>,
|
540
|
-
'batchmaker': <function batchmaker at 0x7776e44540>,
|
541
|
-
'calculate': <function calculate at 0x7770ef2480>,
|
542
|
-
'auto_reload': <function auto_reload at 0x7770ef2700>,
|
543
|
-
'github_pull': <function github_pull at 0x7770ef2200>,
|
544
|
-
'github_push': <function github_push at 0x7770ef28e0>,
|
545
|
-
'github_user': <function github_user at 0x7770ef2c00>,
|
546
|
-
'pip_freeze_without_version': <function pip_freeze_without_version at 0x7770c22160>,
|
547
|
-
'poetry_publish': <function poetry_publish at 0x7770c22340>,
|
548
|
-
'poetry_update_version': <function poetry_update_version at 0x7770c46b60>,
|
549
|
-
'iargv': <function iargv at 0x776d2702c0>,
|
550
|
-
'idumps': <function idumps at 0x776d270400>,
|
551
|
-
'idumps_html': <function idumps_html at 0x776d2d4e00>,
|
552
|
-
'ienv': <function ienv at 0x776d270540>,
|
553
|
-
'iexec': <function iexec at 0x776d2d5080>,
|
554
|
-
'ijoin': <function ijoin at 0x7770c220c0>,
|
555
|
-
'iloads': <function iloads at 0x776d2d5120>,
|
556
|
-
'iloads_html': <function iloads_html at 0x776d2d53a0>,
|
557
|
-
'iopen': <function iopen at 0x7770c223e0>,
|
558
|
-
'iprint': <function iprint at 0x776d2d5260>,
|
559
|
-
'irange': <function irange at 0x7770ef25c0>,
|
560
|
-
'ireplace': <function ireplace at 0x776d2d5440>,
|
561
|
-
'iscandir': <function iscandir at 0x776d2d7060>,
|
562
|
-
'isplit': <function isplit at 0x776d2d7100>}}
|
563
|
-
```
|
564
|
-
|
565
446
|
## password_generator
|
566
447
|
|
567
448
|
`password_generator(length=8, characters='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!"#$%&\'()*+,-./:;<=>?@[\\]^_`{|}~')`
|
@@ -574,7 +455,7 @@ print(password_generator())
|
|
574
455
|
|
575
456
|
Output:
|
576
457
|
```py
|
577
|
-
|
458
|
+
B4Yyp4V-
|
578
459
|
```
|
579
460
|
|
580
461
|
## random_bool
|
@@ -618,7 +499,7 @@ x.cancel()
|
|
618
499
|
|
619
500
|
Output:
|
620
501
|
```py
|
621
|
-
<Timer(Thread-2, started
|
502
|
+
<Timer(Thread-2, started 500846017776)>
|
622
503
|
menghentikan timeout 7
|
623
504
|
```
|
624
505
|
|
@@ -636,7 +517,7 @@ print(list(sets_ordered(array)))
|
|
636
517
|
|
637
518
|
Output:
|
638
519
|
```py
|
639
|
-
<generator object sets_ordered at
|
520
|
+
<generator object sets_ordered at 0x749e6e81e0>
|
640
521
|
[2, 3, 12, 42, 1, 43, 41, 4, 24, 32]
|
641
522
|
```
|
642
523
|
|
@@ -790,7 +671,7 @@ Output:
|
|
790
671
|
__enter__ : https:/www.google.com
|
791
672
|
__fspath__ : https:/www.google.com
|
792
673
|
__getstate__ : (None, {'_drv': '', '_root': '', '_parts': ['https:', 'www.google.com'], '_str': 'https:/www.google.com'})
|
793
|
-
__hash__ : -
|
674
|
+
__hash__ : -2716811347520502766
|
794
675
|
__init__ : None
|
795
676
|
__init_subclass__ : None
|
796
677
|
__module__ : pathlib
|
@@ -803,8 +684,8 @@ Output:
|
|
803
684
|
_cached_cparts : ['https:', 'www.google.com']
|
804
685
|
_cparts : ['https:', 'www.google.com']
|
805
686
|
_drv :
|
806
|
-
_flavour : <pathlib._PosixFlavour object at
|
807
|
-
_hash : -
|
687
|
+
_flavour : <pathlib._PosixFlavour object at 0x74a89cca10>
|
688
|
+
_hash : -2716811347520502766
|
808
689
|
_parts : ['https:', 'www.google.com']
|
809
690
|
_root :
|
810
691
|
_str : https:/www.google.com
|
@@ -826,7 +707,7 @@ Output:
|
|
826
707
|
is_reserved : False
|
827
708
|
is_socket : False
|
828
709
|
is_symlink : False
|
829
|
-
iterdir : <generator object Path.iterdir at
|
710
|
+
iterdir : <generator object Path.iterdir at 0x749e6c4ba0>
|
830
711
|
joinpath : https:/www.google.com
|
831
712
|
name : www.google.com
|
832
713
|
parent : https:
|
@@ -891,12 +772,6 @@ print(batch_calculate("{1 10} m ** {1 3}"))
|
|
891
772
|
print(list(batch_calculate("{1 10} m ** {1 3}")))
|
892
773
|
```
|
893
774
|
|
894
|
-
Output:
|
895
|
-
```py
|
896
|
-
<generator object batch_calculate at 0x776a647b50>
|
897
|
-
[('1 m ** 1', <Quantity(1, 'meter')>), ('1 m ** 2', <Quantity(1, 'meter ** 2')>), ('1 m ** 3', <Quantity(1, 'meter ** 3')>), ('2 m ** 1', <Quantity(2, 'meter')>), ('2 m ** 2', <Quantity(2, 'meter ** 2')>), ('2 m ** 3', <Quantity(2, 'meter ** 3')>), ('3 m ** 1', <Quantity(3, 'meter')>), ('3 m ** 2', <Quantity(3, 'meter ** 2')>), ('3 m ** 3', <Quantity(3, 'meter ** 3')>), ('4 m ** 1', <Quantity(4, 'meter')>), ('4 m ** 2', <Quantity(4, 'meter ** 2')>), ('4 m ** 3', <Quantity(4, 'meter ** 3')>), ('5 m ** 1', <Quantity(5, 'meter')>), ('5 m ** 2', <Quantity(5, 'meter ** 2')>), ('5 m ** 3', <Quantity(5, 'meter ** 3')>), ('6 m ** 1', <Quantity(6, 'meter')>), ('6 m ** 2', <Quantity(6, 'meter ** 2')>), ('6 m ** 3', <Quantity(6, 'meter ** 3')>), ('7 m ** 1', <Quantity(7, 'meter')>), ('7 m ** 2', <Quantity(7, 'meter ** 2')>), ('7 m ** 3', <Quantity(7, 'meter ** 3')>), ('8 m ** 1', <Quantity(8, 'meter')>), ('8 m ** 2', <Quantity(8, 'meter ** 2')>), ('8 m ** 3', <Quantity(8, 'meter ** 3')>), ('9 m ** 1', <Quantity(9, 'meter')>), ('9 m ** 2', <Quantity(9, 'meter ** 2')>), ('9 m ** 3', <Quantity(9, 'meter ** 3')>), ('10 m ** 1', <Quantity(10, 'meter')>), ('10 m ** 2', <Quantity(10, 'meter ** 2')>), ('10 m ** 3', <Quantity(10, 'meter ** 3')>)]
|
898
|
-
```
|
899
|
-
|
900
775
|
## batchmaker
|
901
776
|
|
902
777
|
`batchmaker(pattern: str)`
|
@@ -916,12 +791,6 @@ print(batchmaker(s))
|
|
916
791
|
print(list(batchmaker(s)))
|
917
792
|
```
|
918
793
|
|
919
|
-
Output:
|
920
|
-
```py
|
921
|
-
<generator object batchmaker at 0x776a6b03a0>
|
922
|
-
['Urutan 1 dan 10 dan j dan Z saja.', 'Urutan 1 dan 10 dan j dan K saja.', 'Urutan 1 dan 10 dan k dan Z saja.', 'Urutan 1 dan 10 dan k dan K saja.', 'Urutan 1 dan 9 dan j dan Z saja.', 'Urutan 1 dan 9 dan j dan K saja.', 'Urutan 1 dan 9 dan k dan Z saja.', 'Urutan 1 dan 9 dan k dan K saja.', 'Urutan 4 dan 10 dan j dan Z saja.', 'Urutan 4 dan 10 dan j dan K saja.', 'Urutan 4 dan 10 dan k dan Z saja.', 'Urutan 4 dan 10 dan k dan K saja.', 'Urutan 4 dan 9 dan j dan Z saja.', 'Urutan 4 dan 9 dan j dan K saja.', 'Urutan 4 dan 9 dan k dan Z saja.', 'Urutan 4 dan 9 dan k dan K saja.']
|
923
|
-
```
|
924
|
-
|
925
794
|
## calculate
|
926
795
|
|
927
796
|
`calculate(teks)`
|
@@ -1282,7 +1151,7 @@ print(ijoin(10, ' '))
|
|
1282
1151
|
|
1283
1152
|
Output:
|
1284
1153
|
```py
|
1285
|
-
|
1154
|
+
asd, weq, qweqw, dfs
|
1286
1155
|
,ini,path,seperti,url,
|
1287
1156
|
ini,path,seperti,url
|
1288
1157
|
<li>satu</li>
|
@@ -1347,62 +1216,111 @@ pprint.pprint(iloads_html(iopen("https://harga-emas.org/1-gram/")), depth=10)
|
|
1347
1216
|
Output:
|
1348
1217
|
```py
|
1349
1218
|
(['Home', 'Emas 1 Gram', 'History', 'Trend', 'Perak 1 Gram', 'Pluang'],
|
1350
|
-
[['Harga Emas Hari Ini -
|
1351
|
-
['Spot Emas USD↑2.
|
1352
|
-
'Kurs
|
1353
|
-
'Emas IDR↑1.
|
1354
|
-
['LM Antam (Jual)1.
|
1219
|
+
[['Harga Emas Hari Ini - Senin, 29 April 2024'],
|
1220
|
+
['Spot Emas USD↑2.338,37 (+0,43) / oz',
|
1221
|
+
'Kurs IDR↑16.222,00 (+14,00) / USD',
|
1222
|
+
'Emas IDR↑1.219.575 (+1.277) / gr'],
|
1223
|
+
['LM Antam (Jual)↓1.325.000 (-1.000) / gr',
|
1224
|
+
'LM Antam (Beli)↓1.221.000 (-1.000) / gr']],
|
1355
1225
|
[['Harga Emas Hari Ini'],
|
1356
1226
|
['Gram', 'Gedung Antam Jakarta', 'Pegadaian'],
|
1357
1227
|
['per Gram (Rp)', 'per Batangan (Rp)', 'per Gram (Rp)', 'per Batangan (Rp)'],
|
1358
1228
|
['1000',
|
1359
|
-
'1.
|
1360
|
-
'1.
|
1229
|
+
'1.266 (-1)',
|
1230
|
+
'1.265.600 (-1.000)',
|
1361
1231
|
'1.043.040 (+8.200)',
|
1362
1232
|
'1.043.040.000 (+8.200.000)'],
|
1363
1233
|
['500',
|
1364
|
-
'2.
|
1365
|
-
'1.
|
1234
|
+
'2.531 (-2)',
|
1235
|
+
'1.265.640 (-1.000)',
|
1366
1236
|
'1.043.082 (+8.200)',
|
1367
1237
|
'521.541.000 (+4.100.000)'],
|
1368
1238
|
['250',
|
1369
|
-
'5.
|
1370
|
-
'1.
|
1239
|
+
'5.064 (-4)',
|
1240
|
+
'1.266.060 (-1.000)',
|
1371
1241
|
'1.043.512 (+8.200)',
|
1372
1242
|
'260.878.000 (+2.050.000)'],
|
1373
1243
|
['100',
|
1374
|
-
'12.
|
1375
|
-
'1.
|
1244
|
+
'12.671 (-10)',
|
1245
|
+
'1.267.120 (-1.000)',
|
1376
1246
|
'1.044.600 (+8.200)',
|
1377
1247
|
'104.460.000 (+820.000)'],
|
1378
|
-
['50',
|
1379
|
-
|
1380
|
-
|
1381
|
-
|
1382
|
-
|
1383
|
-
['
|
1384
|
-
|
1385
|
-
|
1386
|
-
|
1387
|
-
'
|
1248
|
+
['50',
|
1249
|
+
'25.358 (-20)',
|
1250
|
+
'1.267.900 (-1.000)',
|
1251
|
+
'1.045.400 (+8.200)',
|
1252
|
+
'52.270.000 (+410.000)'],
|
1253
|
+
['25',
|
1254
|
+
'50.779 (-40)',
|
1255
|
+
'1.269.480 (-1.000)',
|
1256
|
+
'1.047.040 (+8.200)',
|
1257
|
+
'26.176.000 (+205.000)'],
|
1258
|
+
['10',
|
1259
|
+
'127.450 (-100)',
|
1260
|
+
'1.274.500 (-1.000)',
|
1261
|
+
'1.052.200 (+8.200)',
|
1262
|
+
'10.522.000 (+82.000)'],
|
1263
|
+
['5',
|
1264
|
+
'256.000 (-200)',
|
1265
|
+
'1.280.000 (-1.000)',
|
1266
|
+
'1.057.800 (+8.200)',
|
1267
|
+
'5.289.000 (+41.000)'],
|
1268
|
+
['3',
|
1269
|
+
'428.889 (-333)',
|
1270
|
+
'1.286.667 (-1.000)',
|
1271
|
+
'1.064.667 (+8.000)',
|
1272
|
+
'3.194.000 (+24.000)'],
|
1273
|
+
['2',
|
1274
|
+
'647.500 (-500)',
|
1275
|
+
'1.295.000 (-1.000)',
|
1276
|
+
'1.073.500 (+8.500)',
|
1277
|
+
'2.147.000 (+17.000)'],
|
1278
|
+
['1',
|
1279
|
+
'1.325.000 (-1.000)',
|
1280
|
+
'1.325.000 (-1.000)',
|
1281
|
+
'1.104.000 (+8.000)',
|
1282
|
+
'1.104.000 (+8.000)'],
|
1283
|
+
['0.5',
|
1284
|
+
'2.850.000 (-2.000)',
|
1285
|
+
'1.425.000 (-1.000)',
|
1286
|
+
'1.208.000 (+8.000)',
|
1287
|
+
'604.000 (+4.000)'],
|
1288
|
+
['Update harga LM Antam :29 April 2024, pukul 07:56Harga pembelian kembali '
|
1289
|
+
':Rp. 1.221.000/gram (-1.000)',
|
1388
1290
|
'Update harga LM Pegadaian :31 Agustus 2023']],
|
1389
|
-
[['Spot Harga Emas Hari Ini (Market
|
1291
|
+
[['Spot Harga Emas Hari Ini (Market Open)'],
|
1390
1292
|
['Satuan', 'USD', 'Kurs\xa0Dollar', 'IDR'],
|
1391
|
-
['Ounce\xa0(oz)', '2.
|
1392
|
-
['Gram\xa0(gr)', '75,
|
1393
|
-
['Kilogram\xa0(kg)', '75.
|
1394
|
-
['Update harga emas :
|
1293
|
+
['Ounce\xa0(oz)', '2.338,37 (+0,43)', '16.222,00 (+14,00)', '37.933.038'],
|
1294
|
+
['Gram\xa0(gr)', '75,18', '16.222,00', '1.219.575 (+1.277)'],
|
1295
|
+
['Kilogram\xa0(kg)', '75.180,34', '16.222,00', '1.219.575.497'],
|
1296
|
+
['Update harga emas :29 April 2024, pukul 15:54Update kurs :29 April 2024, '
|
1395
1297
|
'pukul 13:10']],
|
1396
1298
|
[['Gram', 'UBS Gold 99.99%'],
|
1397
1299
|
['Jual', 'Beli'],
|
1398
1300
|
['/ Batang', '/ Gram', '/ Batang', '/ Gram'],
|
1399
|
-
['100',
|
1400
|
-
|
1401
|
-
|
1402
|
-
|
1403
|
-
|
1404
|
-
['
|
1405
|
-
|
1301
|
+
['100',
|
1302
|
+
'126.300.000 (-512.000)',
|
1303
|
+
'1.263.000 (-5.120)',
|
1304
|
+
'124.985.000',
|
1305
|
+
'1.249.850'],
|
1306
|
+
['50',
|
1307
|
+
'63.300.000 (-145.000)',
|
1308
|
+
'1.266.000 (-2.900)',
|
1309
|
+
'62.545.000',
|
1310
|
+
'1.250.900'],
|
1311
|
+
['25',
|
1312
|
+
'31.700.000 (-62.000)',
|
1313
|
+
'1.268.000 (-2.480)',
|
1314
|
+
'31.375.000',
|
1315
|
+
'1.255.000'],
|
1316
|
+
['10',
|
1317
|
+
'12.720.000 (-35.000)',
|
1318
|
+
'1.272.000 (-3.500)',
|
1319
|
+
'12.600.000',
|
1320
|
+
'1.260.000'],
|
1321
|
+
['5', '6.385.000 (-20.000)', '1.277.000 (-4.000)', '6.352.000', '1.270.400'],
|
1322
|
+
['1', '1.325.000 (-1.000)', '1.325.000 (-1.000)', '1.303.000', '1.303.000'],
|
1323
|
+
['', 'Update :29 April 2024, pukul 11:44']],
|
1406
1324
|
[['Konversi Satuan'],
|
1407
1325
|
['Satuan', 'Ounce (oz)', 'Gram (gr)', 'Kilogram (kg)'],
|
1408
1326
|
['Ounce\xa0(oz)', '1', '31,1034767696', '0,0311034768'],
|
@@ -1412,37 +1330,37 @@ Output:
|
|
1412
1330
|
['Waktu', 'Emas'],
|
1413
1331
|
['Unit', 'USD', 'IDR'],
|
1414
1332
|
['Angka', '+/-', 'Angka', '+/-'],
|
1415
|
-
['Hari Ini', 'Kurs', '', '', '16.208', '%'],
|
1416
|
-
['oz', '2.
|
1417
|
-
['gr', '75,
|
1418
|
-
['30 Hari', 'Kurs', '', '', '15.853', '+
|
1419
|
-
['oz', '2.232,75', '+105,
|
1420
|
-
['gr', '71,78', '+3,
|
1421
|
-
['2 Bulan', 'Kurs', '', '', '15.
|
1422
|
-
['oz', '2.
|
1423
|
-
['gr', '65,
|
1424
|
-
['6 Bulan', 'Kurs', '', '', '15.
|
1425
|
-
['oz', '1.
|
1426
|
-
['gr', '
|
1427
|
-
['1 Tahun', 'Kurs', '', '', '15.731', '+
|
1428
|
-
['oz', '1.823,86', '+514,
|
1429
|
-
['gr', '58,64', '+16,
|
1430
|
-
['2 Tahun', 'Kurs', '', '', '14.418', '+1.
|
1431
|
-
['oz', '1.
|
1432
|
-
['gr', '
|
1433
|
-
['3 Tahun', 'Kurs', '', '', '14.
|
1434
|
-
['oz', '1.
|
1435
|
-
['gr', '56,
|
1436
|
-
['5 Tahun', 'Kurs', '', '', '14.215', '+
|
1437
|
-
['oz', '1.
|
1438
|
-
['gr', '41,
|
1333
|
+
['Hari Ini', 'Kurs', '', '', '16.208', '+14+0,09%'],
|
1334
|
+
['oz', '2.337,94', '+0,43+0,02%', '37.893.332', '+39.707+0,10%'],
|
1335
|
+
['gr', '75,17', '+0,01+0,02%', '1.218.299', '+1.277+0,10%'],
|
1336
|
+
['30 Hari', 'Kurs', '', '', '15.853', '+369+2,33%'],
|
1337
|
+
['oz', '2.232,75', '+105,62+4,73%', '35.395.786', '+2.537.252+7,17%'],
|
1338
|
+
['gr', '71,78', '+3,40+4,73%', '1.138.001', '+81.575+7,17%'],
|
1339
|
+
['2 Bulan', 'Kurs', '', '', '15.673', '+549+3,50%'],
|
1340
|
+
['oz', '2.045,83', '+292,54+14,30%', '32.064.294', '+5.868.745+18,30%'],
|
1341
|
+
['gr', '65,77', '+9,41+14,30', '1.030.891', '+188.685+18,30%'],
|
1342
|
+
['6 Bulan', 'Kurs', '', '', '15.897', '+325+2,04%'],
|
1343
|
+
['oz', '1.977,80', '+360,57+18,23%', '31.441.087', '+6.491.952+20,65%'],
|
1344
|
+
['gr', '63,59', '+11,59+18,23%', '1.010.854', '+208.721+20,65%'],
|
1345
|
+
['1 Tahun', 'Kurs', '', '', '15.731', '+491+3,12%'],
|
1346
|
+
['oz', '1.823,86', '+514,51+28,21%', '28.691.142', '+9.241.896+32,21%'],
|
1347
|
+
['gr', '58,64', '+16,54+28,21%', '922.442', '+297.134+32,21%'],
|
1348
|
+
['2 Tahun', 'Kurs', '', '', '14.418', '+1.804+12,51%'],
|
1349
|
+
['oz', '1.896,95', '+441,42+23,27%', '27.350.225', '+10.582.813+38,69%'],
|
1350
|
+
['gr', '60,99', '+14,19+23,27%', '879.330', '+340.245+38,69%'],
|
1351
|
+
['3 Tahun', 'Kurs', '', '', '14.468', '+1.754+12,12%'],
|
1352
|
+
['oz', '1.767,08', '+571,29+32,33%', '25.566.113', '+12.366.925+48,37%'],
|
1353
|
+
['gr', '56,81', '+18,37+32,33%', '821.970', '+397.606+48,37%'],
|
1354
|
+
['5 Tahun', 'Kurs', '', '', '14.215', '+2.007+14,12%'],
|
1355
|
+
['oz', '1.280,61', '+1.057,76+82,60%', '18.203.871', '+19.729.167+108,38%'],
|
1356
|
+
['gr', '41,17', '+34,01+82,60%', '585.268', '+634.307+108,38%']])
|
1439
1357
|
(['Home', 'Emas 1 Gram', 'History', 'Trend', 'Perak 1 Gram', 'Pluang'],
|
1440
1358
|
[[''],
|
1441
1359
|
['Emas 24 KaratHarga Emas 1 Gram', ''],
|
1442
|
-
['USD', '75,
|
1443
|
-
['KURS', '16.
|
1444
|
-
['IDR', '1.
|
1445
|
-
['
|
1360
|
+
['USD', '75,18↑', '+0,01+0,01%'],
|
1361
|
+
['KURS', '16.258,10↑', '+16,80+0,10%'],
|
1362
|
+
['IDR', '1.222.273,83↑', '+1.471,89+0,12%'],
|
1363
|
+
['Senin, 29 April 2024 15:55']],
|
1446
1364
|
[[''],
|
1447
1365
|
['Emas 1 Gram (IDR)Emas 1 Gram (USD)Kurs USD-IDR',
|
1448
1366
|
'Hari Ini',
|
@@ -1453,19 +1371,19 @@ Output:
|
|
1453
1371
|
'']],
|
1454
1372
|
[['Pergerakkan Harga Emas 1 Gram'],
|
1455
1373
|
['', 'Penutupan Kemarin', 'Pergerakkan Hari Ini', 'Rata-rata'],
|
1456
|
-
['USD', '75,17', '75,17 - 75,
|
1457
|
-
['KURS', '16.241,30', '16.241,30 - 16.
|
1458
|
-
['IDR', '1.220.801,94', '1.220.801,94 - 1.
|
1374
|
+
['USD', '75,17', '75,17 - 75,18', '75,18'],
|
1375
|
+
['KURS', '16.241,30', '16.241,30 - 16.258,10', '16.249,70'],
|
1376
|
+
['IDR', '1.220.801,94', '1.220.801,94 - 1.222.273,83', '1.221.537,89'],
|
1459
1377
|
[''],
|
1460
1378
|
['', 'Awal Tahun', 'Pergerakkan YTD', '+/- YTD'],
|
1461
|
-
['USD', '66,32', '64,07 - 77,14', '+8,
|
1462
|
-
['KURS', '15.390,10', '15.390,00 - 16.307,80', '+
|
1463
|
-
['IDR', '1.020.729,53', '997.660,12 - 1.256.829,06', '+
|
1379
|
+
['USD', '66,32', '64,07 - 77,14', '+8,86 (13,36%)'],
|
1380
|
+
['KURS', '15.390,10', '15.390,00 - 16.307,80', '+868,00 (5,64%)'],
|
1381
|
+
['IDR', '1.020.729,53', '997.660,12 - 1.256.829,06', '+201.544,30 (19,75%)'],
|
1464
1382
|
[''],
|
1465
1383
|
['', 'Tahun Lalu / 52 Minggu', 'Pergerakkan 52 Minggu', '+/- 52 Minggu'],
|
1466
|
-
['USD', '
|
1467
|
-
['KURS', '14.
|
1468
|
-
['IDR', '
|
1384
|
+
['USD', '64,04', '58,43 - 77,14', '+11,14 (17,40%)'],
|
1385
|
+
['KURS', '14.671,35', '14.669,40 - 16.307,80', '+1.586,75 (10,82%)'],
|
1386
|
+
['IDR', '939.568,98', '912.925,68 - 1.256.829,06', '+282.704,85 (30,09%)']])
|
1469
1387
|
```
|
1470
1388
|
|
1471
1389
|
## iopen
|
@@ -1507,7 +1425,7 @@ Output:
|
|
1507
1425
|
```py
|
1508
1426
|
8
|
1509
1427
|
['mana', 'aja']
|
1510
|
-
[<Element a at
|
1428
|
+
[<Element a at 0x749e6cdea0>, <Element a at 0x749e716cb0>, <Element a at 0x749e716d50>, <Element a at 0x749e716da0>, <Element a at 0x749e716df0>, <Element a at 0x749e716e40>, <Element a at 0x749e716e90>, <Element a at 0x749e716ee0>, <Element a at 0x749e716f30>, <Element a at 0x749e716f80>, <Element a at 0x749e716fd0>, <Element a at 0x749e717020>, <Element a at 0x749e717070>, <Element a at 0x749e7170c0>, <Element a at 0x749e717110>, <Element a at 0x749e717160>, <Element a at 0x749e7171b0>, <Element a at 0x749e717200>, <Element a at 0x749e717250>, <Element a at 0x749e7172a0>]
|
1511
1429
|
False
|
1512
1430
|
```
|
1513
1431
|
|
@@ -1534,7 +1452,7 @@ Output:
|
|
1534
1452
|
|
1535
1453
|
## irange
|
1536
1454
|
|
1537
|
-
`irange(start,
|
1455
|
+
`irange(start, stop=None, step=1, index=0, numbers='abcdefghijklmnopqrstuvwxyz')`
|
1538
1456
|
|
1539
1457
|
Meningkatkan fungsi range() dari python untuk pengulangan menggunakan huruf
|
1540
1458
|
|
@@ -1546,15 +1464,6 @@ print(list(irange(1, '7')))
|
|
1546
1464
|
print(list(irange(10, 5)))
|
1547
1465
|
```
|
1548
1466
|
|
1549
|
-
Output:
|
1550
|
-
```py
|
1551
|
-
<generator object irange at 0x776a67abd0>
|
1552
|
-
<generator object irange at 0x776a67abd0>
|
1553
|
-
['a', 'k', 'u']
|
1554
|
-
[1, 2, 3, 4, 5, 6, 7]
|
1555
|
-
[10, 9, 8, 7, 6, 5]
|
1556
|
-
```
|
1557
|
-
|
1558
1467
|
## ireplace
|
1559
1468
|
|
1560
1469
|
`ireplace(string: str, replacements: dict, flags=re.IGNORECASE|re.MULTILINE|re.DOTALL)`
|
@@ -1592,7 +1501,7 @@ print(list(iscandir("./", recursive=False, scan_file=False)))
|
|
1592
1501
|
|
1593
1502
|
Output:
|
1594
1503
|
```py
|
1595
|
-
<generator object iscandir at
|
1504
|
+
<generator object iscandir at 0x749e6d8540>
|
1596
1505
|
[PosixPath('.git'), PosixPath('.vscode'), PosixPath('pypipr'), PosixPath('__pycache__'), PosixPath('dist')]
|
1597
1506
|
```
|
1598
1507
|
|
@@ -1612,6 +1521,125 @@ Output:
|
|
1612
1521
|
['', 'ini', 'contoh', 'path', '']
|
1613
1522
|
```
|
1614
1523
|
|
1524
|
+
## ivars
|
1525
|
+
|
1526
|
+
`ivars(obj, skip_underscore=True)`
|
1527
|
+
|
1528
|
+
Membuat dictionary berdasarkan kategori untuk setiap
|
1529
|
+
member dari object.
|
1530
|
+
|
1531
|
+
```python
|
1532
|
+
iprint(ivars(__import__('pypipr')))
|
1533
|
+
```
|
1534
|
+
|
1535
|
+
Output:
|
1536
|
+
```py
|
1537
|
+
{'module': {'ibuiltins': <module 'pypipr.ibuiltins' from '/data/data/com.termux/files/home/pypipr/pypipr/ibuiltins/__init__.py'>,
|
1538
|
+
'iconsole': <module 'pypipr.iconsole' from '/data/data/com.termux/files/home/pypipr/pypipr/iconsole/__init__.py'>,
|
1539
|
+
'idjango': <module 'pypipr.idjango' from '/data/data/com.termux/files/home/pypipr/pypipr/idjango/__init__.py'>,
|
1540
|
+
'iengineering': <module 'pypipr.iengineering' from '/data/data/com.termux/files/home/pypipr/pypipr/iengineering/__init__.py'>,
|
1541
|
+
'ifunctions': <module 'pypipr.ifunctions' from '/data/data/com.termux/files/home/pypipr/pypipr/ifunctions/__init__.py'>,
|
1542
|
+
'iflow': <module 'pypipr.iflow' (<_frozen_importlib_external.NamespaceLoader object at 0x74a8a071d0>)>,
|
1543
|
+
'asyncio': <module 'asyncio' from '/data/data/com.termux/files/usr/lib/python3.11/asyncio/__init__.py'>,
|
1544
|
+
'colorama': <module 'colorama' from '/data/data/com.termux/files/usr/lib/python3.11/site-packages/colorama/__init__.py'>,
|
1545
|
+
'csv': <module 'csv' from '/data/data/com.termux/files/usr/lib/python3.11/csv.py'>,
|
1546
|
+
'datetime': <module 'datetime' from '/data/data/com.termux/files/usr/lib/python3.11/datetime.py'>,
|
1547
|
+
'functools': <module 'functools' from '/data/data/com.termux/files/usr/lib/python3.11/functools.py'>,
|
1548
|
+
'inspect': <module 'inspect' from '/data/data/com.termux/files/usr/lib/python3.11/inspect.py'>,
|
1549
|
+
'io': <module 'io' (frozen)>,
|
1550
|
+
'json': <module 'json' from '/data/data/com.termux/files/usr/lib/python3.11/json/__init__.py'>,
|
1551
|
+
'lxml': <module 'lxml' from '/data/data/com.termux/files/usr/lib/python3.11/site-packages/lxml/__init__.py'>,
|
1552
|
+
'math': <module 'math' from '/data/data/com.termux/files/usr/lib/python3.11/lib-dynload/math.cpython-311.so'>,
|
1553
|
+
'multiprocessing': <module 'multiprocessing' from '/data/data/com.termux/files/usr/lib/python3.11/multiprocessing/__init__.py'>,
|
1554
|
+
'operator': <module 'operator' from '/data/data/com.termux/files/usr/lib/python3.11/operator.py'>,
|
1555
|
+
'os': <module 'os' (frozen)>,
|
1556
|
+
'pathlib': <module 'pathlib' from '/data/data/com.termux/files/usr/lib/python3.11/pathlib.py'>,
|
1557
|
+
'pint': <module 'pint' from '/data/data/com.termux/files/usr/lib/python3.11/site-packages/pint/__init__.py'>,
|
1558
|
+
'pprint': <module 'pprint' from '/data/data/com.termux/files/usr/lib/python3.11/pprint.py'>,
|
1559
|
+
'queue': <module 'queue' from '/data/data/com.termux/files/usr/lib/python3.11/queue.py'>,
|
1560
|
+
'random': <module 'random' from '/data/data/com.termux/files/usr/lib/python3.11/random.py'>,
|
1561
|
+
're': <module 're' from '/data/data/com.termux/files/usr/lib/python3.11/re/__init__.py'>,
|
1562
|
+
'requests': <module 'requests' from '/data/data/com.termux/files/usr/lib/python3.11/site-packages/requests/__init__.py'>,
|
1563
|
+
'string': <module 'string' from '/data/data/com.termux/files/usr/lib/python3.11/string.py'>,
|
1564
|
+
'subprocess': <module 'subprocess' from '/data/data/com.termux/files/usr/lib/python3.11/subprocess.py'>,
|
1565
|
+
'sys': <module 'sys' (built-in)>,
|
1566
|
+
'textwrap': <module 'textwrap' from '/data/data/com.termux/files/usr/lib/python3.11/textwrap.py'>,
|
1567
|
+
'threading': <module 'threading' from '/data/data/com.termux/files/usr/lib/python3.11/threading.py'>,
|
1568
|
+
'time': <module 'time' (built-in)>,
|
1569
|
+
'tzdata': <module 'tzdata' from '/data/data/com.termux/files/usr/lib/python3.11/site-packages/tzdata/__init__.py'>,
|
1570
|
+
'uuid': <module 'uuid' from '/data/data/com.termux/files/usr/lib/python3.11/uuid.py'>,
|
1571
|
+
'webbrowser': <module 'webbrowser' from '/data/data/com.termux/files/usr/lib/python3.11/webbrowser.py'>,
|
1572
|
+
'yaml': <module 'yaml' from '/data/data/com.termux/files/usr/lib/python3.11/site-packages/yaml/__init__.py'>,
|
1573
|
+
'zoneinfo': <module 'zoneinfo' from '/data/data/com.termux/files/usr/lib/python3.11/zoneinfo/__init__.py'>},
|
1574
|
+
'class': {'ComparePerformance': <class 'pypipr.ibuiltins.ComparePerformance.ComparePerformance'>,
|
1575
|
+
'RunParallel': <class 'pypipr.ibuiltins.RunParallel.RunParallel'>,
|
1576
|
+
'APIMixinView': <class 'pypipr.idjango.APIMixinView.APIMixinView'>,
|
1577
|
+
'PintUregQuantity': <class 'pint.Quantity'>},
|
1578
|
+
'variable': {'LINUX': True,
|
1579
|
+
'WINDOWS': False,
|
1580
|
+
'PintUreg': <pint.registry.UnitRegistry object at 0x74a49a8750>},
|
1581
|
+
'function': {'avg': <function avg at 0x74aa3b6d40>,
|
1582
|
+
'basename': <function basename at 0x74aa3868e0>,
|
1583
|
+
'chr_to_int': <function chr_to_int at 0x74a8955080>,
|
1584
|
+
'chunk_array': <function chunk_array at 0x74a89551c0>,
|
1585
|
+
'create_folder': <function create_folder at 0x74a89553a0>,
|
1586
|
+
'datetime_from_string': <function datetime_from_string at 0x74a8955580>,
|
1587
|
+
'datetime_now': <function datetime_now at 0x74a89fd620>,
|
1588
|
+
'dict_first': <function dict_first at 0x74a89fd580>,
|
1589
|
+
'dirname': <function dirname at 0x74a89fd4e0>,
|
1590
|
+
'exit_if_empty': <function exit_if_empty at 0x74a89fd3a0>,
|
1591
|
+
'filter_empty': <function filter_empty at 0x74a89fd1c0>,
|
1592
|
+
'get_by_index': <function get_by_index at 0x74a89fce00>,
|
1593
|
+
'get_class_method': <function get_class_method at 0x74a89fccc0>,
|
1594
|
+
'get_filemtime': <function get_filemtime at 0x74a89fcb80>,
|
1595
|
+
'get_filesize': <function get_filesize at 0x74a89fc9a0>,
|
1596
|
+
'int_to_chr': <function int_to_chr at 0x74a89fc900>,
|
1597
|
+
'is_empty': <function is_empty at 0x74a89fd260>,
|
1598
|
+
'is_iterable': <function is_iterable at 0x74a89fcfe0>,
|
1599
|
+
'is_valid_url': <function is_valid_url at 0x74a89fc7c0>,
|
1600
|
+
'password_generator': <function password_generator at 0x74a89fc680>,
|
1601
|
+
'random_bool': <function random_bool at 0x74a89fc4a0>,
|
1602
|
+
'restart': <function restart at 0x74a89ff7e0>,
|
1603
|
+
'set_timeout': <function set_timeout at 0x74a89ff920>,
|
1604
|
+
'sets_ordered': <function sets_ordered at 0x74a89ffa60>,
|
1605
|
+
'str_cmp': <function str_cmp at 0x74a89ffb00>,
|
1606
|
+
'to_str': <function to_str at 0x74a89fcf40>,
|
1607
|
+
'choices': <function choices at 0x74a89ffba0>,
|
1608
|
+
'console_run': <function console_run at 0x74a89ffe20>,
|
1609
|
+
'input_char': <function input_char at 0x74a89fff60>,
|
1610
|
+
'log': <function log at 0x74a8a20180>,
|
1611
|
+
'print_colorize': <function print_colorize at 0x74a8a20220>,
|
1612
|
+
'print_dir': <function print_dir at 0x74a8a20360>,
|
1613
|
+
'print_log': <function print_log at 0x74a8a20040>,
|
1614
|
+
'print_to_last_line': <function print_to_last_line at 0x74a89ffd80>,
|
1615
|
+
'text_colorize': <function text_colorize at 0x74a89ffec0>,
|
1616
|
+
'batch_calculate': <function batch_calculate at 0x74a3b896c0>,
|
1617
|
+
'batchmaker': <function batchmaker at 0x74a3b8a160>,
|
1618
|
+
'calculate': <function calculate at 0x74a3b8a480>,
|
1619
|
+
'auto_reload': <function auto_reload at 0x74a3b8a700>,
|
1620
|
+
'github_pull': <function github_pull at 0x74a3b8a520>,
|
1621
|
+
'github_push': <function github_push at 0x74a38b20c0>,
|
1622
|
+
'github_user': <function github_user at 0x74a38b2160>,
|
1623
|
+
'pip_freeze_without_version': <function pip_freeze_without_version at 0x74a38b22a0>,
|
1624
|
+
'poetry_publish': <function poetry_publish at 0x74a38b2340>,
|
1625
|
+
'poetry_update_version': <function poetry_update_version at 0x74a38d6c00>,
|
1626
|
+
'iargv': <function iargv at 0x74a1e8c360>,
|
1627
|
+
'idumps': <function idumps at 0x74a1e8c4a0>,
|
1628
|
+
'idumps_html': <function idumps_html at 0x74a1ef4ea0>,
|
1629
|
+
'ienv': <function ienv at 0x74a1e8c5e0>,
|
1630
|
+
'iexec': <function iexec at 0x74a1ef5120>,
|
1631
|
+
'ijoin': <function ijoin at 0x74a38b23e0>,
|
1632
|
+
'iloads': <function iloads at 0x74a1ef51c0>,
|
1633
|
+
'iloads_html': <function iloads_html at 0x74a1ef5440>,
|
1634
|
+
'iopen': <function iopen at 0x74a38b2480>,
|
1635
|
+
'iprint': <function iprint at 0x74a1ef5300>,
|
1636
|
+
'irange': <function irange at 0x74a3b8a660>,
|
1637
|
+
'ireplace': <function ireplace at 0x74a1ef54e0>,
|
1638
|
+
'iscandir': <function iscandir at 0x74a1ef7100>,
|
1639
|
+
'isplit': <function isplit at 0x74a1ef71a0>,
|
1640
|
+
'ivars': <function ivars at 0x74a1ef7240>}}
|
1641
|
+
```
|
1642
|
+
|
1615
1643
|
# CLASS
|
1616
1644
|
|
1617
1645
|
## ComparePerformance
|
@@ -1649,7 +1677,7 @@ print(ExampleComparePerformance().compare_performance())
|
|
1649
1677
|
|
1650
1678
|
Output:
|
1651
1679
|
```py
|
1652
|
-
{'a': <generator object ExampleComparePerformance.a.<locals>.<genexpr> at
|
1680
|
+
{'a': <generator object ExampleComparePerformance.a.<locals>.<genexpr> at 0x749e6ec2b0>,
|
1653
1681
|
'b': (0, 1, 2, 3, 4, 5, 6, 7, 8, 9),
|
1654
1682
|
'c': [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
|
1655
1683
|
'd': [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
pypipr/__init__.py,sha256=
|
1
|
+
pypipr/__init__.py,sha256=xF-QLYZ6yu0LyMnM8mXP1D_y4e6xqT2whzOqasu3Jfc,3488
|
2
2
|
pypipr/ibuiltins/ComparePerformance.py,sha256=fCATdlDgmgiz7QkQNLDMF9VweicesjOaTtfQeBRr64U,2229
|
3
3
|
pypipr/ibuiltins/LINUX.py,sha256=p8OJwS9GCs50pz2UlcbUooPWSZgWmLI67PjcnzDTSWI,100
|
4
4
|
pypipr/ibuiltins/RunParallel.py,sha256=BnMasZTnr2gUVVy9dOXePlL_-ud2rWkVPFL2i-sN7rg,7358
|
@@ -23,7 +23,6 @@ pypipr/ibuiltins/int_to_chr.py,sha256=B-HnKziRQgDObsr2vMd2TnL3EkZAIMbK6fSY8b8r_d
|
|
23
23
|
pypipr/ibuiltins/is_empty.py,sha256=eqsH6ATuuOLVVSpIsV_8zTBBibPrWjESu9LCMAv8YyY,683
|
24
24
|
pypipr/ibuiltins/is_iterable.py,sha256=VCzLfFZyQO5qF2wFTVbuZIxyf4BVkflWiRQaOjd9kFs,922
|
25
25
|
pypipr/ibuiltins/is_valid_url.py,sha256=g72vv4_9Zy8dtT0i1JvToRX-mgCzojQCBVHdO1KDwqo,1008
|
26
|
-
pypipr/ibuiltins/ivars.py,sha256=CM9HFjF9qLg9Bn385CZXLtTALCt_pxhEOEueTm1uNDM,899
|
27
26
|
pypipr/ibuiltins/password_generator.py,sha256=NnFAYkAr6kZiED4JZIJ15_VeGWSpBCCy9rSA5Re_CW4,496
|
28
27
|
pypipr/ibuiltins/random_bool.py,sha256=99kM1fy7figeG5mZhbPzQ3FFzV47Jxg1aPImF78298E,405
|
29
28
|
pypipr/ibuiltins/restart.py,sha256=yFqjvFAEtmEnv1wUubyW7sgIKUFqO441R9T1D3GSIFk,114
|
@@ -67,13 +66,15 @@ pypipr/ifunctions/iloads.py,sha256=eyvSgqDxOXzU5dcPDT8cbtGtUIfjogxOqeQfwIhc92Q,6
|
|
67
66
|
pypipr/ifunctions/iloads_html.py,sha256=gGGOwv0gHsWAMxxBxNGZL3jpXz9ycTiAbAbarFndckg,4146
|
68
67
|
pypipr/ifunctions/iopen.py,sha256=2nEJRSMwlWCIrLD59DKCnP-Sxy_bPUMV836GNRKNiCY,2808
|
69
68
|
pypipr/ifunctions/iprint.py,sha256=_YXD_h68Olgt-3DbtbseoOpsIB2E2RHuJgIunnJxSOY,849
|
70
|
-
pypipr/ifunctions/irange.py,sha256=
|
69
|
+
pypipr/ifunctions/irange.py,sha256=DP9iJ5KBcYJDN2HKvH9EU17IA9uC22KUPE6Tr1Mg14w,1092
|
70
|
+
pypipr/ifunctions/irange.py.bak,sha256=x51vzQ8aAbToJBZgCX32QgAjr7Vm_Zw1MdIwSA3tVsM,2407
|
71
71
|
pypipr/ifunctions/ireplace.py,sha256=RcVMXmbXH_cl4hXpTI5wnuzdPtkatpuZgYsZkfBLAJU,722
|
72
72
|
pypipr/ifunctions/iscandir.py,sha256=U1zvRZrz--5Kge0JooQbY4kQN17bRt-8XR26ZFxUyoA,748
|
73
73
|
pypipr/ifunctions/isplit.py,sha256=N2BiA_wVnrENYwokSzvo0CAiQWk3g7AnwuWFIUgevNM,383
|
74
|
+
pypipr/ifunctions/ivars.py,sha256=CM9HFjF9qLg9Bn385CZXLtTALCt_pxhEOEueTm1uNDM,899
|
74
75
|
pypipr/pypipr.py.bak,sha256=HF-ehQd6BY8hm9fRkQHravLNrJRlI5g_AzbCc3dbikQ,1061
|
75
76
|
pypipr/terminal.py,sha256=4w-2p_Rudm_dNdfG-rkO24heVgKLrve4xVXiRpWxVcc,1800
|
76
|
-
pypipr-1.0.
|
77
|
-
pypipr-1.0.
|
78
|
-
pypipr-1.0.
|
79
|
-
pypipr-1.0.
|
77
|
+
pypipr-1.0.100.dist-info/METADATA,sha256=Hag4Nlnqk7gi_fzuTj74QCdWblmLaz5A8B0yclbn8tI,49615
|
78
|
+
pypipr-1.0.100.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
79
|
+
pypipr-1.0.100.dist-info/entry_points.txt,sha256=ikcrTRCn3jaySem1mM9uhYEPDq2PVOs48CyEqLUkY38,47
|
80
|
+
pypipr-1.0.100.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|