pypipr 1.0.136__py3-none-any.whl → 1.0.138__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 -0
- pypipr/sqlite_delete_table.py +9 -0
- pypipr/sqlite_get_all_tables.py +5 -5
- pypipr/sqlite_get_data_table.py +5 -5
- {pypipr-1.0.136.dist-info → pypipr-1.0.138.dist-info}/METADATA +156 -174
- {pypipr-1.0.136.dist-info → pypipr-1.0.138.dist-info}/RECORD +8 -8
- pypipr/choices.py.bak +0 -64
- {pypipr-1.0.136.dist-info → pypipr-1.0.138.dist-info}/WHEEL +0 -0
- {pypipr-1.0.136.dist-info → pypipr-1.0.138.dist-info}/entry_points.txt +0 -0
pypipr/__init__.py
CHANGED
@@ -71,6 +71,7 @@ from .random_bool import random_bool
|
|
71
71
|
from .restart import restart
|
72
72
|
from .set_timeout import set_timeout
|
73
73
|
from .sets_ordered import sets_ordered
|
74
|
+
from .sqlite_delete_table import sqlite_delete_table
|
74
75
|
from .sqlite_get_all_tables import sqlite_get_all_tables
|
75
76
|
from .sqlite_get_data_table import sqlite_get_data_table
|
76
77
|
from .str_cmp import str_cmp
|
pypipr/sqlite_get_all_tables.py
CHANGED
@@ -2,9 +2,9 @@ import sqlite3
|
|
2
2
|
|
3
3
|
|
4
4
|
def sqlite_get_all_tables(filename):
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
tables =
|
9
|
-
|
5
|
+
con = sqlite3.connect(filename)
|
6
|
+
cur = con.cursor()
|
7
|
+
cur.execute("SELECT name FROM sqlite_master WHERE type='table' order by name;")
|
8
|
+
tables = cur.fetchall()
|
9
|
+
con.close()
|
10
10
|
return tables
|
pypipr/sqlite_get_data_table.py
CHANGED
@@ -2,9 +2,9 @@ import sqlite3
|
|
2
2
|
|
3
3
|
|
4
4
|
def sqlite_get_data_table(filename, tablename):
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
rows =
|
9
|
-
|
5
|
+
con = sqlite3.connect(filename)
|
6
|
+
cur = con.cursor()
|
7
|
+
cur.execute(f"SELECT * FROM {tablename}")
|
8
|
+
rows = cur.fetchall()
|
9
|
+
con.close()
|
10
10
|
return rows
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: pypipr
|
3
|
-
Version: 1.0.
|
3
|
+
Version: 1.0.138
|
4
4
|
Summary: The Python Package Index Project
|
5
5
|
Author: ufiapjj
|
6
6
|
Author-email: ufiapjj@gmail.com
|
@@ -248,8 +248,8 @@ iprint(irange("z", "a", 4))
|
|
248
248
|
|
249
249
|
Output:
|
250
250
|
```py
|
251
|
-
<generator object int_range at
|
252
|
-
<generator object int_range at
|
251
|
+
<generator object int_range at 0x7a9f373740>
|
252
|
+
<generator object int_range at 0x7a9f373740>
|
253
253
|
[13, 12, 11, 10, 9, 8, 7, 6]
|
254
254
|
[2, 5, 8]
|
255
255
|
[2, 5, 8]
|
@@ -281,7 +281,7 @@ print(list(batchmaker(s)))
|
|
281
281
|
|
282
282
|
Output:
|
283
283
|
```py
|
284
|
-
<generator object batchmaker at
|
284
|
+
<generator object batchmaker at 0x7a9f3f5480>
|
285
285
|
['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.']
|
286
286
|
```
|
287
287
|
|
@@ -335,7 +335,7 @@ print(list(batch_calculate("{1 10} m ** {1 3}")))
|
|
335
335
|
|
336
336
|
Output:
|
337
337
|
```py
|
338
|
-
<generator object batch_calculate at
|
338
|
+
<generator object batch_calculate at 0x7a9f3fe110>
|
339
339
|
[('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')>)]
|
340
340
|
```
|
341
341
|
|
@@ -441,7 +441,7 @@ print(list(chunk_array(arr, 5)))
|
|
441
441
|
|
442
442
|
Output:
|
443
443
|
```py
|
444
|
-
<generator object chunk_array at
|
444
|
+
<generator object chunk_array at 0x7a9f373840>
|
445
445
|
[[2, 3, 12, 3, 3], [42, 42, 1, 43, 2], [42, 41, 4, 24, 32], [42, 3, 12, 32, 42], [42]]
|
446
446
|
```
|
447
447
|
|
@@ -492,9 +492,9 @@ print(datetime_now("Etc/GMT+7"))
|
|
492
492
|
|
493
493
|
Output:
|
494
494
|
```py
|
495
|
-
2024-05-
|
496
|
-
2024-05-15
|
497
|
-
2024-05-15
|
495
|
+
2024-05-16 04:58:20.300250+07:00
|
496
|
+
2024-05-15 21:58:20.301690+00:00
|
497
|
+
2024-05-15 14:58:20.305410-07:00
|
498
498
|
```
|
499
499
|
|
500
500
|
## dict_first
|
@@ -600,7 +600,7 @@ iprint(filter_empty(var))
|
|
600
600
|
|
601
601
|
Output:
|
602
602
|
```py
|
603
|
-
<generator object filter_empty at
|
603
|
+
<generator object filter_empty at 0x7a9f3fde40>
|
604
604
|
[1, '0', True, {}, ['eee']]
|
605
605
|
```
|
606
606
|
|
@@ -647,8 +647,8 @@ print(list(get_class_method(ExampleGetClassMethod)))
|
|
647
647
|
|
648
648
|
Output:
|
649
649
|
```py
|
650
|
-
<generator object get_class_method at
|
651
|
-
[<function ExampleGetClassMethod.a at
|
650
|
+
<generator object get_class_method at 0x7a9f3fe3e0>
|
651
|
+
[<function ExampleGetClassMethod.a at 0x7a9f436e80>, <function ExampleGetClassMethod.b at 0x7a9f436f20>, <function ExampleGetClassMethod.c at 0x7a9f434ea0>, <function ExampleGetClassMethod.d at 0x7a9f437100>]
|
652
652
|
```
|
653
653
|
|
654
654
|
## get_filesize
|
@@ -854,6 +854,7 @@ Output:
|
|
854
854
|
'restart',
|
855
855
|
'set_timeout',
|
856
856
|
'sets_ordered',
|
857
|
+
'sqlite_delete_table',
|
857
858
|
'sqlite_get_all_tables',
|
858
859
|
'sqlite_get_data_table',
|
859
860
|
'str_cmp',
|
@@ -1060,7 +1061,7 @@ Output:
|
|
1060
1061
|
|
1061
1062
|
## ienumerate
|
1062
1063
|
|
1063
|
-
`ienumerate(iterator, start=0, key=<function int_to_int at
|
1064
|
+
`ienumerate(iterator, start=0, key=<function int_to_int at 0x7aa7e979c0>)`
|
1064
1065
|
|
1065
1066
|
meningkatkan fungsi enumerate() pada python
|
1066
1067
|
untuk key menggunakan huruf dan basis angka lainnya.
|
@@ -1073,7 +1074,7 @@ iprint(ienumerate(it, key=int_to_chr))
|
|
1073
1074
|
|
1074
1075
|
Output:
|
1075
1076
|
```py
|
1076
|
-
<generator object ienumerate at
|
1077
|
+
<generator object ienumerate at 0x7a9f3fe4d0>
|
1077
1078
|
[('a', 'ini'), ('b', 'contoh'), ('c', 'enumerator')]
|
1078
1079
|
```
|
1079
1080
|
|
@@ -1140,7 +1141,7 @@ print(ijoin(10, ' '))
|
|
1140
1141
|
|
1141
1142
|
Output:
|
1142
1143
|
```py
|
1143
|
-
|
1144
|
+
asd, weq, dfs, qweqw
|
1144
1145
|
,ini,path,seperti,url,
|
1145
1146
|
ini,path,seperti,url
|
1146
1147
|
<li>satu</li>
|
@@ -1185,10 +1186,10 @@ pprint.pprint(iloads_html(iopen("https://harga-emas.org/1-gram/")), depth=10)
|
|
1185
1186
|
Output:
|
1186
1187
|
```py
|
1187
1188
|
(['Home', 'Emas 1 Gram', 'History', 'Trend', 'Perak 1 Gram', 'Pluang'],
|
1188
|
-
[['Harga Emas Hari Ini -
|
1189
|
-
['Spot Emas
|
1190
|
-
'Kurs
|
1191
|
-
'Emas
|
1189
|
+
[['Harga Emas Hari Ini - Kamis, 16 Mei 2024'],
|
1190
|
+
['Spot Emas USD2.386,03 / oz',
|
1191
|
+
'Kurs IDR16.131,00 / USD',
|
1192
|
+
'Emas IDR1.237.452 / gr'],
|
1192
1193
|
['LM Antam (Jual)↑1.332.000 (+8.000) / gr',
|
1193
1194
|
'LM Antam (Beli)↑1.223.000 (+8.000) / gr']],
|
1194
1195
|
[['Harga Emas Hari Ini'],
|
@@ -1259,44 +1260,20 @@ Output:
|
|
1259
1260
|
'Update harga LM Pegadaian :31 Agustus 2023']],
|
1260
1261
|
[['Spot Harga Emas Hari Ini (Market Open)'],
|
1261
1262
|
['Satuan', 'USD', 'Kurs\xa0Dollar', 'IDR'],
|
1262
|
-
['Ounce\xa0(oz)', '2.
|
1263
|
-
['Gram\xa0(gr)', '76,
|
1264
|
-
['Kilogram\xa0(kg)', '76.
|
1265
|
-
['Update harga emas :
|
1263
|
+
['Ounce\xa0(oz)', '2.386,03', '16.131,00', '38.489.050'],
|
1264
|
+
['Gram\xa0(gr)', '76,71', '16.131,00', '1.237.452'],
|
1265
|
+
['Kilogram\xa0(kg)', '76.712,65', '16.131,00', '1.237.451.691'],
|
1266
|
+
['Update harga emas :16 Mei 2024, pukul 04:58Update kurs :15 Mei 2024, pukul '
|
1266
1267
|
'13:10']],
|
1267
1268
|
[['Gram', 'UBS Gold 99.99%'],
|
1268
1269
|
['Jual', 'Beli'],
|
1269
1270
|
['/ Batang', '/ Gram', '/ Batang', '/ Gram'],
|
1270
|
-
['100',
|
1271
|
-
|
1272
|
-
|
1273
|
-
|
1274
|
-
|
1275
|
-
['
|
1276
|
-
'63.600.000 (+350.000)',
|
1277
|
-
'1.272.000 (+7.000)',
|
1278
|
-
'62.645.000 (+200.000)',
|
1279
|
-
'1.252.900 (+4.000)'],
|
1280
|
-
['25',
|
1281
|
-
'31.850.000 (+175.000)',
|
1282
|
-
'1.274.000 (+7.000)',
|
1283
|
-
'31.425.000 (+100.000)',
|
1284
|
-
'1.257.000 (+4.000)'],
|
1285
|
-
['10',
|
1286
|
-
'12.790.000 (+80.000)',
|
1287
|
-
'1.279.000 (+8.000)',
|
1288
|
-
'12.620.000 (+40.000)',
|
1289
|
-
'1.262.000 (+4.000)'],
|
1290
|
-
['5',
|
1291
|
-
'6.420.000 (+40.000)',
|
1292
|
-
'1.284.000 (+8.000)',
|
1293
|
-
'6.362.000 (+20.000)',
|
1294
|
-
'1.272.400 (+4.000)'],
|
1295
|
-
['1',
|
1296
|
-
'1.330.000 (+6.000)',
|
1297
|
-
'1.330.000 (+6.000)',
|
1298
|
-
'1.305.000 (+4.000)',
|
1299
|
-
'1.305.000 (+4.000)'],
|
1271
|
+
['100', '127.412.000', '1.274.120', '125.185.000', '1.251.850'],
|
1272
|
+
['50', '63.600.000', '1.272.000', '62.645.000', '1.252.900'],
|
1273
|
+
['25', '31.850.000', '1.274.000', '31.425.000', '1.257.000'],
|
1274
|
+
['10', '12.790.000', '1.279.000', '12.620.000', '1.262.000'],
|
1275
|
+
['5', '6.420.000', '1.284.000', '6.362.000', '1.272.400'],
|
1276
|
+
['1', '1.330.000', '1.330.000', '1.305.000', '1.305.000'],
|
1300
1277
|
['', 'Update :15 Mei 2024, pukul 12:24']],
|
1301
1278
|
[['Konversi Satuan'],
|
1302
1279
|
['Satuan', 'Ounce (oz)', 'Gram (gr)', 'Kilogram (kg)'],
|
@@ -1307,37 +1284,37 @@ Output:
|
|
1307
1284
|
['Waktu', 'Emas'],
|
1308
1285
|
['Unit', 'USD', 'IDR'],
|
1309
1286
|
['Angka', '+/-', 'Angka', '+/-'],
|
1310
|
-
['Hari Ini', 'Kurs', '', '', '16.
|
1311
|
-
['oz', '2.
|
1312
|
-
['gr', '
|
1313
|
-
['30 Hari', 'Kurs', '', '', '15.
|
1314
|
-
['oz', '2.
|
1315
|
-
['gr', '
|
1287
|
+
['Hari Ini', 'Kurs', '', '', '16.131', '%'],
|
1288
|
+
['oz', '2.386,03', '%', '38.489.050', '%'],
|
1289
|
+
['gr', '76,71', '%', '1.237.452', '%'],
|
1290
|
+
['30 Hari', 'Kurs', '', '', '15.873', '+258+1,63%'],
|
1291
|
+
['oz', '2.397,12', '-11,09-0,46%', '38.049.486', '+439.564+1,16%'],
|
1292
|
+
['gr', '77,07', '-0,36-0,46%', '1.223.319', '+14.132+1,16%'],
|
1316
1293
|
['2 Bulan', 'Kurs', '', '', '15.582', '+549+3,52%'],
|
1317
|
-
['oz', '2.156,08', '+
|
1318
|
-
['gr', '69,32', '+7,
|
1294
|
+
['oz', '2.156,08', '+229,95+10,67%', '33.596.039', '+4.893.011+14,56%'],
|
1295
|
+
['gr', '69,32', '+7,39+10,67', '1.080.138', '+157.314+14,56%'],
|
1319
1296
|
['6 Bulan', 'Kurs', '', '', '15.595', '+536+3,44%'],
|
1320
|
-
['oz', '1.
|
1321
|
-
['gr', '63,
|
1297
|
+
['oz', '1.980,79', '+405,24+20,46%', '30.890.420', '+7.598.630+24,60%'],
|
1298
|
+
['gr', '63,68', '+13,03+20,46%', '993.150', '+244.302+24,60%'],
|
1322
1299
|
['1 Tahun', 'Kurs', '', '', '15.731', '+400+2,54%'],
|
1323
|
-
['oz', '1.823,86', '+
|
1324
|
-
['gr', '58,64', '+
|
1325
|
-
['2 Tahun', 'Kurs', '', '', '14.
|
1326
|
-
['oz', '1.
|
1327
|
-
['gr', '58,
|
1328
|
-
['3 Tahun', 'Kurs', '', '', '14.
|
1329
|
-
['oz', '1.
|
1330
|
-
['gr', '
|
1300
|
+
['oz', '1.823,86', '+562,17+30,82%', '28.691.142', '+9.797.908+34,15%'],
|
1301
|
+
['gr', '58,64', '+18,07+30,82%', '922.442', '+315.010+34,15%'],
|
1302
|
+
['2 Tahun', 'Kurs', '', '', '14.619', '+1.512+10,34%'],
|
1303
|
+
['oz', '1.821,43', '+564,60+31,00%', '26.627.503', '+11.861.547+44,55%'],
|
1304
|
+
['gr', '58,56', '+18,15+31,00%', '856.094', '+381.358+44,55%'],
|
1305
|
+
['3 Tahun', 'Kurs', '', '', '14.203', '+1.928+13,57%'],
|
1306
|
+
['oz', '1.867,94', '+518,09+27,74%', '26.530.370', '+11.958.679+45,08%'],
|
1307
|
+
['gr', '60,06', '+16,66+27,74%', '852.971', '+384.480+45,08%'],
|
1331
1308
|
['5 Tahun', 'Kurs', '', '', '14.469', '+1.662+11,49%'],
|
1332
|
-
['oz', '1.
|
1333
|
-
['gr', '41,
|
1309
|
+
['oz', '1.277,78', '+1.108,25+86,73%', '18.488.199', '+20.000.851+108,18%'],
|
1310
|
+
['gr', '41,08', '+35,63+86,73%', '594.409', '+643.042+108,18%']])
|
1334
1311
|
(['Home', 'Emas 1 Gram', 'History', 'Trend', 'Perak 1 Gram', 'Pluang'],
|
1335
1312
|
[[''],
|
1336
1313
|
['Emas 24 KaratHarga Emas 1 Gram', ''],
|
1337
|
-
['USD', '76,
|
1338
|
-
['KURS', '15.
|
1339
|
-
['IDR', '1.
|
1340
|
-
['
|
1314
|
+
['USD', '76,71↓', '%'],
|
1315
|
+
['KURS', '15.916,70↓', '-14,25-0,09%'],
|
1316
|
+
['IDR', '1.221.012,17↓', '-1.093,16-0,09%'],
|
1317
|
+
['Kamis, 16 Mei 2024 04:58']],
|
1341
1318
|
[[''],
|
1342
1319
|
['Emas 1 Gram (IDR)Emas 1 Gram (USD)Kurs USD-IDR',
|
1343
1320
|
'Hari Ini',
|
@@ -1348,19 +1325,19 @@ Output:
|
|
1348
1325
|
'']],
|
1349
1326
|
[['Pergerakkan Harga Emas 1 Gram'],
|
1350
1327
|
['', 'Penutupan Kemarin', 'Pergerakkan Hari Ini', 'Rata-rata'],
|
1351
|
-
['USD', '
|
1352
|
-
['KURS', '
|
1353
|
-
['IDR', '1.
|
1328
|
+
['USD', '76,71', '76,71 - 76,71', '76,71'],
|
1329
|
+
['KURS', '15.930,95', '15.916,70 - 15.930,95', '15.923,83'],
|
1330
|
+
['IDR', '1.222.105,33', '1.221.012,17 - 1.222.105,33', '1.221.558,75'],
|
1354
1331
|
[''],
|
1355
1332
|
['', 'Awal Tahun', 'Pergerakkan YTD', '+/- YTD'],
|
1356
|
-
['USD', '66,32', '64,07 - 77,14', '+10,
|
1357
|
-
['KURS', '15.390,10', '15.390,00 - 16.307,80', '+
|
1358
|
-
['IDR', '1.020.729,53', '997.660,12 - 1.256.829,06', '+
|
1333
|
+
['USD', '66,32', '64,07 - 77,14', '+10,39 (15,67%)'],
|
1334
|
+
['KURS', '15.390,10', '15.390,00 - 16.307,80', '+526,60 (3,42%)'],
|
1335
|
+
['IDR', '1.020.729,53', '997.660,12 - 1.256.829,06', '+200.282,64 (19,62%)'],
|
1359
1336
|
[''],
|
1360
1337
|
['', 'Tahun Lalu / 52 Minggu', 'Pergerakkan 52 Minggu', '+/- 52 Minggu'],
|
1361
|
-
['USD', '64,
|
1362
|
-
['KURS', '14.
|
1363
|
-
['IDR', '
|
1338
|
+
['USD', '64,94', '58,43 - 77,14', '+11,77 (18,12%)'],
|
1339
|
+
['KURS', '14.796,95', '14.833,15 - 16.307,80', '+1.119,75 (7,57%)'],
|
1340
|
+
['IDR', '960.842,68', '912.925,68 - 1.256.829,06', '+260.169,49 (27,08%)']])
|
1364
1341
|
```
|
1365
1342
|
|
1366
1343
|
## iloads
|
@@ -1490,7 +1467,7 @@ Output:
|
|
1490
1467
|
```py
|
1491
1468
|
8
|
1492
1469
|
['mana', 'aja']
|
1493
|
-
[<Element a at
|
1470
|
+
[<Element a at 0x7a9f44a6c0>, <Element a at 0x7a9f2946e0>, <Element a at 0x7a9f294780>, <Element a at 0x7a9f2947d0>, <Element a at 0x7a9f294820>, <Element a at 0x7a9f294870>, <Element a at 0x7a9f2948c0>, <Element a at 0x7a9f294910>, <Element a at 0x7a9f294960>, <Element a at 0x7a9f2949b0>, <Element a at 0x7a9f294a00>, <Element a at 0x7a9f294a50>, <Element a at 0x7a9f294aa0>, <Element a at 0x7a9f294af0>, <Element a at 0x7a9f294b40>, <Element a at 0x7a9f294b90>, <Element a at 0x7a9f294be0>, <Element a at 0x7a9f294c30>]
|
1494
1471
|
False
|
1495
1472
|
```
|
1496
1473
|
|
@@ -1552,7 +1529,7 @@ print(list(iscandir("./", recursive=False, scan_file=False)))
|
|
1552
1529
|
|
1553
1530
|
Output:
|
1554
1531
|
```py
|
1555
|
-
<generator object iscandir at
|
1532
|
+
<generator object iscandir at 0x7a9f373940>
|
1556
1533
|
[PosixPath('.git'), PosixPath('.vscode'), PosixPath('pypipr'), PosixPath('__pycache__'), PosixPath('dist')]
|
1557
1534
|
```
|
1558
1535
|
|
@@ -1585,83 +1562,84 @@ iprint(ivars(__import__('pypipr')))
|
|
1585
1562
|
|
1586
1563
|
Output:
|
1587
1564
|
```py
|
1588
|
-
{'function': {'avg': <function avg at
|
1589
|
-
'get_filemtime': <function get_filemtime at
|
1590
|
-
'print_colorize': <function print_colorize at
|
1591
|
-
'print_log': <function print_log at
|
1592
|
-
'console_run': <function console_run at
|
1593
|
-
'auto_reload': <function auto_reload at
|
1594
|
-
'basename': <function basename at
|
1595
|
-
'chr_to_int': <function chr_to_int at
|
1596
|
-
'int_to_chr': <function int_to_chr at
|
1597
|
-
'irange': <function irange at
|
1598
|
-
'batchmaker': <function batchmaker at
|
1599
|
-
'calculate': <function calculate at
|
1600
|
-
'batch_calculate': <function batch_calculate at
|
1601
|
-
'bin_to_int': <function bin_to_int at
|
1602
|
-
'is_empty': <function is_empty at
|
1603
|
-
'exit_if_empty': <function exit_if_empty at
|
1604
|
-
'input_char': <function input_char at
|
1605
|
-
'choices': <function choices 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
|
-
'is_iterable': <function is_iterable at
|
1613
|
-
'to_str': <function to_str at
|
1614
|
-
'filter_empty': <function filter_empty at
|
1615
|
-
'get_by_index': <function get_by_index at
|
1616
|
-
'get_class_method': <function get_class_method at
|
1617
|
-
'get_filesize': <function get_filesize at
|
1618
|
-
'github_init': <function github_init at
|
1619
|
-
'github_pull': <function github_pull at
|
1620
|
-
'github_push': <function github_push at
|
1621
|
-
'github_user': <function github_user at
|
1622
|
-
'hex_to_int': <function hex_to_int at
|
1623
|
-
'iargv': <function iargv at
|
1624
|
-
'idir': <function idir at
|
1625
|
-
'idumps_html': <function idumps_html at
|
1626
|
-
'idumps': <function idumps at
|
1627
|
-
'int_to_int': <function int_to_int at
|
1628
|
-
'ienumerate': <function ienumerate at
|
1629
|
-
'ienv': <function ienv at
|
1630
|
-
'iexec': <function iexec at
|
1631
|
-
'ijoin': <function ijoin at
|
1632
|
-
'iloads_html': <function iloads_html at
|
1633
|
-
'iloads': <function iloads at
|
1634
|
-
'int_to_bin': <function int_to_bin at
|
1635
|
-
'int_to_hex': <function int_to_hex at
|
1636
|
-
'int_to_oct': <function int_to_oct at
|
1637
|
-
'is_valid_url': <function is_valid_url at
|
1638
|
-
'iopen': <function iopen at
|
1639
|
-
'iprint': <function iprint at
|
1640
|
-
'ireplace': <function ireplace at
|
1641
|
-
'iscandir': <function iscandir at
|
1642
|
-
'isplit': <function isplit at
|
1643
|
-
'ivars': <function ivars at
|
1644
|
-
'log': <function log at
|
1645
|
-
'oct_to_int': <function oct_to_int at
|
1646
|
-
'password_generator': <function password_generator at
|
1647
|
-
'pip_freeze_without_version': <function pip_freeze_without_version at
|
1648
|
-
'poetry_publish': <function poetry_publish at
|
1649
|
-
'poetry_update_version': <function poetry_update_version at
|
1650
|
-
'print_dir': <function print_dir at
|
1651
|
-
'print_to_last_line': <function print_to_last_line at
|
1652
|
-
'random_bool': <function random_bool at
|
1653
|
-
'restart': <function restart at
|
1654
|
-
'set_timeout': <function set_timeout at
|
1655
|
-
'sets_ordered': <function sets_ordered at
|
1656
|
-
'
|
1657
|
-
'
|
1658
|
-
'
|
1659
|
-
'
|
1565
|
+
{'function': {'avg': <function avg at 0x7aae958040>,
|
1566
|
+
'get_filemtime': <function get_filemtime at 0x7aa8073060>,
|
1567
|
+
'print_colorize': <function print_colorize at 0x7aa8073240>,
|
1568
|
+
'print_log': <function print_log at 0x7aa8073100>,
|
1569
|
+
'console_run': <function console_run at 0x7aa80731a0>,
|
1570
|
+
'auto_reload': <function auto_reload at 0x7aa93d0f40>,
|
1571
|
+
'basename': <function basename at 0x7aa800e980>,
|
1572
|
+
'chr_to_int': <function chr_to_int at 0x7aa80737e0>,
|
1573
|
+
'int_to_chr': <function int_to_chr at 0x7aa8073880>,
|
1574
|
+
'irange': <function irange at 0x7aa8073b00>,
|
1575
|
+
'batchmaker': <function batchmaker at 0x7aa80734c0>,
|
1576
|
+
'calculate': <function calculate at 0x7aa8073600>,
|
1577
|
+
'batch_calculate': <function batch_calculate at 0x7aa8073380>,
|
1578
|
+
'bin_to_int': <function bin_to_int at 0x7aa93d0ea0>,
|
1579
|
+
'is_empty': <function is_empty at 0x7aa80802c0>,
|
1580
|
+
'exit_if_empty': <function exit_if_empty at 0x7aa8080180>,
|
1581
|
+
'input_char': <function input_char at 0x7aa8080220>,
|
1582
|
+
'choices': <function choices at 0x7aa8080540>,
|
1583
|
+
'chunk_array': <function chunk_array at 0x7aa80805e0>,
|
1584
|
+
'create_folder': <function create_folder at 0x7aa8080680>,
|
1585
|
+
'datetime_from_string': <function datetime_from_string at 0x7aa8080720>,
|
1586
|
+
'datetime_now': <function datetime_now at 0x7aa80800e0>,
|
1587
|
+
'dict_first': <function dict_first at 0x7aa8082a20>,
|
1588
|
+
'dirname': <function dirname at 0x7aa8082ac0>,
|
1589
|
+
'is_iterable': <function is_iterable at 0x7aa8082ca0>,
|
1590
|
+
'to_str': <function to_str at 0x7aa8082d40>,
|
1591
|
+
'filter_empty': <function filter_empty at 0x7aa80732e0>,
|
1592
|
+
'get_by_index': <function get_by_index at 0x7aa8082b60>,
|
1593
|
+
'get_class_method': <function get_class_method at 0x7aa8082de0>,
|
1594
|
+
'get_filesize': <function get_filesize at 0x7aa8082f20>,
|
1595
|
+
'github_init': <function github_init at 0x7aa8082fc0>,
|
1596
|
+
'github_pull': <function github_pull at 0x7aa8083060>,
|
1597
|
+
'github_push': <function github_push at 0x7aa80831a0>,
|
1598
|
+
'github_user': <function github_user at 0x7aa8083240>,
|
1599
|
+
'hex_to_int': <function hex_to_int at 0x7aa80832e0>,
|
1600
|
+
'iargv': <function iargv at 0x7aa8083380>,
|
1601
|
+
'idir': <function idir at 0x7aa8083420>,
|
1602
|
+
'idumps_html': <function idumps_html at 0x7aa8083b00>,
|
1603
|
+
'idumps': <function idumps at 0x7aa8083560>,
|
1604
|
+
'int_to_int': <function int_to_int at 0x7aa7e979c0>,
|
1605
|
+
'ienumerate': <function ienumerate at 0x7aa7e8a020>,
|
1606
|
+
'ienv': <function ienv at 0x7aa7e976a0>,
|
1607
|
+
'iexec': <function iexec at 0x7aa7e97a60>,
|
1608
|
+
'ijoin': <function ijoin at 0x7aa7e97ba0>,
|
1609
|
+
'iloads_html': <function iloads_html at 0x7aa7e97d80>,
|
1610
|
+
'iloads': <function iloads at 0x7aaec9a020>,
|
1611
|
+
'int_to_bin': <function int_to_bin at 0x7aa7e97b00>,
|
1612
|
+
'int_to_hex': <function int_to_hex at 0x7aa7e97ce0>,
|
1613
|
+
'int_to_oct': <function int_to_oct at 0x7aa7e97e20>,
|
1614
|
+
'is_valid_url': <function is_valid_url at 0x7aa7d07ba0>,
|
1615
|
+
'iopen': <function iopen at 0x7aa7eac040>,
|
1616
|
+
'iprint': <function iprint at 0x7aa7d076a0>,
|
1617
|
+
'ireplace': <function ireplace at 0x7aa7d077e0>,
|
1618
|
+
'iscandir': <function iscandir at 0x7aa7dc89a0>,
|
1619
|
+
'isplit': <function isplit at 0x7aa7dc8a40>,
|
1620
|
+
'ivars': <function ivars at 0x7aa7dc8ae0>,
|
1621
|
+
'log': <function log at 0x7aa7dc8b80>,
|
1622
|
+
'oct_to_int': <function oct_to_int at 0x7aa7dc8c20>,
|
1623
|
+
'password_generator': <function password_generator at 0x7aa7dc8cc0>,
|
1624
|
+
'pip_freeze_without_version': <function pip_freeze_without_version at 0x7aa7dc8e00>,
|
1625
|
+
'poetry_publish': <function poetry_publish at 0x7aa7dc8ea0>,
|
1626
|
+
'poetry_update_version': <function poetry_update_version at 0x7aa7dc8fe0>,
|
1627
|
+
'print_dir': <function print_dir at 0x7aa7dc91c0>,
|
1628
|
+
'print_to_last_line': <function print_to_last_line at 0x7aa7dc9260>,
|
1629
|
+
'random_bool': <function random_bool at 0x7aa7dc9300>,
|
1630
|
+
'restart': <function restart at 0x7aa7dc93a0>,
|
1631
|
+
'set_timeout': <function set_timeout at 0x7aa7dc9440>,
|
1632
|
+
'sets_ordered': <function sets_ordered at 0x7aa7dc94e0>,
|
1633
|
+
'sqlite_delete_table': <function sqlite_delete_table at 0x7aa7dc9580>,
|
1634
|
+
'sqlite_get_all_tables': <function sqlite_get_all_tables at 0x7aa7dc9120>,
|
1635
|
+
'sqlite_get_data_table': <function sqlite_get_data_table at 0x7aa7dc9ee0>,
|
1636
|
+
'str_cmp': <function str_cmp at 0x7aa7dc9f80>,
|
1637
|
+
'text_colorize': <function text_colorize at 0x7aa7dca020>},
|
1660
1638
|
'class': {'ComparePerformance': <class 'pypipr.ComparePerformance.ComparePerformance'>,
|
1661
1639
|
'PintUregQuantity': <class 'pint.Quantity'>,
|
1662
1640
|
'RunParallel': <class 'pypipr.RunParallel.RunParallel'>},
|
1663
1641
|
'variable': {'LINUX': True,
|
1664
|
-
'PintUreg': <pint.registry.UnitRegistry object at
|
1642
|
+
'PintUreg': <pint.registry.UnitRegistry object at 0x7aae966e90>,
|
1665
1643
|
'WINDOWS': False},
|
1666
1644
|
'module': {'asyncio': <module 'asyncio' from '/data/data/com.termux/files/usr/lib/python3.11/asyncio/__init__.py'>,
|
1667
1645
|
'colorama': <module 'colorama' from '/data/data/com.termux/files/home/.cache/pypoetry/virtualenvs/pypipr-ZoJyDxLL-py3.11/lib/python3.11/site-packages/colorama/__init__.py'>,
|
@@ -1751,7 +1729,7 @@ print(password_generator())
|
|
1751
1729
|
|
1752
1730
|
Output:
|
1753
1731
|
```py
|
1754
|
-
|
1732
|
+
xYWyp/-J
|
1755
1733
|
```
|
1756
1734
|
|
1757
1735
|
## pip_freeze_without_version
|
@@ -1809,7 +1787,7 @@ Output:
|
|
1809
1787
|
__enter__ : https:/www.google.com
|
1810
1788
|
__fspath__ : https:/www.google.com
|
1811
1789
|
__getstate__ : (None, {'_drv': '', '_root': '', '_parts': ['https:', 'www.google.com'], '_str': 'https:/www.google.com'})
|
1812
|
-
__hash__ :
|
1790
|
+
__hash__ : -7910218794911558268
|
1813
1791
|
__init__ : None
|
1814
1792
|
__init_subclass__ : None
|
1815
1793
|
__module__ : pathlib
|
@@ -1822,8 +1800,8 @@ Output:
|
|
1822
1800
|
_cached_cparts : ['https:', 'www.google.com']
|
1823
1801
|
_cparts : ['https:', 'www.google.com']
|
1824
1802
|
_drv :
|
1825
|
-
_flavour : <pathlib._PosixFlavour object at
|
1826
|
-
_hash :
|
1803
|
+
_flavour : <pathlib._PosixFlavour object at 0x7aae0c53d0>
|
1804
|
+
_hash : -7910218794911558268
|
1827
1805
|
_parts : ['https:', 'www.google.com']
|
1828
1806
|
_root :
|
1829
1807
|
_str : https:/www.google.com
|
@@ -1845,7 +1823,7 @@ Output:
|
|
1845
1823
|
is_reserved : False
|
1846
1824
|
is_socket : False
|
1847
1825
|
is_symlink : False
|
1848
|
-
iterdir : <generator object Path.iterdir at
|
1826
|
+
iterdir : <generator object Path.iterdir at 0x7a9f3eef80>
|
1849
1827
|
joinpath : https:/www.google.com
|
1850
1828
|
name : www.google.com
|
1851
1829
|
parent : https:
|
@@ -1919,7 +1897,7 @@ x.cancel()
|
|
1919
1897
|
|
1920
1898
|
Output:
|
1921
1899
|
```py
|
1922
|
-
<Timer(Thread-2, started
|
1900
|
+
<Timer(Thread-2, started 526638206192)>
|
1923
1901
|
menghentikan timeout 7
|
1924
1902
|
```
|
1925
1903
|
|
@@ -1937,10 +1915,14 @@ print(list(sets_ordered(array)))
|
|
1937
1915
|
|
1938
1916
|
Output:
|
1939
1917
|
```py
|
1940
|
-
<generator object sets_ordered at
|
1918
|
+
<generator object sets_ordered at 0x7a9f4518a0>
|
1941
1919
|
[2, 3, 12, 42, 1, 43, 41, 4, 24, 32]
|
1942
1920
|
```
|
1943
1921
|
|
1922
|
+
## sqlite_delete_table
|
1923
|
+
|
1924
|
+
`sqlite_delete_table(filename, tablename)`
|
1925
|
+
|
1944
1926
|
## sqlite_get_all_tables
|
1945
1927
|
|
1946
1928
|
`sqlite_get_all_tables(filename)`
|
@@ -2015,15 +1997,15 @@ print(ExampleComparePerformance().compare_performance())
|
|
2015
1997
|
|
2016
1998
|
Output:
|
2017
1999
|
```py
|
2018
|
-
{'a': <generator object ExampleComparePerformance.a.<locals>.<genexpr> at
|
2000
|
+
{'a': <generator object ExampleComparePerformance.a.<locals>.<genexpr> at 0x7a9f450a00>,
|
2019
2001
|
'b': (0, 1, 2, 3, 4, 5, 6, 7, 8, 9),
|
2020
2002
|
'c': [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
|
2021
2003
|
'd': [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]}
|
2022
|
-
{'a':
|
2023
|
-
{'a':
|
2024
|
-
{'a':
|
2025
|
-
{'a':
|
2026
|
-
{'a':
|
2004
|
+
{'a': 126, 'b': 127, 'c': 100, 'd': 193}
|
2005
|
+
{'a': 107, 'b': 139, 'c': 100, 'd': 177}
|
2006
|
+
{'a': 104, 'b': 132, 'c': 100, 'd': 161}
|
2007
|
+
{'a': 111, 'b': 129, 'c': 100, 'd': 158}
|
2008
|
+
{'a': 106, 'b': 124, 'c': 100, 'd': 151}
|
2027
2009
|
```
|
2028
2010
|
|
2029
2011
|
## PintUregQuantity
|
@@ -4,7 +4,7 @@ pypipr/PintUreg.py,sha256=_jmHZhUn8AcgFkXvZ6OTsWnjtp-CYcXUJ-dG_QdcARY,222
|
|
4
4
|
pypipr/PintUregQuantity.py,sha256=ErSZKB-GHShi1zKac30XgFdBwAUrxMo80IQzIjQ2HVc,118
|
5
5
|
pypipr/RunParallel.py,sha256=3H6sVSeUSATQQsWBcDGTtaXuc-12Yc0XmDyVtsg3PMA,5992
|
6
6
|
pypipr/WINDOWS.py,sha256=NMW-94lzdqwfEWv2lF_i2GcSHJFDwWjccFufpymg4-E,83
|
7
|
-
pypipr/__init__.py,sha256=
|
7
|
+
pypipr/__init__.py,sha256=1nNg1v7zpWRkRbCHT3cilIXIWC6wBtzonzuTQtSsM3Y,3295
|
8
8
|
pypipr/__terminal__.py,sha256=N_NEXa0V5QLb-dkP1Vp_fYKNjE4jGTqkiYNwPPOXZtw,1412
|
9
9
|
pypipr/auto_reload.py,sha256=FGchFBjQs_eT7CmOMLNYoch-17q7ySFOnPx5z1kbH3E,918
|
10
10
|
pypipr/avg.py,sha256=wUtX3x8dgLoODhQLyMB-HRMVo8Ha2yz3cp7lgcUNbr0,218
|
@@ -14,7 +14,6 @@ pypipr/batchmaker.py,sha256=y0D-fU0oCJsdffwZZyJMC0iLPjjiv-_43a7hLrChJDM,1110
|
|
14
14
|
pypipr/bin_to_int.py,sha256=9s935sdD-CC1d7WCsNO3dd8nqTfC8lpkxHB1zQ--mZc,191
|
15
15
|
pypipr/calculate.py,sha256=uSmDH43_x4ifdHN23PLdWKqjx023--1ZE6mf5A2hqg4,696
|
16
16
|
pypipr/choices.py,sha256=qhRdquHqPWUKVdYwi7KDDf1_CYJi9i5E52hs2mMxCWs,1473
|
17
|
-
pypipr/choices.py.bak,sha256=hjVToqAIeMoMfL3kJxOERAicEVsQyUGwzbnorhLdMA4,1664
|
18
17
|
pypipr/chr_to_int.py,sha256=5ETJZag1eM8wa2ceIGsmNP-jNufC5bCScghTLcwGEAI,459
|
19
18
|
pypipr/chunk_array.py,sha256=aodjp-daihl-Xd8kPqcpHZICZub7Jx0QBqyoF0bd0dY,385
|
20
19
|
pypipr/console_run.py,sha256=vCJqDa1rExisqaFLNeWM-hnuXHfUfiYcyNAOJjldOHs,525
|
@@ -74,12 +73,13 @@ pypipr/random_bool.py,sha256=OkvQqpusHGc5mt2nHCycA7-s2I0gbN6UxI7opMOFppE,352
|
|
74
73
|
pypipr/restart.py,sha256=jUhsjZACAAcItYzCuiULHLFikoVyYDJWj16hCLARmAw,272
|
75
74
|
pypipr/set_timeout.py,sha256=heg1J3jSArgG5_75BNLrujjh7I9meTyAzHpuAY_4IBc,698
|
76
75
|
pypipr/sets_ordered.py,sha256=ve2Nc1eNYD_7QaTf_4otEAvzL1XpZP2MjX0KHSXF5nA,325
|
77
|
-
pypipr/
|
78
|
-
pypipr/
|
76
|
+
pypipr/sqlite_delete_table.py,sha256=d1bmJTz8LL-dkfmp5Y3wQD465ZE-IYtuY4sKDpBJQeU,208
|
77
|
+
pypipr/sqlite_get_all_tables.py,sha256=XDayAj8GzmLEju7WUzfpZmBe0MlfXRRXLrRSw_v56TE,259
|
78
|
+
pypipr/sqlite_get_data_table.py,sha256=i50bBcRVcCaEGyVPbKwu1mtQUOlufSdbXSllKp_gQuU,228
|
79
79
|
pypipr/str_cmp.py,sha256=2kavWiT4VTddXcBotF1CxDOWSygk5rFrbllKxBjw9dc,377
|
80
80
|
pypipr/text_colorize.py,sha256=IVjaCnXBSBu4Rh8pTO3CxDvxpA265HVwyKX_-PRXCcI,396
|
81
81
|
pypipr/to_str.py,sha256=vSuspf-ZQldf4enkssa9XH0WMjkmWug51G9ia0K5occ,597
|
82
|
-
pypipr-1.0.
|
83
|
-
pypipr-1.0.
|
84
|
-
pypipr-1.0.
|
85
|
-
pypipr-1.0.
|
82
|
+
pypipr-1.0.138.dist-info/METADATA,sha256=K4rNE3Fc2WKqTq_Yx23bJlMScS6jPWLJOmeiZycSixk,54840
|
83
|
+
pypipr-1.0.138.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
84
|
+
pypipr-1.0.138.dist-info/entry_points.txt,sha256=XEBtOa61BCVW4cVvoqYQnyTcenJ1tzFFB09YnuqlKBY,51
|
85
|
+
pypipr-1.0.138.dist-info/RECORD,,
|
pypipr/choices.py.bak
DELETED
@@ -1,64 +0,0 @@
|
|
1
|
-
from .is_iterable import is_iterable
|
2
|
-
from .WINDOWS import WINDOWS
|
3
|
-
from .print_to_last_line import print_to_last_line
|
4
|
-
from .text_colorize import text_colorize
|
5
|
-
|
6
|
-
|
7
|
-
def choices(iterator, title=None, prompt="", default=None):
|
8
|
-
"""
|
9
|
-
Memudahkan dalam membuat pilihan untuk user dalam tampilan console
|
10
|
-
|
11
|
-
```py
|
12
|
-
a = choices("ini hanya satu pilihan")
|
13
|
-
b = choices(
|
14
|
-
{
|
15
|
-
"sedan": "audi",
|
16
|
-
"suv": "volvo",
|
17
|
-
"truck": "tesla",
|
18
|
-
},
|
19
|
-
title="Car Model",
|
20
|
-
prompt="Pilih Mobil : ",
|
21
|
-
)
|
22
|
-
c = choices(
|
23
|
-
iscandir(recursive=False),
|
24
|
-
title="List File dan Folder",
|
25
|
-
prompt="Pilih File atau Folder : ",
|
26
|
-
)
|
27
|
-
```
|
28
|
-
"""
|
29
|
-
|
30
|
-
def build_iterator(iterator):
|
31
|
-
if not is_iterable(iterator):
|
32
|
-
iterator = [iterator]
|
33
|
-
if not isinstance(iterator, dict):
|
34
|
-
iterator = dict(enumerate(iterator))
|
35
|
-
return iterator
|
36
|
-
|
37
|
-
def print_choices(dictionary, title=None):
|
38
|
-
if title:
|
39
|
-
print(title)
|
40
|
-
for k, v in dictionary.items():
|
41
|
-
print(f"[{k}] {v}")
|
42
|
-
|
43
|
-
def input_choices(prompt):
|
44
|
-
i = input(prompt)
|
45
|
-
if WINDOWS:
|
46
|
-
i = i.decode()
|
47
|
-
if i.isdigit():
|
48
|
-
i = int(i)
|
49
|
-
return i
|
50
|
-
|
51
|
-
def return_choices(iterator, key, on_error):
|
52
|
-
try:
|
53
|
-
result = iterator[key]
|
54
|
-
except Exception:
|
55
|
-
result = on_error
|
56
|
-
return result
|
57
|
-
|
58
|
-
d = build_iterator(iterator)
|
59
|
-
print_choices(d, title)
|
60
|
-
key = input_choices(prompt)
|
61
|
-
result = return_choices(d, key, default)
|
62
|
-
r = text_colorize(result)
|
63
|
-
print_to_last_line(f"{prompt}{key} [{r}]")
|
64
|
-
return result
|
File without changes
|
File without changes
|