pypipr 1.0.112__tar.gz → 1.0.114__tar.gz
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-1.0.112 → pypipr-1.0.114}/PKG-INFO +215 -215
- {pypipr-1.0.112 → pypipr-1.0.114}/pypipr/__terminal__.py +3 -22
- pypipr-1.0.114/pypipr/choices.py +65 -0
- {pypipr-1.0.112 → pypipr-1.0.114}/pyproject.toml +1 -1
- {pypipr-1.0.112 → pypipr-1.0.114}/readme.md +214 -214
- pypipr-1.0.112/pypipr/choices.py +0 -61
- {pypipr-1.0.112 → pypipr-1.0.114}/pypipr/APIMixinView.py +0 -0
- {pypipr-1.0.112 → pypipr-1.0.114}/pypipr/ComparePerformance.py +0 -0
- {pypipr-1.0.112 → pypipr-1.0.114}/pypipr/LINUX.py +0 -0
- {pypipr-1.0.112 → pypipr-1.0.114}/pypipr/PintUreg.py +0 -0
- {pypipr-1.0.112 → pypipr-1.0.114}/pypipr/PintUregQuantity.py +0 -0
- {pypipr-1.0.112 → pypipr-1.0.114}/pypipr/RunParallel.py +0 -0
- {pypipr-1.0.112 → pypipr-1.0.114}/pypipr/WINDOWS.py +0 -0
- {pypipr-1.0.112 → pypipr-1.0.114}/pypipr/__init__.py +0 -0
- {pypipr-1.0.112 → pypipr-1.0.114}/pypipr/auto_reload.py +0 -0
- {pypipr-1.0.112 → pypipr-1.0.114}/pypipr/avg.py +0 -0
- {pypipr-1.0.112 → pypipr-1.0.114}/pypipr/basename.py +0 -0
- {pypipr-1.0.112 → pypipr-1.0.114}/pypipr/batch_calculate.py +0 -0
- {pypipr-1.0.112 → pypipr-1.0.114}/pypipr/batchmaker.py +0 -0
- {pypipr-1.0.112 → pypipr-1.0.114}/pypipr/calculate.py +0 -0
- {pypipr-1.0.112 → pypipr-1.0.114}/pypipr/choices.py.bak +0 -0
- {pypipr-1.0.112 → pypipr-1.0.114}/pypipr/chr_to_int.py +0 -0
- {pypipr-1.0.112 → pypipr-1.0.114}/pypipr/chunk_array.py +0 -0
- {pypipr-1.0.112 → pypipr-1.0.114}/pypipr/console_run.py +0 -0
- {pypipr-1.0.112 → pypipr-1.0.114}/pypipr/create_folder.py +0 -0
- {pypipr-1.0.112 → pypipr-1.0.114}/pypipr/datetime_from_string.py +0 -0
- {pypipr-1.0.112 → pypipr-1.0.114}/pypipr/datetime_now.py +0 -0
- {pypipr-1.0.112 → pypipr-1.0.114}/pypipr/dict_first.py +0 -0
- {pypipr-1.0.112 → pypipr-1.0.114}/pypipr/dirname.py +0 -0
- {pypipr-1.0.112 → pypipr-1.0.114}/pypipr/exit_if_empty.py +0 -0
- {pypipr-1.0.112 → pypipr-1.0.114}/pypipr/filter_empty.py +0 -0
- {pypipr-1.0.112 → pypipr-1.0.114}/pypipr/get_by_index.py +0 -0
- {pypipr-1.0.112 → pypipr-1.0.114}/pypipr/get_class_method.py +0 -0
- {pypipr-1.0.112 → pypipr-1.0.114}/pypipr/get_filemtime.py +0 -0
- {pypipr-1.0.112 → pypipr-1.0.114}/pypipr/get_filesize.py +0 -0
- {pypipr-1.0.112 → pypipr-1.0.114}/pypipr/github_pull.py +0 -0
- {pypipr-1.0.112 → pypipr-1.0.114}/pypipr/github_push.py +0 -0
- {pypipr-1.0.112 → pypipr-1.0.114}/pypipr/github_user.py +0 -0
- {pypipr-1.0.112 → pypipr-1.0.114}/pypipr/iargv.py +0 -0
- {pypipr-1.0.112 → pypipr-1.0.114}/pypipr/idumps.py +0 -0
- {pypipr-1.0.112 → pypipr-1.0.114}/pypipr/idumps_html.py +0 -0
- {pypipr-1.0.112 → pypipr-1.0.114}/pypipr/ienumerate.py +0 -0
- {pypipr-1.0.112 → pypipr-1.0.114}/pypipr/ienv.py +0 -0
- {pypipr-1.0.112 → pypipr-1.0.114}/pypipr/iexec.py +0 -0
- {pypipr-1.0.112 → pypipr-1.0.114}/pypipr/ijoin.py +0 -0
- {pypipr-1.0.112 → pypipr-1.0.114}/pypipr/iloads.py +0 -0
- {pypipr-1.0.112 → pypipr-1.0.114}/pypipr/iloads_html.py +0 -0
- {pypipr-1.0.112 → pypipr-1.0.114}/pypipr/input_char.py +0 -0
- {pypipr-1.0.112 → pypipr-1.0.114}/pypipr/int_to_bin.py +0 -0
- {pypipr-1.0.112 → pypipr-1.0.114}/pypipr/int_to_chr.py +0 -0
- {pypipr-1.0.112 → pypipr-1.0.114}/pypipr/int_to_hex.py +0 -0
- {pypipr-1.0.112 → pypipr-1.0.114}/pypipr/int_to_int.py +0 -0
- {pypipr-1.0.112 → pypipr-1.0.114}/pypipr/int_to_oct.py +0 -0
- {pypipr-1.0.112 → pypipr-1.0.114}/pypipr/iopen.py +0 -0
- {pypipr-1.0.112 → pypipr-1.0.114}/pypipr/iprint.py +0 -0
- {pypipr-1.0.112 → pypipr-1.0.114}/pypipr/irange.py +0 -0
- {pypipr-1.0.112 → pypipr-1.0.114}/pypipr/ireplace.py +0 -0
- {pypipr-1.0.112 → pypipr-1.0.114}/pypipr/is_empty.py +0 -0
- {pypipr-1.0.112 → pypipr-1.0.114}/pypipr/is_iterable.py +0 -0
- {pypipr-1.0.112 → pypipr-1.0.114}/pypipr/is_valid_url.py +0 -0
- {pypipr-1.0.112 → pypipr-1.0.114}/pypipr/iscandir.py +0 -0
- {pypipr-1.0.112 → pypipr-1.0.114}/pypipr/isplit.py +0 -0
- {pypipr-1.0.112 → pypipr-1.0.114}/pypipr/ivars.py +0 -0
- {pypipr-1.0.112 → pypipr-1.0.114}/pypipr/log.py +0 -0
- {pypipr-1.0.112 → pypipr-1.0.114}/pypipr/password_generator.py +0 -0
- {pypipr-1.0.112 → pypipr-1.0.114}/pypipr/pip_freeze_without_version.py +0 -0
- {pypipr-1.0.112 → pypipr-1.0.114}/pypipr/poetry_publish.py +0 -0
- {pypipr-1.0.112 → pypipr-1.0.114}/pypipr/poetry_update_version.py +0 -0
- {pypipr-1.0.112 → pypipr-1.0.114}/pypipr/print_colorize.py +0 -0
- {pypipr-1.0.112 → pypipr-1.0.114}/pypipr/print_dir.py +0 -0
- {pypipr-1.0.112 → pypipr-1.0.114}/pypipr/print_log.py +0 -0
- {pypipr-1.0.112 → pypipr-1.0.114}/pypipr/print_to_last_line.py +0 -0
- {pypipr-1.0.112 → pypipr-1.0.114}/pypipr/random_bool.py +0 -0
- {pypipr-1.0.112 → pypipr-1.0.114}/pypipr/restart.py +0 -0
- {pypipr-1.0.112 → pypipr-1.0.114}/pypipr/set_timeout.py +0 -0
- {pypipr-1.0.112 → pypipr-1.0.114}/pypipr/sets_ordered.py +0 -0
- {pypipr-1.0.112 → pypipr-1.0.114}/pypipr/str_cmp.py +0 -0
- {pypipr-1.0.112 → pypipr-1.0.114}/pypipr/text_colorize.py +0 -0
- {pypipr-1.0.112 → pypipr-1.0.114}/pypipr/to_str.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: pypipr
|
3
|
-
Version: 1.0.
|
3
|
+
Version: 1.0.114
|
4
4
|
Summary: The Python Package Index Project
|
5
5
|
Author: ufiapjj
|
6
6
|
Author-email: ufiapjj@gmail.com
|
@@ -245,8 +245,8 @@ print(list(irange(10, 5)))
|
|
245
245
|
|
246
246
|
Output:
|
247
247
|
```py
|
248
|
-
<generator object chr_range at
|
249
|
-
<generator object chr_range at
|
248
|
+
<generator object chr_range at 0x7a71d44e10>
|
249
|
+
<generator object chr_range at 0x7a71d44e10>
|
250
250
|
['a', 'k', 'u']
|
251
251
|
[1, 2, 3, 4, 5, 6]
|
252
252
|
[10, 9, 8, 7, 6]
|
@@ -273,7 +273,7 @@ print(list(batchmaker(s)))
|
|
273
273
|
|
274
274
|
Output:
|
275
275
|
```py
|
276
|
-
<generator object batchmaker at
|
276
|
+
<generator object batchmaker at 0x7a71d743a0>
|
277
277
|
['Urutan 1 dan 10 dan j dan Z saja.', 'Urutan 1 dan 10 dan j dan K saja.', 'Urutan 4 dan 10 dan j dan Z saja.', 'Urutan 4 dan 10 dan j dan K saja.']
|
278
278
|
```
|
279
279
|
|
@@ -327,56 +327,83 @@ print(list(batch_calculate("{1 10} m ** {1 3}")))
|
|
327
327
|
|
328
328
|
Output:
|
329
329
|
```py
|
330
|
-
<generator object batch_calculate at
|
330
|
+
<generator object batch_calculate at 0x7a71cf7010>
|
331
331
|
[('1 m ** 1', <Quantity(1, 'meter')>), ('1 m ** 2', <Quantity(1, 'meter ** 2')>), ('2 m ** 1', <Quantity(2, 'meter')>), ('2 m ** 2', <Quantity(2, 'meter ** 2')>), ('3 m ** 1', <Quantity(3, 'meter')>), ('3 m ** 2', <Quantity(3, 'meter ** 2')>), ('4 m ** 1', <Quantity(4, 'meter')>), ('4 m ** 2', <Quantity(4, 'meter ** 2')>), ('5 m ** 1', <Quantity(5, 'meter')>), ('5 m ** 2', <Quantity(5, 'meter ** 2')>), ('6 m ** 1', <Quantity(6, 'meter')>), ('6 m ** 2', <Quantity(6, 'meter ** 2')>), ('7 m ** 1', <Quantity(7, 'meter')>), ('7 m ** 2', <Quantity(7, 'meter ** 2')>), ('8 m ** 1', <Quantity(8, 'meter')>), ('8 m ** 2', <Quantity(8, 'meter ** 2')>), ('9 m ** 1', <Quantity(9, 'meter')>), ('9 m ** 2', <Quantity(9, 'meter ** 2')>)]
|
332
332
|
```
|
333
333
|
|
334
|
-
##
|
334
|
+
## is_empty
|
335
335
|
|
336
|
-
`
|
336
|
+
`is_empty(variable, empty=[None, False, 0, 0, '0', '', '-0', '\n', '\t', set(), {}, [], ()])`
|
337
337
|
|
338
|
-
|
339
|
-
|
338
|
+
Mengecek apakah variable setara dengan nilai kosong pada empty.
|
339
|
+
|
340
|
+
Pengecekan nilai yang setara menggunakan simbol '==', sedangkan untuk
|
341
|
+
pengecekan lokasi memory yang sama menggunakan keyword 'is'
|
340
342
|
|
341
343
|
```python
|
342
|
-
print(
|
344
|
+
print(is_empty("teks"))
|
345
|
+
print(is_empty(True))
|
346
|
+
print(is_empty(False))
|
347
|
+
print(is_empty(None))
|
348
|
+
print(is_empty(0))
|
349
|
+
print(is_empty([]))
|
343
350
|
```
|
344
351
|
|
345
352
|
Output:
|
346
353
|
```py
|
347
|
-
|
354
|
+
False
|
355
|
+
False
|
356
|
+
True
|
357
|
+
True
|
358
|
+
True
|
359
|
+
True
|
348
360
|
```
|
349
361
|
|
350
|
-
##
|
362
|
+
## exit_if_empty
|
351
363
|
|
352
|
-
`
|
364
|
+
`exit_if_empty(*args)`
|
353
365
|
|
354
|
-
|
366
|
+
Keluar dari program apabila seluruh variabel
|
367
|
+
setara dengan empty
|
368
|
+
|
369
|
+
```py
|
370
|
+
var1 = None
|
371
|
+
var2 = '0'
|
372
|
+
exit_if_empty(var1, var2)
|
373
|
+
```
|
355
374
|
|
356
|
-
|
375
|
+
## input_char
|
357
376
|
|
358
|
-
|
359
|
-
|
377
|
+
`input_char(prompt=None, prompt_ending='', newline_after_input=True, echo_char=True, default=None)`
|
378
|
+
|
379
|
+
Meminta masukan satu huruf tanpa menekan Enter.
|
360
380
|
|
361
381
|
```py
|
362
|
-
|
363
|
-
|
382
|
+
input_char("Input char : ")
|
383
|
+
input_char("Input char : ", default='Y')
|
384
|
+
input_char("Input Char without print : ", echo_char=False)
|
364
385
|
```
|
365
386
|
|
366
|
-
##
|
387
|
+
## get_by_index
|
367
388
|
|
368
|
-
`
|
389
|
+
`get_by_index(obj, index, on_error=None)`
|
369
390
|
|
370
|
-
|
391
|
+
Mendapatkan value dari object berdasarkan indexnya.
|
392
|
+
Jika error out of range maka akan mengembalikan on_error.
|
371
393
|
|
372
|
-
```
|
373
|
-
|
374
|
-
|
394
|
+
```python
|
395
|
+
l = [1, 3, 5]
|
396
|
+
print(get_by_index(l, 7))
|
397
|
+
```
|
398
|
+
|
399
|
+
Output:
|
400
|
+
```py
|
401
|
+
None
|
375
402
|
```
|
376
403
|
|
377
404
|
## choices
|
378
405
|
|
379
|
-
`choices(
|
406
|
+
`choices(daftar, contains=None, prompt='Choose : ')`
|
380
407
|
|
381
408
|
Memudahkan dalam membuat pilihan untuk user dalam tampilan console
|
382
409
|
|
@@ -412,7 +439,7 @@ print(list(chunk_array(arr, 5)))
|
|
412
439
|
|
413
440
|
Output:
|
414
441
|
```py
|
415
|
-
<generator object chunk_array at
|
442
|
+
<generator object chunk_array at 0x7a71d84340>
|
416
443
|
[[2, 3, 12, 3, 3], [42, 42, 1, 43, 2], [42, 41, 4, 24, 32], [42, 3, 12, 32, 42], [42]]
|
417
444
|
```
|
418
445
|
|
@@ -463,9 +490,9 @@ print(datetime_now("Etc/GMT+7"))
|
|
463
490
|
|
464
491
|
Output:
|
465
492
|
```py
|
466
|
-
2024-04-30
|
467
|
-
2024-04-30
|
468
|
-
2024-04-30
|
493
|
+
2024-04-30 21:17:14.498373+07:00
|
494
|
+
2024-04-30 14:17:14.499963+00:00
|
495
|
+
2024-04-30 07:17:14.504004-07:00
|
469
496
|
```
|
470
497
|
|
471
498
|
## dict_first
|
@@ -506,47 +533,6 @@ Output:
|
|
506
533
|
/ini/nama/folder/ke
|
507
534
|
```
|
508
535
|
|
509
|
-
## is_empty
|
510
|
-
|
511
|
-
`is_empty(variable, empty=[None, False, 0, 0, '0', '', '-0', '\n', '\t', set(), {}, [], ()])`
|
512
|
-
|
513
|
-
Mengecek apakah variable setara dengan nilai kosong pada empty.
|
514
|
-
|
515
|
-
Pengecekan nilai yang setara menggunakan simbol '==', sedangkan untuk
|
516
|
-
pengecekan lokasi memory yang sama menggunakan keyword 'is'
|
517
|
-
|
518
|
-
```python
|
519
|
-
print(is_empty("teks"))
|
520
|
-
print(is_empty(True))
|
521
|
-
print(is_empty(False))
|
522
|
-
print(is_empty(None))
|
523
|
-
print(is_empty(0))
|
524
|
-
print(is_empty([]))
|
525
|
-
```
|
526
|
-
|
527
|
-
Output:
|
528
|
-
```py
|
529
|
-
False
|
530
|
-
False
|
531
|
-
True
|
532
|
-
True
|
533
|
-
True
|
534
|
-
True
|
535
|
-
```
|
536
|
-
|
537
|
-
## exit_if_empty
|
538
|
-
|
539
|
-
`exit_if_empty(*args)`
|
540
|
-
|
541
|
-
Keluar dari program apabila seluruh variabel
|
542
|
-
setara dengan empty
|
543
|
-
|
544
|
-
```py
|
545
|
-
var1 = None
|
546
|
-
var2 = '0'
|
547
|
-
exit_if_empty(var1, var2)
|
548
|
-
```
|
549
|
-
|
550
536
|
## is_iterable
|
551
537
|
|
552
538
|
`is_iterable(var, str_is_iterable=False)`
|
@@ -611,24 +597,7 @@ print(filter_empty(var))
|
|
611
597
|
|
612
598
|
Output:
|
613
599
|
```py
|
614
|
-
<generator object filter_empty at
|
615
|
-
```
|
616
|
-
|
617
|
-
## get_by_index
|
618
|
-
|
619
|
-
`get_by_index(obj, index, on_error=None)`
|
620
|
-
|
621
|
-
Mendapatkan value dari object berdasarkan indexnya.
|
622
|
-
Jika error out of range maka akan mengembalikan on_error.
|
623
|
-
|
624
|
-
```python
|
625
|
-
l = [1, 3, 5]
|
626
|
-
print(get_by_index(l, 7))
|
627
|
-
```
|
628
|
-
|
629
|
-
Output:
|
630
|
-
```py
|
631
|
-
None
|
600
|
+
<generator object filter_empty at 0x7a71cf7010>
|
632
601
|
```
|
633
602
|
|
634
603
|
## get_class_method
|
@@ -657,8 +626,8 @@ print(list(get_class_method(ExampleGetClassMethod)))
|
|
657
626
|
|
658
627
|
Output:
|
659
628
|
```py
|
660
|
-
<generator object get_class_method at
|
661
|
-
[<function ExampleGetClassMethod.a at
|
629
|
+
<generator object get_class_method at 0x7a71cf72e0>
|
630
|
+
[<function ExampleGetClassMethod.a at 0x7a71d913a0>, <function ExampleGetClassMethod.b at 0x7a71d911c0>, <function ExampleGetClassMethod.c at 0x7a71d914e0>, <function ExampleGetClassMethod.d at 0x7a71d91580>]
|
662
631
|
```
|
663
632
|
|
664
633
|
## get_filesize
|
@@ -893,6 +862,26 @@ t:
|
|
893
862
|
|
894
863
|
```
|
895
864
|
|
865
|
+
## int_to_int
|
866
|
+
|
867
|
+
`int_to_int(n)`
|
868
|
+
|
869
|
+
Fungsi ini sama seperti fungsi int().
|
870
|
+
fungsi ini dibuat hanya untuk keperluan pembuatan module semata.
|
871
|
+
|
872
|
+
```python
|
873
|
+
print(int_to_int(7777))
|
874
|
+
```
|
875
|
+
|
876
|
+
Output:
|
877
|
+
```py
|
878
|
+
7777
|
879
|
+
```
|
880
|
+
|
881
|
+
## ienumerate
|
882
|
+
|
883
|
+
`ienumerate(iterator, start=0, key=<function int_to_int at 0x7a73db1e40>)`
|
884
|
+
|
896
885
|
## ienv
|
897
886
|
|
898
887
|
`ienv(on_windows=None, on_linux=None)`
|
@@ -956,7 +945,7 @@ print(ijoin(10, ' '))
|
|
956
945
|
|
957
946
|
Output:
|
958
947
|
```py
|
959
|
-
asd,
|
948
|
+
asd, dfs, weq, qweqw
|
960
949
|
,ini,path,seperti,url,
|
961
950
|
ini,path,seperti,url
|
962
951
|
<li>satu</li>
|
@@ -1000,9 +989,9 @@ Output:
|
|
1000
989
|
```py
|
1001
990
|
(['Home', 'Emas 1 Gram', 'History', 'Trend', 'Perak 1 Gram', 'Pluang'],
|
1002
991
|
[['Harga Emas Hari Ini - Selasa, 30 April 2024'],
|
1003
|
-
['Spot Emas USD↓2.
|
992
|
+
['Spot Emas USD↓2.302,01 (-42,53) / oz',
|
1004
993
|
'Kurs IDR↑16.249,00 (+27,00) / USD',
|
1005
|
-
'Emas IDR↓1.
|
994
|
+
'Emas IDR↓1.202.610 (-20.183) / gr'],
|
1006
995
|
['LM Antam (Jual)1.325.000 / gr', 'LM Antam (Beli)1.221.000 / gr']],
|
1007
996
|
[['Harga Emas Hari Ini'],
|
1008
997
|
['Gram', 'Gedung Antam Jakarta', 'Pegadaian'],
|
@@ -1040,10 +1029,10 @@ Output:
|
|
1040
1029
|
'Update harga LM Pegadaian :31 Agustus 2023']],
|
1041
1030
|
[['Spot Harga Emas Hari Ini (Market Open)'],
|
1042
1031
|
['Satuan', 'USD', 'Kurs\xa0Dollar', 'IDR'],
|
1043
|
-
['Ounce\xa0(oz)', '2.
|
1044
|
-
['Gram\xa0(gr)', '74,
|
1045
|
-
['Kilogram\xa0(kg)', '74.
|
1046
|
-
['Update harga emas :30 April 2024, pukul
|
1032
|
+
['Ounce\xa0(oz)', '2.302,01 (-42,53)', '16.249,00 (+27,00)', '37.405.360'],
|
1033
|
+
['Gram\xa0(gr)', '74,01', '16.249,00', '1.202.610 (-20.183)'],
|
1034
|
+
['Kilogram\xa0(kg)', '74.011,34', '16.249,00', '1.202.610.267'],
|
1035
|
+
['Update harga emas :30 April 2024, pukul 21:17Update kurs :30 April 2024, '
|
1047
1036
|
'pukul 13:10']],
|
1048
1037
|
[['Gram', 'UBS Gold 99.99%'],
|
1049
1038
|
['Jual', 'Beli'],
|
@@ -1065,36 +1054,36 @@ Output:
|
|
1065
1054
|
['Unit', 'USD', 'IDR'],
|
1066
1055
|
['Angka', '+/-', 'Angka', '+/-'],
|
1067
1056
|
['Hari Ini', 'Kurs', '', '', '16.222', '+27+0,17%'],
|
1068
|
-
['oz', '2.344,54', '-
|
1069
|
-
['gr', '75,38', '-1,
|
1057
|
+
['oz', '2.344,54', '-42,53-1,81%', '38.033.128', '-627.767-1,65%'],
|
1058
|
+
['gr', '75,38', '-1,37-1,81%', '1.222.793', '-20.183-1,65%'],
|
1070
1059
|
['30 Hari', 'Kurs', '', '', '15.853', '+396+2,50%'],
|
1071
|
-
['oz', '2.232,75', '+
|
1072
|
-
['gr', '71,78', '+2,
|
1060
|
+
['oz', '2.232,75', '+69,26+3,10%', '35.395.786', '+2.009.575+5,68%'],
|
1061
|
+
['gr', '71,78', '+2,23+3,10%', '1.138.001', '+64.609+5,68%'],
|
1073
1062
|
['2 Bulan', 'Kurs', '', '', '15.715', '+534+3,40%'],
|
1074
|
-
['oz', '2.081,20', '+
|
1075
|
-
['gr', '66,91', '+7,
|
1063
|
+
['oz', '2.081,20', '+220,81+10,61%', '32.706.058', '+4.699.302+14,37%'],
|
1064
|
+
['gr', '66,91', '+7,10+10,61', '1.051.524', '+151.086+14,37%'],
|
1076
1065
|
['6 Bulan', 'Kurs', '', '', '15.946', '+303+1,90%'],
|
1077
|
-
['oz', '1.981,84', '+
|
1078
|
-
['gr', '63,72', '+10,
|
1066
|
+
['oz', '1.981,84', '+320,17+16,16%', '31.602.421', '+5.802.940+18,36%'],
|
1067
|
+
['gr', '63,72', '+10,29+16,16%', '1.016.041', '+186.569+18,36%'],
|
1079
1068
|
['1 Tahun', 'Kurs', '', '', '15.731', '+518+3,29%'],
|
1080
|
-
['oz', '1.823,86', '+
|
1081
|
-
['gr', '58,64', '+15,
|
1069
|
+
['oz', '1.823,86', '+478,15+26,22%', '28.691.142', '+8.714.219+30,37%'],
|
1070
|
+
['gr', '58,64', '+15,37+26,22%', '922.442', '+280.169+30,37%'],
|
1082
1071
|
['2 Tahun', 'Kurs', '', '', '14.418', '+1.831+12,70%'],
|
1083
|
-
['oz', '1.896,95', '+
|
1084
|
-
['gr', '60,99', '+13,
|
1072
|
+
['oz', '1.896,95', '+405,06+21,35%', '27.350.225', '+10.055.135+36,76%'],
|
1073
|
+
['gr', '60,99', '+13,02+21,35%', '879.330', '+323.280+36,76%'],
|
1085
1074
|
['3 Tahun', 'Kurs', '', '', '14.468', '+1.781+12,31%'],
|
1086
|
-
['oz', '1.768,91', '+
|
1087
|
-
['gr', '56,87', '+17,
|
1075
|
+
['oz', '1.768,91', '+533,10+30,14%', '25.592.590', '+11.812.771+46,16%'],
|
1076
|
+
['gr', '56,87', '+17,14+30,14%', '822.821', '+379.789+46,16%'],
|
1088
1077
|
['5 Tahun', 'Kurs', '', '', '14.245', '+2.004+14,07%'],
|
1089
|
-
['oz', '1.270,94', '+1.
|
1090
|
-
['gr', '40,86', '+33,
|
1078
|
+
['oz', '1.270,94', '+1.031,07+81,13%', '18.104.540', '+19.300.820+106,61%'],
|
1079
|
+
['gr', '40,86', '+33,15+81,13%', '582.074', '+620.536+106,61%']])
|
1091
1080
|
(['Home', 'Emas 1 Gram', 'History', 'Trend', 'Perak 1 Gram', 'Pluang'],
|
1092
1081
|
[[''],
|
1093
1082
|
['Emas 24 KaratHarga Emas 1 Gram', ''],
|
1094
|
-
['USD', '74,
|
1095
|
-
['KURS', '16.
|
1096
|
-
['IDR', '1.
|
1097
|
-
['Selasa, 30 April 2024
|
1083
|
+
['USD', '74,01↓', '-1,37-1,82%'],
|
1084
|
+
['KURS', '16.249,35↑', '+35,85+0,22%'],
|
1085
|
+
['IDR', '1.202.636,17↓', '-19.516,57-1,60%'],
|
1086
|
+
['Selasa, 30 April 2024 21:17']],
|
1098
1087
|
[[''],
|
1099
1088
|
['Emas 1 Gram (IDR)Emas 1 Gram (USD)Kurs USD-IDR',
|
1100
1089
|
'Hari Ini',
|
@@ -1105,19 +1094,19 @@ Output:
|
|
1105
1094
|
'']],
|
1106
1095
|
[['Pergerakkan Harga Emas 1 Gram'],
|
1107
1096
|
['', 'Penutupan Kemarin', 'Pergerakkan Hari Ini', 'Rata-rata'],
|
1108
|
-
['USD', '75,38', '74,
|
1109
|
-
['KURS', '16.213,50', '16.213,50 - 16.
|
1110
|
-
['IDR', '1.222.152,74', '1.
|
1097
|
+
['USD', '75,38', '74,01 - 75,38', '74,70'],
|
1098
|
+
['KURS', '16.213,50', '16.213,50 - 16.249,35', '16.231,43'],
|
1099
|
+
['IDR', '1.222.152,74', '1.202.636,17 - 1.222.152,74', '1.212.394,46'],
|
1111
1100
|
[''],
|
1112
1101
|
['', 'Awal Tahun', 'Pergerakkan YTD', '+/- YTD'],
|
1113
|
-
['USD', '66,32', '64,07 - 77,14', '+7,
|
1114
|
-
['KURS', '15.390,10', '15.390,00 - 16.307,80', '+
|
1115
|
-
['IDR', '1.020.729,53', '997.660,12 - 1.256.829,06', '+
|
1102
|
+
['USD', '66,32', '64,07 - 77,14', '+7,69 (11,60%)'],
|
1103
|
+
['KURS', '15.390,10', '15.390,00 - 16.307,80', '+859,25 (5,58%)'],
|
1104
|
+
['IDR', '1.020.729,53', '997.660,12 - 1.256.829,06', '+181.906,64 (17,82%)'],
|
1116
1105
|
[''],
|
1117
1106
|
['', 'Tahun Lalu / 52 Minggu', 'Pergerakkan 52 Minggu', '+/- 52 Minggu'],
|
1118
|
-
['USD', '63,97', '58,43 - 77,14', '+10,
|
1119
|
-
['KURS', '14.673,55', '14.669,40 - 16.307,80', '+1.
|
1120
|
-
['IDR', '938.709,73', '912.925,68 - 1.256.829,06', '+
|
1107
|
+
['USD', '63,97', '58,43 - 77,14', '+10,04 (15,69%)'],
|
1108
|
+
['KURS', '14.673,55', '14.669,40 - 16.307,80', '+1.575,80 (10,74%)'],
|
1109
|
+
['IDR', '938.709,73', '912.925,68 - 1.256.829,06', '+263.926,44 (28,12%)']])
|
1121
1110
|
```
|
1122
1111
|
|
1123
1112
|
## iloads
|
@@ -1142,18 +1131,6 @@ Output:
|
|
1142
1131
|
{'a': 123, 'l': (12, 23, [12, 42]), 't': ['disini', 'senang', 'disana', 'senang']}
|
1143
1132
|
```
|
1144
1133
|
|
1145
|
-
## input_char
|
1146
|
-
|
1147
|
-
`input_char(prompt=None, prompt_ending='', newline_after_input=True, echo_char=True, default=None)`
|
1148
|
-
|
1149
|
-
Meminta masukan satu huruf tanpa menekan Enter.
|
1150
|
-
|
1151
|
-
```py
|
1152
|
-
input_char("Input char : ")
|
1153
|
-
input_char("Input char : ", default='Y')
|
1154
|
-
input_char("Input Char without print : ", echo_char=False)
|
1155
|
-
```
|
1156
|
-
|
1157
1134
|
## int_to_bin
|
1158
1135
|
|
1159
1136
|
`int_to_bin(n)`
|
@@ -1259,7 +1236,7 @@ Output:
|
|
1259
1236
|
```py
|
1260
1237
|
8
|
1261
1238
|
['mana', 'aja']
|
1262
|
-
[<Element a at
|
1239
|
+
[<Element a at 0x7a71d8e530>, <Element a at 0x7a716d0eb0>, <Element a at 0x7a716d0f50>, <Element a at 0x7a716d0fa0>, <Element a at 0x7a716d0ff0>, <Element a at 0x7a716d1040>, <Element a at 0x7a716d1090>, <Element a at 0x7a716d10e0>, <Element a at 0x7a716d1130>, <Element a at 0x7a716d1180>, <Element a at 0x7a716d11d0>, <Element a at 0x7a716d1220>, <Element a at 0x7a716d1270>, <Element a at 0x7a716d12c0>, <Element a at 0x7a716d1310>, <Element a at 0x7a716d1360>, <Element a at 0x7a716d13b0>, <Element a at 0x7a716d1400>]
|
1263
1240
|
False
|
1264
1241
|
```
|
1265
1242
|
|
@@ -1321,7 +1298,7 @@ print(list(iscandir("./", recursive=False, scan_file=False)))
|
|
1321
1298
|
|
1322
1299
|
Output:
|
1323
1300
|
```py
|
1324
|
-
<generator object iscandir at
|
1301
|
+
<generator object iscandir at 0x7a71d84640>
|
1325
1302
|
[PosixPath('.git'), PosixPath('.vscode'), PosixPath('pypipr'), PosixPath('__pycache__'), PosixPath('dist')]
|
1326
1303
|
```
|
1327
1304
|
|
@@ -1358,73 +1335,73 @@ Output:
|
|
1358
1335
|
'ComparePerformance': <class 'pypipr.ComparePerformance.ComparePerformance'>,
|
1359
1336
|
'PintUregQuantity': <class 'pint.Quantity'>,
|
1360
1337
|
'RunParallel': <class 'pypipr.RunParallel.RunParallel'>},
|
1361
|
-
'function': {'avg': <function avg at
|
1362
|
-
'get_filemtime': <function get_filemtime at
|
1363
|
-
'print_colorize': <function print_colorize at
|
1364
|
-
'print_log': <function print_log at
|
1365
|
-
'console_run': <function console_run at
|
1366
|
-
'auto_reload': <function auto_reload at
|
1367
|
-
'basename': <function basename at
|
1368
|
-
'chr_to_int': <function chr_to_int at
|
1369
|
-
'int_to_chr': <function int_to_chr at
|
1370
|
-
'irange': <function irange at
|
1371
|
-
'batchmaker': <function batchmaker at
|
1372
|
-
'calculate': <function calculate at
|
1373
|
-
'batch_calculate': <function batch_calculate at
|
1374
|
-
'
|
1375
|
-
'
|
1376
|
-
'
|
1377
|
-
'
|
1378
|
-
'choices': <function choices at
|
1379
|
-
'chunk_array': <function chunk_array at
|
1380
|
-
'create_folder': <function create_folder at
|
1381
|
-
'datetime_from_string': <function datetime_from_string at
|
1382
|
-
'datetime_now': <function datetime_now at
|
1383
|
-
'dict_first': <function dict_first at
|
1384
|
-
'dirname': <function dirname at
|
1385
|
-
'
|
1386
|
-
'
|
1387
|
-
'
|
1388
|
-
'
|
1389
|
-
'
|
1390
|
-
'
|
1391
|
-
'
|
1392
|
-
'
|
1393
|
-
'
|
1394
|
-
'
|
1395
|
-
'
|
1396
|
-
'
|
1397
|
-
'
|
1398
|
-
'
|
1399
|
-
'
|
1400
|
-
'
|
1401
|
-
'
|
1402
|
-
'
|
1403
|
-
'
|
1404
|
-
'
|
1405
|
-
'
|
1406
|
-
'
|
1407
|
-
'
|
1408
|
-
'
|
1409
|
-
'
|
1410
|
-
'
|
1411
|
-
'
|
1412
|
-
'
|
1413
|
-
'
|
1414
|
-
'
|
1415
|
-
'
|
1416
|
-
'
|
1417
|
-
'
|
1418
|
-
'
|
1419
|
-
'
|
1420
|
-
'
|
1421
|
-
'
|
1422
|
-
'
|
1423
|
-
'
|
1424
|
-
'
|
1425
|
-
'
|
1338
|
+
'function': {'avg': <function avg at 0x7a7c8b6700>,
|
1339
|
+
'get_filemtime': <function get_filemtime at 0x7a73f072e0>,
|
1340
|
+
'print_colorize': <function print_colorize at 0x7a73f074c0>,
|
1341
|
+
'print_log': <function print_log at 0x7a7419ab60>,
|
1342
|
+
'console_run': <function console_run at 0x7a73f07380>,
|
1343
|
+
'auto_reload': <function auto_reload at 0x7a740cbec0>,
|
1344
|
+
'basename': <function basename at 0x7a73f07240>,
|
1345
|
+
'chr_to_int': <function chr_to_int at 0x7a73f07a60>,
|
1346
|
+
'int_to_chr': <function int_to_chr at 0x7a73f07b00>,
|
1347
|
+
'irange': <function irange at 0x7a73f07d80>,
|
1348
|
+
'batchmaker': <function batchmaker at 0x7a73f07740>,
|
1349
|
+
'calculate': <function calculate at 0x7a73ef42c0>,
|
1350
|
+
'batch_calculate': <function batch_calculate at 0x7a73f07600>,
|
1351
|
+
'is_empty': <function is_empty at 0x7a73ef4540>,
|
1352
|
+
'exit_if_empty': <function exit_if_empty at 0x7a73ef4400>,
|
1353
|
+
'input_char': <function input_char at 0x7a73ef44a0>,
|
1354
|
+
'get_by_index': <function get_by_index at 0x7a73ef45e0>,
|
1355
|
+
'choices': <function choices at 0x7a73ef47c0>,
|
1356
|
+
'chunk_array': <function chunk_array at 0x7a73ef4860>,
|
1357
|
+
'create_folder': <function create_folder at 0x7a73ef4900>,
|
1358
|
+
'datetime_from_string': <function datetime_from_string at 0x7a73ef49a0>,
|
1359
|
+
'datetime_now': <function datetime_now at 0x7a73ef4a40>,
|
1360
|
+
'dict_first': <function dict_first at 0x7a73ef4ae0>,
|
1361
|
+
'dirname': <function dirname at 0x7a73ef4b80>,
|
1362
|
+
'is_iterable': <function is_iterable at 0x7a73ef4d60>,
|
1363
|
+
'to_str': <function to_str at 0x7a73ef4e00>,
|
1364
|
+
'filter_empty': <function filter_empty at 0x7a73ef4c20>,
|
1365
|
+
'get_class_method': <function get_class_method at 0x7a73ef4cc0>,
|
1366
|
+
'get_filesize': <function get_filesize at 0x7a73ef4f40>,
|
1367
|
+
'github_pull': <function github_pull at 0x7a73ef4fe0>,
|
1368
|
+
'github_push': <function github_push at 0x7a73ef51c0>,
|
1369
|
+
'github_user': <function github_user at 0x7a73ef5260>,
|
1370
|
+
'iargv': <function iargv at 0x7a73ef5080>,
|
1371
|
+
'idumps_html': <function idumps_html at 0x7a73ef54e0>,
|
1372
|
+
'idumps': <function idumps at 0x7a73ef53a0>,
|
1373
|
+
'int_to_int': <function int_to_int at 0x7a73db1e40>,
|
1374
|
+
'ienumerate': <function ienumerate at 0x7a73ef59e0>,
|
1375
|
+
'ienv': <function ienv at 0x7a73db1d00>,
|
1376
|
+
'iexec': <function iexec at 0x7a73db1ee0>,
|
1377
|
+
'ijoin': <function ijoin at 0x7a73db2020>,
|
1378
|
+
'iloads_html': <function iloads_html at 0x7a73db2200>,
|
1379
|
+
'iloads': <function iloads at 0x7a73db1f80>,
|
1380
|
+
'int_to_bin': <function int_to_bin at 0x7a73db2160>,
|
1381
|
+
'int_to_hex': <function int_to_hex at 0x7a73db22a0>,
|
1382
|
+
'int_to_oct': <function int_to_oct at 0x7a73db2340>,
|
1383
|
+
'is_valid_url': <function is_valid_url at 0x7a73db2520>,
|
1384
|
+
'iopen': <function iopen at 0x7a73df6980>,
|
1385
|
+
'iprint': <function iprint at 0x7a73db2480>,
|
1386
|
+
'ireplace': <function ireplace at 0x7a73db2840>,
|
1387
|
+
'iscandir': <function iscandir at 0x7a71dce0c0>,
|
1388
|
+
'isplit': <function isplit at 0x7a71dce160>,
|
1389
|
+
'ivars': <function ivars at 0x7a71dce200>,
|
1390
|
+
'log': <function log at 0x7a71dce2a0>,
|
1391
|
+
'password_generator': <function password_generator at 0x7a71dce340>,
|
1392
|
+
'pip_freeze_without_version': <function pip_freeze_without_version at 0x7a71dce480>,
|
1393
|
+
'poetry_publish': <function poetry_publish at 0x7a71dce520>,
|
1394
|
+
'poetry_update_version': <function poetry_update_version at 0x7a71dce660>,
|
1395
|
+
'print_dir': <function print_dir at 0x7a71dce840>,
|
1396
|
+
'print_to_last_line': <function print_to_last_line at 0x7a71dce8e0>,
|
1397
|
+
'random_bool': <function random_bool at 0x7a71dce980>,
|
1398
|
+
'restart': <function restart at 0x7a71dcea20>,
|
1399
|
+
'set_timeout': <function set_timeout at 0x7a71dceac0>,
|
1400
|
+
'sets_ordered': <function sets_ordered at 0x7a71dceb60>,
|
1401
|
+
'str_cmp': <function str_cmp at 0x7a71dcec00>,
|
1402
|
+
'text_colorize': <function text_colorize at 0x7a71dceca0>},
|
1426
1403
|
'variable': {'LINUX': True,
|
1427
|
-
'PintUreg': <pint.registry.UnitRegistry object at
|
1404
|
+
'PintUreg': <pint.registry.UnitRegistry object at 0x7a7c8bc450>,
|
1428
1405
|
'WINDOWS': False},
|
1429
1406
|
'module': {'asyncio': <module 'asyncio' from '/data/data/com.termux/files/usr/lib/python3.11/asyncio/__init__.py'>,
|
1430
1407
|
'colorama': <module 'colorama' from '/data/data/com.termux/files/usr/lib/python3.11/site-packages/colorama/__init__.py'>,
|
@@ -1498,7 +1475,7 @@ print(password_generator())
|
|
1498
1475
|
|
1499
1476
|
Output:
|
1500
1477
|
```py
|
1501
|
-
|
1478
|
+
#~1.#5Oc
|
1502
1479
|
```
|
1503
1480
|
|
1504
1481
|
## pip_freeze_without_version
|
@@ -1556,7 +1533,7 @@ Output:
|
|
1556
1533
|
__enter__ : https:/www.google.com
|
1557
1534
|
__fspath__ : https:/www.google.com
|
1558
1535
|
__getstate__ : (None, {'_drv': '', '_root': '', '_parts': ['https:', 'www.google.com'], '_str': 'https:/www.google.com'})
|
1559
|
-
__hash__ :
|
1536
|
+
__hash__ : 1387072094101240364
|
1560
1537
|
__init__ : None
|
1561
1538
|
__init_subclass__ : None
|
1562
1539
|
__module__ : pathlib
|
@@ -1569,8 +1546,8 @@ Output:
|
|
1569
1546
|
_cached_cparts : ['https:', 'www.google.com']
|
1570
1547
|
_cparts : ['https:', 'www.google.com']
|
1571
1548
|
_drv :
|
1572
|
-
_flavour : <pathlib._PosixFlavour object at
|
1573
|
-
_hash :
|
1549
|
+
_flavour : <pathlib._PosixFlavour object at 0x7a80eacb90>
|
1550
|
+
_hash : 1387072094101240364
|
1574
1551
|
_parts : ['https:', 'www.google.com']
|
1575
1552
|
_root :
|
1576
1553
|
_str : https:/www.google.com
|
@@ -1592,7 +1569,7 @@ Output:
|
|
1592
1569
|
is_reserved : False
|
1593
1570
|
is_socket : False
|
1594
1571
|
is_symlink : False
|
1595
|
-
iterdir : <generator object Path.iterdir at
|
1572
|
+
iterdir : <generator object Path.iterdir at 0x7a71d827a0>
|
1596
1573
|
joinpath : https:/www.google.com
|
1597
1574
|
name : www.google.com
|
1598
1575
|
parent : https:
|
@@ -1605,6 +1582,18 @@ Output:
|
|
1605
1582
|
suffixes : ['.google', '.com']
|
1606
1583
|
```
|
1607
1584
|
|
1585
|
+
## print_to_last_line
|
1586
|
+
|
1587
|
+
`print_to_last_line(text: str, latest=1, clear=True)`
|
1588
|
+
|
1589
|
+
Melakukan print ke konsol tetapi akan menimpa baris terakhir.
|
1590
|
+
Berguna untuk memberikan progress secara interaktif.
|
1591
|
+
|
1592
|
+
```py
|
1593
|
+
c = input("masukkan apa saja : ")
|
1594
|
+
print_to_last_line(f"masukkan apa saja : {c} [ok]")
|
1595
|
+
```
|
1596
|
+
|
1608
1597
|
## random_bool
|
1609
1598
|
|
1610
1599
|
`random_bool()`
|
@@ -1646,7 +1635,7 @@ x.cancel()
|
|
1646
1635
|
|
1647
1636
|
Output:
|
1648
1637
|
```py
|
1649
|
-
<Timer(Thread-2, started
|
1638
|
+
<Timer(Thread-2, started 525871127792)>
|
1650
1639
|
menghentikan timeout 7
|
1651
1640
|
```
|
1652
1641
|
|
@@ -1664,7 +1653,7 @@ print(list(sets_ordered(array)))
|
|
1664
1653
|
|
1665
1654
|
Output:
|
1666
1655
|
```py
|
1667
|
-
<generator object sets_ordered at
|
1656
|
+
<generator object sets_ordered at 0x7a71da8d40>
|
1668
1657
|
[2, 3, 12, 42, 1, 43, 41, 4, 24, 32]
|
1669
1658
|
```
|
1670
1659
|
|
@@ -1686,6 +1675,17 @@ Output:
|
|
1686
1675
|
True
|
1687
1676
|
```
|
1688
1677
|
|
1678
|
+
## text_colorize
|
1679
|
+
|
1680
|
+
`text_colorize(text, color='\x1b[32m', bright='\x1b[1m', color_end='\x1b[0m')`
|
1681
|
+
|
1682
|
+
return text dengan warna untuk menunjukan text penting
|
1683
|
+
|
1684
|
+
```py
|
1685
|
+
text_colorize("Print some text")
|
1686
|
+
text_colorize("Print some text", color=colorama.Fore.RED)
|
1687
|
+
```
|
1688
|
+
|
1689
1689
|
# CLASS
|
1690
1690
|
|
1691
1691
|
## APIMixinView
|
@@ -1739,7 +1739,7 @@ print(ExampleComparePerformance().compare_performance())
|
|
1739
1739
|
|
1740
1740
|
Output:
|
1741
1741
|
```py
|
1742
|
-
{'a': <generator object ExampleComparePerformance.a.<locals>.<genexpr> at
|
1742
|
+
{'a': <generator object ExampleComparePerformance.a.<locals>.<genexpr> at 0x7a71da8860>,
|
1743
1743
|
'b': (0, 1, 2, 3, 4, 5, 6, 7, 8, 9),
|
1744
1744
|
'c': [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
|
1745
1745
|
'd': [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]}
|