pypipr 1.0.99__py3-none-any.whl → 1.0.101__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/ifunctions/irange.py +17 -60
- pypipr/ifunctions/irange.py.bak +81 -0
- {pypipr-1.0.99.dist-info → pypipr-1.0.101.dist-info}/METADATA +153 -166
- {pypipr-1.0.99.dist-info → pypipr-1.0.101.dist-info}/RECORD +6 -5
- {pypipr-1.0.99.dist-info → pypipr-1.0.101.dist-info}/WHEEL +0 -0
- {pypipr-1.0.99.dist-info → pypipr-1.0.101.dist-info}/entry_points.txt +0 -0
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 = numbers[0] if isinstance(start, str) else 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 berbeda tipe")
|
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.101
|
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 0x7f123cc040>
|
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-29
|
175
|
-
2024-04-29
|
176
|
-
2024-04-
|
174
|
+
2024-04-29 16:19:07.710087+07:00
|
175
|
+
2024-04-29 09:19:07.711655+00:00
|
176
|
+
2024-04-29 02:19:07.715625-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 0x7f12362d40>
|
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 0x7f12363010>
|
290
|
+
[<function ExampleGetClassMethod.a at 0x7f123d58a0>, <function ExampleGetClassMethod.b at 0x7f123d5760>, <function ExampleGetClassMethod.c at 0x7f123d5940>, <function ExampleGetClassMethod.d at 0x7f123d59e0>]
|
291
291
|
```
|
292
292
|
|
293
293
|
## get_filemtime
|
@@ -455,7 +455,7 @@ print(password_generator())
|
|
455
455
|
|
456
456
|
Output:
|
457
457
|
```py
|
458
|
-
|
458
|
+
=)xC!Q`c
|
459
459
|
```
|
460
460
|
|
461
461
|
## random_bool
|
@@ -499,7 +499,7 @@ x.cancel()
|
|
499
499
|
|
500
500
|
Output:
|
501
501
|
```py
|
502
|
-
<Timer(Thread-2, started
|
502
|
+
<Timer(Thread-2, started 545743019248)>
|
503
503
|
menghentikan timeout 7
|
504
504
|
```
|
505
505
|
|
@@ -517,7 +517,7 @@ print(list(sets_ordered(array)))
|
|
517
517
|
|
518
518
|
Output:
|
519
519
|
```py
|
520
|
-
<generator object sets_ordered at
|
520
|
+
<generator object sets_ordered at 0x7f123e02b0>
|
521
521
|
[2, 3, 12, 42, 1, 43, 41, 4, 24, 32]
|
522
522
|
```
|
523
523
|
|
@@ -671,7 +671,7 @@ Output:
|
|
671
671
|
__enter__ : https:/www.google.com
|
672
672
|
__fspath__ : https:/www.google.com
|
673
673
|
__getstate__ : (None, {'_drv': '', '_root': '', '_parts': ['https:', 'www.google.com'], '_str': 'https:/www.google.com'})
|
674
|
-
__hash__ :
|
674
|
+
__hash__ : 2542810184995871325
|
675
675
|
__init__ : None
|
676
676
|
__init_subclass__ : None
|
677
677
|
__module__ : pathlib
|
@@ -684,8 +684,8 @@ Output:
|
|
684
684
|
_cached_cparts : ['https:', 'www.google.com']
|
685
685
|
_cparts : ['https:', 'www.google.com']
|
686
686
|
_drv :
|
687
|
-
_flavour : <pathlib._PosixFlavour object at
|
688
|
-
_hash :
|
687
|
+
_flavour : <pathlib._PosixFlavour object at 0x7f26b089d0>
|
688
|
+
_hash : 2542810184995871325
|
689
689
|
_parts : ['https:', 'www.google.com']
|
690
690
|
_root :
|
691
691
|
_str : https:/www.google.com
|
@@ -707,7 +707,7 @@ Output:
|
|
707
707
|
is_reserved : False
|
708
708
|
is_socket : False
|
709
709
|
is_symlink : False
|
710
|
-
iterdir : <generator object Path.iterdir at
|
710
|
+
iterdir : <generator object Path.iterdir at 0x7f123b8ba0>
|
711
711
|
joinpath : https:/www.google.com
|
712
712
|
name : www.google.com
|
713
713
|
parent : https:
|
@@ -772,12 +772,6 @@ print(batch_calculate("{1 10} m ** {1 3}"))
|
|
772
772
|
print(list(batch_calculate("{1 10} m ** {1 3}")))
|
773
773
|
```
|
774
774
|
|
775
|
-
Output:
|
776
|
-
```py
|
777
|
-
<generator object batch_calculate at 0x77ab207b50>
|
778
|
-
[('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')>)]
|
779
|
-
```
|
780
|
-
|
781
775
|
## batchmaker
|
782
776
|
|
783
777
|
`batchmaker(pattern: str)`
|
@@ -797,12 +791,6 @@ print(batchmaker(s))
|
|
797
791
|
print(list(batchmaker(s)))
|
798
792
|
```
|
799
793
|
|
800
|
-
Output:
|
801
|
-
```py
|
802
|
-
<generator object batchmaker at 0x77ab26c3a0>
|
803
|
-
['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.']
|
804
|
-
```
|
805
|
-
|
806
794
|
## calculate
|
807
795
|
|
808
796
|
`calculate(teks)`
|
@@ -1163,7 +1151,7 @@ print(ijoin(10, ' '))
|
|
1163
1151
|
|
1164
1152
|
Output:
|
1165
1153
|
```py
|
1166
|
-
qweqw, dfs, weq
|
1154
|
+
qweqw, asd, dfs, weq
|
1167
1155
|
,ini,path,seperti,url,
|
1168
1156
|
ini,path,seperti,url
|
1169
1157
|
<li>satu</li>
|
@@ -1229,9 +1217,9 @@ Output:
|
|
1229
1217
|
```py
|
1230
1218
|
(['Home', 'Emas 1 Gram', 'History', 'Trend', 'Perak 1 Gram', 'Pluang'],
|
1231
1219
|
[['Harga Emas Hari Ini - Senin, 29 April 2024'],
|
1232
|
-
['Spot Emas USD
|
1233
|
-
'Kurs
|
1234
|
-
'Emas IDR
|
1220
|
+
['Spot Emas USD↑2.338,07 (+0,13) / oz',
|
1221
|
+
'Kurs IDR↑16.222,00 (+14,00) / USD',
|
1222
|
+
'Emas IDR↑1.219.419 (+1.120) / gr'],
|
1235
1223
|
['LM Antam (Jual)↓1.325.000 (-1.000) / gr',
|
1236
1224
|
'LM Antam (Beli)↓1.221.000 (-1.000) / gr']],
|
1237
1225
|
[['Harga Emas Hari Ini'],
|
@@ -1302,37 +1290,45 @@ Output:
|
|
1302
1290
|
'Update harga LM Pegadaian :31 Agustus 2023']],
|
1303
1291
|
[['Spot Harga Emas Hari Ini (Market Open)'],
|
1304
1292
|
['Satuan', 'USD', 'Kurs\xa0Dollar', 'IDR'],
|
1305
|
-
['Ounce\xa0(oz)', '2.
|
1306
|
-
['Gram\xa0(gr)', '
|
1307
|
-
['Kilogram\xa0(kg)', '
|
1308
|
-
['Update harga emas :29 April 2024, pukul
|
1293
|
+
['Ounce\xa0(oz)', '2.338,07 (+0,13)', '16.222,00 (+14,00)', '37.928.172'],
|
1294
|
+
['Gram\xa0(gr)', '75,17', '16.222,00', '1.219.419 (+1.120)'],
|
1295
|
+
['Kilogram\xa0(kg)', '75.170,70', '16.222,00', '1.219.419.032'],
|
1296
|
+
['Update harga emas :29 April 2024, pukul 16:19Update kurs :29 April 2024, '
|
1309
1297
|
'pukul 13:10']],
|
1310
1298
|
[['Gram', 'UBS Gold 99.99%'],
|
1311
1299
|
['Jual', 'Beli'],
|
1312
1300
|
['/ Batang', '/ Gram', '/ Batang', '/ Gram'],
|
1313
1301
|
['100',
|
1314
|
-
'126.
|
1315
|
-
'1.
|
1316
|
-
'
|
1317
|
-
'1.
|
1302
|
+
'126.300.000 (-512.000)',
|
1303
|
+
'1.263.000 (-5.120)',
|
1304
|
+
'125.185.000 (+200.000)',
|
1305
|
+
'1.251.850 (+2.000)'],
|
1318
1306
|
['50',
|
1319
|
-
'63.
|
1320
|
-
'1.
|
1321
|
-
'62.
|
1322
|
-
'1.
|
1307
|
+
'63.300.000 (-145.000)',
|
1308
|
+
'1.266.000 (-2.900)',
|
1309
|
+
'62.645.000 (+100.000)',
|
1310
|
+
'1.252.900 (+2.000)'],
|
1323
1311
|
['25',
|
1324
|
-
'31.
|
1325
|
-
'1.
|
1326
|
-
'31.
|
1327
|
-
'1.
|
1312
|
+
'31.700.000 (-62.000)',
|
1313
|
+
'1.268.000 (-2.480)',
|
1314
|
+
'31.425.000 (+50.000)',
|
1315
|
+
'1.257.000 (+2.000)'],
|
1328
1316
|
['10',
|
1329
|
-
'12.
|
1330
|
-
'1.
|
1331
|
-
'12.
|
1332
|
-
'1.
|
1333
|
-
['5',
|
1334
|
-
|
1335
|
-
|
1317
|
+
'12.720.000 (-35.000)',
|
1318
|
+
'1.272.000 (-3.500)',
|
1319
|
+
'12.620.000 (+20.000)',
|
1320
|
+
'1.262.000 (+2.000)'],
|
1321
|
+
['5',
|
1322
|
+
'6.385.000 (-20.000)',
|
1323
|
+
'1.277.000 (-4.000)',
|
1324
|
+
'6.362.000 (+10.000)',
|
1325
|
+
'1.272.400 (+2.000)'],
|
1326
|
+
['1',
|
1327
|
+
'1.325.000 (-1.000)',
|
1328
|
+
'1.325.000 (-1.000)',
|
1329
|
+
'1.305.000 (+2.000)',
|
1330
|
+
'1.305.000 (+2.000)'],
|
1331
|
+
['', 'Update :29 April 2024, pukul 16:06']],
|
1336
1332
|
[['Konversi Satuan'],
|
1337
1333
|
['Satuan', 'Ounce (oz)', 'Gram (gr)', 'Kilogram (kg)'],
|
1338
1334
|
['Ounce\xa0(oz)', '1', '31,1034767696', '0,0311034768'],
|
@@ -1342,37 +1338,37 @@ Output:
|
|
1342
1338
|
['Waktu', 'Emas'],
|
1343
1339
|
['Unit', 'USD', 'IDR'],
|
1344
1340
|
['Angka', '+/-', 'Angka', '+/-'],
|
1345
|
-
['Hari Ini', 'Kurs', '', '', '16.208', '%'],
|
1346
|
-
['oz', '2.337,94', '
|
1347
|
-
['gr', '75,17', '
|
1348
|
-
['30 Hari', 'Kurs', '', '', '15.853', '+
|
1349
|
-
['oz', '2.232,75', '+
|
1350
|
-
['gr', '71,78', '+3,
|
1351
|
-
['2 Bulan', 'Kurs', '', '', '15.673', '+
|
1352
|
-
['oz', '2.045,83', '+
|
1353
|
-
['gr', '65,77', '+9,
|
1354
|
-
['6 Bulan', 'Kurs', '', '', '15.897', '+
|
1355
|
-
['oz', '1.977,80', '+
|
1356
|
-
['gr', '63,59', '+11,
|
1357
|
-
['1 Tahun', 'Kurs', '', '', '15.731', '+
|
1358
|
-
['oz', '1.823,86', '+
|
1359
|
-
['gr', '58,64', '+16,
|
1360
|
-
['2 Tahun', 'Kurs', '', '', '14.418', '+1.
|
1361
|
-
['oz', '1.896,95', '+
|
1362
|
-
['gr', '60,99', '+
|
1363
|
-
['3 Tahun', 'Kurs', '', '', '14.468', '+1.
|
1364
|
-
['oz', '1.767,08', '+
|
1365
|
-
['gr', '56,81', '+18,
|
1366
|
-
['5 Tahun', 'Kurs', '', '', '14.215', '+
|
1367
|
-
['oz', '1.280,61', '+1.
|
1368
|
-
['gr', '41,17', '+
|
1341
|
+
['Hari Ini', 'Kurs', '', '', '16.208', '+14+0,09%'],
|
1342
|
+
['oz', '2.337,94', '+0,13+0,01%', '37.893.332', '+34.840+0,09%'],
|
1343
|
+
['gr', '75,17', '+0,00+0,01%', '1.218.299', '+1.120+0,09%'],
|
1344
|
+
['30 Hari', 'Kurs', '', '', '15.853', '+369+2,33%'],
|
1345
|
+
['oz', '2.232,75', '+105,32+4,72%', '35.395.786', '+2.532.386+7,15%'],
|
1346
|
+
['gr', '71,78', '+3,39+4,72%', '1.138.001', '+81.418+7,15%'],
|
1347
|
+
['2 Bulan', 'Kurs', '', '', '15.673', '+549+3,50%'],
|
1348
|
+
['oz', '2.045,83', '+292,24+14,28%', '32.064.294', '+5.863.878+18,29%'],
|
1349
|
+
['gr', '65,77', '+9,40+14,28', '1.030.891', '+188.528+18,29%'],
|
1350
|
+
['6 Bulan', 'Kurs', '', '', '15.897', '+325+2,04%'],
|
1351
|
+
['oz', '1.977,80', '+360,27+18,22%', '31.441.087', '+6.487.085+20,63%'],
|
1352
|
+
['gr', '63,59', '+11,58+18,22%', '1.010.854', '+208.565+20,63%'],
|
1353
|
+
['1 Tahun', 'Kurs', '', '', '15.731', '+491+3,12%'],
|
1354
|
+
['oz', '1.823,86', '+514,21+28,19%', '28.691.142', '+9.237.030+32,19%'],
|
1355
|
+
['gr', '58,64', '+16,53+28,19%', '922.442', '+296.977+32,19%'],
|
1356
|
+
['2 Tahun', 'Kurs', '', '', '14.418', '+1.804+12,51%'],
|
1357
|
+
['oz', '1.896,95', '+441,12+23,25%', '27.350.225', '+10.577.946+38,68%'],
|
1358
|
+
['gr', '60,99', '+14,18+23,25%', '879.330', '+340.089+38,68%'],
|
1359
|
+
['3 Tahun', 'Kurs', '', '', '14.468', '+1.754+12,12%'],
|
1360
|
+
['oz', '1.767,08', '+570,99+32,31%', '25.566.113', '+12.362.058+48,35%'],
|
1361
|
+
['gr', '56,81', '+18,36+32,31%', '821.970', '+397.449+48,35%'],
|
1362
|
+
['5 Tahun', 'Kurs', '', '', '14.215', '+2.007+14,12%'],
|
1363
|
+
['oz', '1.280,61', '+1.057,46+82,57%', '18.203.871', '+19.724.300+108,35%'],
|
1364
|
+
['gr', '41,17', '+34,00+82,57%', '585.268', '+634.151+108,35%']])
|
1369
1365
|
(['Home', 'Emas 1 Gram', 'History', 'Trend', 'Perak 1 Gram', 'Pluang'],
|
1370
1366
|
[[''],
|
1371
1367
|
['Emas 24 KaratHarga Emas 1 Gram', ''],
|
1372
|
-
['USD', '
|
1373
|
-
['KURS', '16.
|
1374
|
-
['IDR', '1.
|
1375
|
-
['Senin, 29 April 2024
|
1368
|
+
['USD', '75,17↓', '%'],
|
1369
|
+
['KURS', '16.251,75↑', '+10,45+0,06%'],
|
1370
|
+
['IDR', '1.221.655,36↑', '+853,42+0,07%'],
|
1371
|
+
['Senin, 29 April 2024 16:19']],
|
1376
1372
|
[[''],
|
1377
1373
|
['Emas 1 Gram (IDR)Emas 1 Gram (USD)Kurs USD-IDR',
|
1378
1374
|
'Hari Ini',
|
@@ -1383,19 +1379,19 @@ Output:
|
|
1383
1379
|
'']],
|
1384
1380
|
[['Pergerakkan Harga Emas 1 Gram'],
|
1385
1381
|
['', 'Penutupan Kemarin', 'Pergerakkan Hari Ini', 'Rata-rata'],
|
1386
|
-
['USD', '75,17', '
|
1387
|
-
['KURS', '16.241,30', '16.
|
1388
|
-
['IDR', '1.220.801,94', '1.
|
1382
|
+
['USD', '75,17', '75,17 - 75,17', '75,17'],
|
1383
|
+
['KURS', '16.241,30', '16.241,30 - 16.251,75', '16.246,53'],
|
1384
|
+
['IDR', '1.220.801,94', '1.220.801,94 - 1.221.655,36', '1.221.228,65'],
|
1389
1385
|
[''],
|
1390
1386
|
['', 'Awal Tahun', 'Pergerakkan YTD', '+/- YTD'],
|
1391
|
-
['USD', '66,32', '64,07 - 77,14', '+8,
|
1392
|
-
['KURS', '15.390,10', '15.390,00 - 16.307,80', '+
|
1393
|
-
['IDR', '1.020.729,53', '997.660,12 - 1.256.829,06', '+
|
1387
|
+
['USD', '66,32', '64,07 - 77,14', '+8,85 (13,34%)'],
|
1388
|
+
['KURS', '15.390,10', '15.390,00 - 16.307,80', '+861,65 (5,60%)'],
|
1389
|
+
['IDR', '1.020.729,53', '997.660,12 - 1.256.829,06', '+200.925,83 (19,68%)'],
|
1394
1390
|
[''],
|
1395
1391
|
['', 'Tahun Lalu / 52 Minggu', 'Pergerakkan 52 Minggu', '+/- 52 Minggu'],
|
1396
|
-
['USD', '64,04', '58,43 - 77,14', '+
|
1397
|
-
['KURS', '14.671,35', '14.669,40 - 16.307,80', '+1.
|
1398
|
-
['IDR', '939.568,98', '912.925,68 - 1.256.829,06', '+
|
1392
|
+
['USD', '64,04', '58,43 - 77,14', '+11,13 (17,38%)'],
|
1393
|
+
['KURS', '14.671,35', '14.669,40 - 16.307,80', '+1.580,40 (10,77%)'],
|
1394
|
+
['IDR', '939.568,98', '912.925,68 - 1.256.829,06', '+282.086,38 (30,02%)']])
|
1399
1395
|
```
|
1400
1396
|
|
1401
1397
|
## iopen
|
@@ -1438,7 +1434,7 @@ Output:
|
|
1438
1434
|
8
|
1439
1435
|
['mana', 'aja']
|
1440
1436
|
Timeout 3
|
1441
|
-
[<Element a at
|
1437
|
+
[<Element a at 0x7f2a7c5c20>, <Element a at 0x7f1240a940>, <Element a at 0x7f1240a9e0>, <Element a at 0x7f1240aa30>, <Element a at 0x7f1240aa80>, <Element a at 0x7f1240aad0>, <Element a at 0x7f1240ab20>, <Element a at 0x7f1240ab70>, <Element a at 0x7f1240abc0>, <Element a at 0x7f1240ac10>, <Element a at 0x7f1240ac60>, <Element a at 0x7f1240acb0>, <Element a at 0x7f1240ad00>, <Element a at 0x7f1240ad50>, <Element a at 0x7f1240ada0>, <Element a at 0x7f1240adf0>, <Element a at 0x7f1240ae40>, <Element a at 0x7f1240ae90>, <Element a at 0x7f1240aee0>, <Element a at 0x7f1240af30>]
|
1442
1438
|
False
|
1443
1439
|
```
|
1444
1440
|
|
@@ -1465,7 +1461,7 @@ Output:
|
|
1465
1461
|
|
1466
1462
|
## irange
|
1467
1463
|
|
1468
|
-
`irange(start,
|
1464
|
+
`irange(start, stop=None, step=1, index=0, numbers='abcdefghijklmnopqrstuvwxyz')`
|
1469
1465
|
|
1470
1466
|
Meningkatkan fungsi range() dari python untuk pengulangan menggunakan huruf
|
1471
1467
|
|
@@ -1477,15 +1473,6 @@ print(list(irange(1, '7')))
|
|
1477
1473
|
print(list(irange(10, 5)))
|
1478
1474
|
```
|
1479
1475
|
|
1480
|
-
Output:
|
1481
|
-
```py
|
1482
|
-
<generator object irange at 0x77ab23aac0>
|
1483
|
-
<generator object irange at 0x77ab23aac0>
|
1484
|
-
['a', 'k', 'u']
|
1485
|
-
[1, 2, 3, 4, 5, 6, 7]
|
1486
|
-
[10, 9, 8, 7, 6, 5]
|
1487
|
-
```
|
1488
|
-
|
1489
1476
|
## ireplace
|
1490
1477
|
|
1491
1478
|
`ireplace(string: str, replacements: dict, flags=re.IGNORECASE|re.MULTILINE|re.DOTALL)`
|
@@ -1523,7 +1510,7 @@ print(list(iscandir("./", recursive=False, scan_file=False)))
|
|
1523
1510
|
|
1524
1511
|
Output:
|
1525
1512
|
```py
|
1526
|
-
<generator object iscandir at
|
1513
|
+
<generator object iscandir at 0x7f123cc540>
|
1527
1514
|
[PosixPath('.git'), PosixPath('.vscode'), PosixPath('pypipr'), PosixPath('__pycache__'), PosixPath('dist')]
|
1528
1515
|
```
|
1529
1516
|
|
@@ -1561,7 +1548,7 @@ Output:
|
|
1561
1548
|
'idjango': <module 'pypipr.idjango' from '/data/data/com.termux/files/home/pypipr/pypipr/idjango/__init__.py'>,
|
1562
1549
|
'iengineering': <module 'pypipr.iengineering' from '/data/data/com.termux/files/home/pypipr/pypipr/iengineering/__init__.py'>,
|
1563
1550
|
'ifunctions': <module 'pypipr.ifunctions' from '/data/data/com.termux/files/home/pypipr/pypipr/ifunctions/__init__.py'>,
|
1564
|
-
'iflow': <module 'pypipr.iflow' (<_frozen_importlib_external.NamespaceLoader object at
|
1551
|
+
'iflow': <module 'pypipr.iflow' (<_frozen_importlib_external.NamespaceLoader object at 0x7f1bd4b890>)>,
|
1565
1552
|
'asyncio': <module 'asyncio' from '/data/data/com.termux/files/usr/lib/python3.11/asyncio/__init__.py'>,
|
1566
1553
|
'colorama': <module 'colorama' from '/data/data/com.termux/files/usr/lib/python3.11/site-packages/colorama/__init__.py'>,
|
1567
1554
|
'csv': <module 'csv' from '/data/data/com.termux/files/usr/lib/python3.11/csv.py'>,
|
@@ -1599,67 +1586,67 @@ Output:
|
|
1599
1586
|
'PintUregQuantity': <class 'pint.Quantity'>},
|
1600
1587
|
'variable': {'LINUX': True,
|
1601
1588
|
'WINDOWS': False,
|
1602
|
-
'PintUreg': <pint.registry.UnitRegistry object at
|
1603
|
-
'function': {'avg': <function avg at
|
1604
|
-
'basename': <function basename at
|
1605
|
-
'chr_to_int': <function chr_to_int at
|
1606
|
-
'chunk_array': <function chunk_array at
|
1607
|
-
'create_folder': <function create_folder at
|
1608
|
-
'datetime_from_string': <function datetime_from_string at
|
1609
|
-
'datetime_now': <function datetime_now at
|
1610
|
-
'dict_first': <function dict_first at
|
1611
|
-
'dirname': <function dirname at
|
1612
|
-
'exit_if_empty': <function exit_if_empty at
|
1613
|
-
'filter_empty': <function filter_empty at
|
1614
|
-
'get_by_index': <function get_by_index at
|
1615
|
-
'get_class_method': <function get_class_method at
|
1616
|
-
'get_filemtime': <function get_filemtime at
|
1617
|
-
'get_filesize': <function get_filesize at
|
1618
|
-
'int_to_chr': <function int_to_chr at
|
1619
|
-
'is_empty': <function is_empty at
|
1620
|
-
'is_iterable': <function is_iterable at
|
1621
|
-
'is_valid_url': <function is_valid_url at
|
1622
|
-
'password_generator': <function password_generator at
|
1623
|
-
'random_bool': <function random_bool at
|
1624
|
-
'restart': <function restart at
|
1625
|
-
'set_timeout': <function set_timeout at
|
1626
|
-
'sets_ordered': <function sets_ordered at
|
1627
|
-
'str_cmp': <function str_cmp at
|
1628
|
-
'to_str': <function to_str at
|
1629
|
-
'choices': <function choices at
|
1630
|
-
'console_run': <function console_run at
|
1631
|
-
'input_char': <function input_char at
|
1632
|
-
'log': <function log at
|
1633
|
-
'print_colorize': <function print_colorize at
|
1634
|
-
'print_dir': <function print_dir at
|
1635
|
-
'print_log': <function print_log at
|
1636
|
-
'print_to_last_line': <function print_to_last_line at
|
1637
|
-
'text_colorize': <function text_colorize at
|
1638
|
-
'batch_calculate': <function batch_calculate at
|
1639
|
-
'batchmaker': <function batchmaker at
|
1640
|
-
'calculate': <function calculate at
|
1641
|
-
'auto_reload': <function auto_reload at
|
1642
|
-
'github_pull': <function github_pull at
|
1643
|
-
'github_push': <function github_push at
|
1644
|
-
'github_user': <function github_user at
|
1645
|
-
'pip_freeze_without_version': <function pip_freeze_without_version at
|
1646
|
-
'poetry_publish': <function poetry_publish at
|
1647
|
-
'poetry_update_version': <function poetry_update_version at
|
1648
|
-
'iargv': <function iargv at
|
1649
|
-
'idumps': <function idumps at
|
1650
|
-
'idumps_html': <function idumps_html at
|
1651
|
-
'ienv': <function ienv at
|
1652
|
-
'iexec': <function iexec at
|
1653
|
-
'ijoin': <function ijoin at
|
1654
|
-
'iloads': <function iloads at
|
1655
|
-
'iloads_html': <function iloads_html at
|
1656
|
-
'iopen': <function iopen at
|
1657
|
-
'iprint': <function iprint at
|
1658
|
-
'irange': <function irange at
|
1659
|
-
'ireplace': <function ireplace at
|
1660
|
-
'iscandir': <function iscandir at
|
1661
|
-
'isplit': <function isplit at
|
1662
|
-
'ivars': <function ivars at
|
1589
|
+
'PintUreg': <pint.registry.UnitRegistry object at 0x7f26b57a90>},
|
1590
|
+
'function': {'avg': <function avg at 0x7f2a7b6d40>,
|
1591
|
+
'basename': <function basename at 0x7f2a7868e0>,
|
1592
|
+
'chr_to_int': <function chr_to_int at 0x7f26a91080>,
|
1593
|
+
'chunk_array': <function chunk_array at 0x7f26a911c0>,
|
1594
|
+
'create_folder': <function create_folder at 0x7f26a913a0>,
|
1595
|
+
'datetime_from_string': <function datetime_from_string at 0x7f26a91580>,
|
1596
|
+
'datetime_now': <function datetime_now at 0x7f26b39620>,
|
1597
|
+
'dict_first': <function dict_first at 0x7f26b39580>,
|
1598
|
+
'dirname': <function dirname at 0x7f26b394e0>,
|
1599
|
+
'exit_if_empty': <function exit_if_empty at 0x7f26b393a0>,
|
1600
|
+
'filter_empty': <function filter_empty at 0x7f26b391c0>,
|
1601
|
+
'get_by_index': <function get_by_index at 0x7f26b38e00>,
|
1602
|
+
'get_class_method': <function get_class_method at 0x7f26b38cc0>,
|
1603
|
+
'get_filemtime': <function get_filemtime at 0x7f26b38b80>,
|
1604
|
+
'get_filesize': <function get_filesize at 0x7f26b389a0>,
|
1605
|
+
'int_to_chr': <function int_to_chr at 0x7f26b38900>,
|
1606
|
+
'is_empty': <function is_empty at 0x7f26b39260>,
|
1607
|
+
'is_iterable': <function is_iterable at 0x7f26b38fe0>,
|
1608
|
+
'is_valid_url': <function is_valid_url at 0x7f26b387c0>,
|
1609
|
+
'password_generator': <function password_generator at 0x7f26b38680>,
|
1610
|
+
'random_bool': <function random_bool at 0x7f26b384a0>,
|
1611
|
+
'restart': <function restart at 0x7f26b3b7e0>,
|
1612
|
+
'set_timeout': <function set_timeout at 0x7f26b3b920>,
|
1613
|
+
'sets_ordered': <function sets_ordered at 0x7f26b3ba60>,
|
1614
|
+
'str_cmp': <function str_cmp at 0x7f26b3bb00>,
|
1615
|
+
'to_str': <function to_str at 0x7f26b38f40>,
|
1616
|
+
'choices': <function choices at 0x7f26b3bba0>,
|
1617
|
+
'console_run': <function console_run at 0x7f26b3be20>,
|
1618
|
+
'input_char': <function input_char at 0x7f26b3bf60>,
|
1619
|
+
'log': <function log at 0x7f26b5c180>,
|
1620
|
+
'print_colorize': <function print_colorize at 0x7f26b5c220>,
|
1621
|
+
'print_dir': <function print_dir at 0x7f26b5c360>,
|
1622
|
+
'print_log': <function print_log at 0x7f26b5c040>,
|
1623
|
+
'print_to_last_line': <function print_to_last_line at 0x7f26b3bd80>,
|
1624
|
+
'text_colorize': <function text_colorize at 0x7f26b3bec0>,
|
1625
|
+
'batch_calculate': <function batch_calculate at 0x7f1bd516c0>,
|
1626
|
+
'batchmaker': <function batchmaker at 0x7f1bd52160>,
|
1627
|
+
'calculate': <function calculate at 0x7f1bd52480>,
|
1628
|
+
'auto_reload': <function auto_reload at 0x7f1bd52700>,
|
1629
|
+
'github_pull': <function github_pull at 0x7f1bd52520>,
|
1630
|
+
'github_push': <function github_push at 0x7f1ba7a160>,
|
1631
|
+
'github_user': <function github_user at 0x7f1ba7a0c0>,
|
1632
|
+
'pip_freeze_without_version': <function pip_freeze_without_version at 0x7f1ba7a2a0>,
|
1633
|
+
'poetry_publish': <function poetry_publish at 0x7f1ba7a340>,
|
1634
|
+
'poetry_update_version': <function poetry_update_version at 0x7f1ba9ec00>,
|
1635
|
+
'iargv': <function iargv at 0x7f1259c360>,
|
1636
|
+
'idumps': <function idumps at 0x7f1259c4a0>,
|
1637
|
+
'idumps_html': <function idumps_html at 0x7f12604ea0>,
|
1638
|
+
'ienv': <function ienv at 0x7f1259c5e0>,
|
1639
|
+
'iexec': <function iexec at 0x7f12605120>,
|
1640
|
+
'ijoin': <function ijoin at 0x7f1ba7a3e0>,
|
1641
|
+
'iloads': <function iloads at 0x7f126051c0>,
|
1642
|
+
'iloads_html': <function iloads_html at 0x7f12605440>,
|
1643
|
+
'iopen': <function iopen at 0x7f1ba7a480>,
|
1644
|
+
'iprint': <function iprint at 0x7f12605300>,
|
1645
|
+
'irange': <function irange at 0x7f1bd52660>,
|
1646
|
+
'ireplace': <function ireplace at 0x7f126054e0>,
|
1647
|
+
'iscandir': <function iscandir at 0x7f12607100>,
|
1648
|
+
'isplit': <function isplit at 0x7f126071a0>,
|
1649
|
+
'ivars': <function ivars at 0x7f12607240>}}
|
1663
1650
|
```
|
1664
1651
|
|
1665
1652
|
# CLASS
|
@@ -1699,7 +1686,7 @@ print(ExampleComparePerformance().compare_performance())
|
|
1699
1686
|
|
1700
1687
|
Output:
|
1701
1688
|
```py
|
1702
|
-
{'a': <generator object ExampleComparePerformance.a.<locals>.<genexpr> at
|
1689
|
+
{'a': <generator object ExampleComparePerformance.a.<locals>.<genexpr> at 0x7f123e0380>,
|
1703
1690
|
'b': (0, 1, 2, 3, 4, 5, 6, 7, 8, 9),
|
1704
1691
|
'c': [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
|
1705
1692
|
'd': [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]}
|
@@ -66,14 +66,15 @@ pypipr/ifunctions/iloads.py,sha256=eyvSgqDxOXzU5dcPDT8cbtGtUIfjogxOqeQfwIhc92Q,6
|
|
66
66
|
pypipr/ifunctions/iloads_html.py,sha256=gGGOwv0gHsWAMxxBxNGZL3jpXz9ycTiAbAbarFndckg,4146
|
67
67
|
pypipr/ifunctions/iopen.py,sha256=2nEJRSMwlWCIrLD59DKCnP-Sxy_bPUMV836GNRKNiCY,2808
|
68
68
|
pypipr/ifunctions/iprint.py,sha256=_YXD_h68Olgt-3DbtbseoOpsIB2E2RHuJgIunnJxSOY,849
|
69
|
-
pypipr/ifunctions/irange.py,sha256=
|
69
|
+
pypipr/ifunctions/irange.py,sha256=kj51179oQp7it9XFryN_3asM3ZcilifmxMlTCK332i0,1131
|
70
|
+
pypipr/ifunctions/irange.py.bak,sha256=x51vzQ8aAbToJBZgCX32QgAjr7Vm_Zw1MdIwSA3tVsM,2407
|
70
71
|
pypipr/ifunctions/ireplace.py,sha256=RcVMXmbXH_cl4hXpTI5wnuzdPtkatpuZgYsZkfBLAJU,722
|
71
72
|
pypipr/ifunctions/iscandir.py,sha256=U1zvRZrz--5Kge0JooQbY4kQN17bRt-8XR26ZFxUyoA,748
|
72
73
|
pypipr/ifunctions/isplit.py,sha256=N2BiA_wVnrENYwokSzvo0CAiQWk3g7AnwuWFIUgevNM,383
|
73
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.101.dist-info/METADATA,sha256=PURg--S4K-usYFj-pFXNzNqMv_KcknPt_ye8fUO8pgk,49751
|
78
|
+
pypipr-1.0.101.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
79
|
+
pypipr-1.0.101.dist-info/entry_points.txt,sha256=ikcrTRCn3jaySem1mM9uhYEPDq2PVOs48CyEqLUkY38,47
|
80
|
+
pypipr-1.0.101.dist-info/RECORD,,
|
File without changes
|
File without changes
|