pypipr 1.0.135__py3-none-any.whl → 1.0.137__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 CHANGED
@@ -71,6 +71,9 @@ 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
75
+ from .sqlite_get_all_tables import sqlite_get_all_tables
76
+ from .sqlite_get_data_table import sqlite_get_data_table
74
77
  from .str_cmp import str_cmp
75
78
  from .text_colorize import text_colorize
76
79
  from .to_str import to_str
@@ -104,4 +107,4 @@ import tzdata
104
107
  import uuid
105
108
  import webbrowser
106
109
  import yaml
107
- import zoneinfo
110
+ import zoneinfo
@@ -0,0 +1,8 @@
1
+ import sqlite3
2
+
3
+
4
+ def sqlite_delete_table(filename, tablename):
5
+ conn = sqlite3.connect(filename)
6
+ conn.execute(f"DROP TABLE IF EXISTS {tablename}")
7
+ conn.commit()
8
+ conn.close()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pypipr
3
- Version: 1.0.135
3
+ Version: 1.0.137
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 0x7dfcdd7340>
252
- <generator object int_range at 0x7dfcdd7340>
251
+ <generator object int_range at 0x71d2337740>
252
+ <generator object int_range at 0x71d2337740>
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 0x7dfce19240>
284
+ <generator object batchmaker at 0x71d23b9480>
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 0x7dfce15f30>
338
+ <generator object batch_calculate at 0x71d23c2110>
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 0x7dfcdd7440>
444
+ <generator object chunk_array at 0x71d2337840>
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-15 23:06:17.824274+07:00
496
- 2024-05-15 16:06:17.825006+00:00
497
- 2024-05-15 09:06:17.826408-07:00
495
+ 2024-05-16 04:44:38.058230+07:00
496
+ 2024-05-15 21:44:38.059595+00:00
497
+ 2024-05-15 14:44:38.066705-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 0x7dfce15c60>
603
+ <generator object filter_empty at 0x71d23c1e40>
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 0x7dfce16200>
651
- [<function ExampleGetClassMethod.a at 0x7dfce56480>, <function ExampleGetClassMethod.b at 0x7dfce56520>, <function ExampleGetClassMethod.c at 0x7dfce56660>, <function ExampleGetClassMethod.d at 0x7dfce56700>]
650
+ <generator object get_class_method at 0x71d23c23e0>
651
+ [<function ExampleGetClassMethod.a at 0x71d23fee80>, <function ExampleGetClassMethod.b at 0x71d23fef20>, <function ExampleGetClassMethod.c at 0x71d23fcea0>, <function ExampleGetClassMethod.d at 0x71d23ff100>]
652
652
  ```
653
653
 
654
654
  ## get_filesize
@@ -854,6 +854,9 @@ Output:
854
854
  'restart',
855
855
  'set_timeout',
856
856
  'sets_ordered',
857
+ 'sqlite_delete_table',
858
+ 'sqlite_get_all_tables',
859
+ 'sqlite_get_data_table',
857
860
  'str_cmp',
858
861
  'string',
859
862
  'subprocess',
@@ -1058,7 +1061,7 @@ Output:
1058
1061
 
1059
1062
  ## ienumerate
1060
1063
 
1061
- `ienumerate(iterator, start=0, key=<function int_to_int at 0x7e0473f9c0>)`
1064
+ `ienumerate(iterator, start=0, key=<function int_to_int at 0x71db4ab9c0>)`
1062
1065
 
1063
1066
  meningkatkan fungsi enumerate() pada python
1064
1067
  untuk key menggunakan huruf dan basis angka lainnya.
@@ -1071,7 +1074,7 @@ iprint(ienumerate(it, key=int_to_chr))
1071
1074
 
1072
1075
  Output:
1073
1076
  ```py
1074
- <generator object ienumerate at 0x7dfce162f0>
1077
+ <generator object ienumerate at 0x71d23c24d0>
1075
1078
  [('a', 'ini'), ('b', 'contoh'), ('c', 'enumerator')]
1076
1079
  ```
1077
1080
 
@@ -1138,7 +1141,7 @@ print(ijoin(10, ' '))
1138
1141
 
1139
1142
  Output:
1140
1143
  ```py
1141
- dfs, qweqw, weq, asd
1144
+ asd, qweqw, weq, dfs
1142
1145
  ,ini,path,seperti,url,
1143
1146
  ini,path,seperti,url
1144
1147
  <li>satu</li>
@@ -1183,10 +1186,10 @@ pprint.pprint(iloads_html(iopen("https://harga-emas.org/1-gram/")), depth=10)
1183
1186
  Output:
1184
1187
  ```py
1185
1188
  (['Home', 'Emas 1 Gram', 'History', 'Trend', 'Perak 1 Gram', 'Pluang'],
1186
- [['Harga Emas Hari Ini - Rabu, 15 Mei 2024'],
1187
- ['Spot Emas USD↑2.378,85 (+24,23) / oz',
1188
- 'Kurs IDR↑16.131,00 (+46,00) / USD',
1189
- 'Emas IDR↑1.233.728 (+16.049) / gr'],
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'],
1190
1193
  ['LM Antam (Jual)↑1.332.000 (+8.000) / gr',
1191
1194
  'LM Antam (Beli)↑1.223.000 (+8.000) / gr']],
1192
1195
  [['Harga Emas Hari Ini'],
@@ -1257,44 +1260,20 @@ Output:
1257
1260
  'Update harga LM Pegadaian :31 Agustus 2023']],
1258
1261
  [['Spot Harga Emas Hari Ini (Market Open)'],
1259
1262
  ['Satuan', 'USD', 'Kurs\xa0Dollar', 'IDR'],
1260
- ['Ounce\xa0(oz)', '2.378,85 (+24,23)', '16.131,00 (+46,00)', '38.373.229'],
1261
- ['Gram\xa0(gr)', '76,48', '16.131,00', '1.233.728 (+16.049)'],
1262
- ['Kilogram\xa0(kg)', '76.481,80', '16.131,00', '1.233.727.973'],
1263
- ['Update harga emas :15 Mei 2024, pukul 23:06Update kurs :15 Mei 2024, pukul '
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:44Update kurs :15 Mei 2024, pukul '
1264
1267
  '13:10']],
1265
1268
  [['Gram', 'UBS Gold 99.99%'],
1266
1269
  ['Jual', 'Beli'],
1267
1270
  ['/ Batang', '/ Gram', '/ Batang', '/ Gram'],
1268
- ['100',
1269
- '127.412.000 (+1.112.000)',
1270
- '1.274.120 (+11.120)',
1271
- '125.185.000 (+400.000)',
1272
- '1.251.850 (+4.000)'],
1273
- ['50',
1274
- '63.600.000 (+350.000)',
1275
- '1.272.000 (+7.000)',
1276
- '62.645.000 (+200.000)',
1277
- '1.252.900 (+4.000)'],
1278
- ['25',
1279
- '31.850.000 (+175.000)',
1280
- '1.274.000 (+7.000)',
1281
- '31.425.000 (+100.000)',
1282
- '1.257.000 (+4.000)'],
1283
- ['10',
1284
- '12.790.000 (+80.000)',
1285
- '1.279.000 (+8.000)',
1286
- '12.620.000 (+40.000)',
1287
- '1.262.000 (+4.000)'],
1288
- ['5',
1289
- '6.420.000 (+40.000)',
1290
- '1.284.000 (+8.000)',
1291
- '6.362.000 (+20.000)',
1292
- '1.272.400 (+4.000)'],
1293
- ['1',
1294
- '1.330.000 (+6.000)',
1295
- '1.330.000 (+6.000)',
1296
- '1.305.000 (+4.000)',
1297
- '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'],
1298
1277
  ['', 'Update :15 Mei 2024, pukul 12:24']],
1299
1278
  [['Konversi Satuan'],
1300
1279
  ['Satuan', 'Ounce (oz)', 'Gram (gr)', 'Kilogram (kg)'],
@@ -1305,37 +1284,37 @@ Output:
1305
1284
  ['Waktu', 'Emas'],
1306
1285
  ['Unit', 'USD', 'IDR'],
1307
1286
  ['Angka', '+/-', 'Angka', '+/-'],
1308
- ['Hari Ini', 'Kurs', '', '', '16.085', '+46+0,29%'],
1309
- ['oz', '2.354,62', '+24,23+1,03%', '37.874.063', '+499.167+1,32%'],
1310
- ['gr', '75,70', '+0,78+1,03%', '1.217.679', '+16.049+1,32%'],
1311
- ['30 Hari', 'Kurs', '', '', '15.907', '+224+1,41%'],
1312
- ['oz', '2.359,26', '+19,59+0,83%', '37.528.749', '+844.481+2,25%'],
1313
- ['gr', '75,85', '+0,63+0,83%', '1.206.577', '+27.151+2,25%'],
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%'],
1314
1293
  ['2 Bulan', 'Kurs', '', '', '15.582', '+549+3,52%'],
1315
- ['oz', '2.156,08', '+222,77+10,33%', '33.596.039', '+4.777.191+14,22%'],
1316
- ['gr', '69,32', '+7,16+10,33', '1.080.138', '+153.590+14,22%'],
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%'],
1317
1296
  ['6 Bulan', 'Kurs', '', '', '15.595', '+536+3,44%'],
1318
- ['oz', '1.981,17', '+397,68+20,07%', '30.896.346', '+7.476.883+24,20%'],
1319
- ['gr', '63,70', '+12,79+20,07%', '993.341', '+240.387+24,20%'],
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%'],
1320
1299
  ['1 Tahun', 'Kurs', '', '', '15.731', '+400+2,54%'],
1321
- ['oz', '1.823,86', '+554,99+30,43%', '28.691.142', '+9.682.088+33,75%'],
1322
- ['gr', '58,64', '+17,84+30,43%', '922.442', '+311.286+33,75%'],
1323
- ['2 Tahun', 'Kurs', '', '', '14.585', '+1.546+10,60%'],
1324
- ['oz', '1.816,04', '+562,81+30,99%', '26.486.962', '+11.886.268+44,88%'],
1325
- ['gr', '58,39', '+18,09+30,99%', '851.576', '+382.152+44,88%'],
1326
- ['3 Tahun', 'Kurs', '', '', '14.198', '+1.933+13,61%'],
1327
- ['oz', '1.843,91', '+534,94+29,01%', '26.179.834', '+12.193.395+46,58%'],
1328
- ['gr', '59,28', '+17,20+29,01%', '841.701', '+392.027+46,58%'],
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%'],
1329
1308
  ['5 Tahun', 'Kurs', '', '', '14.469', '+1.662+11,49%'],
1330
- ['oz', '1.275,87', '+1.102,98+86,45%', '18.460.563', '+19.912.666+107,87%'],
1331
- ['gr', '41,02', '+35,46+86,45%', '593.521', '+640.207+107,87%']])
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%']])
1332
1311
  (['Home', 'Emas 1 Gram', 'History', 'Trend', 'Perak 1 Gram', 'Pluang'],
1333
1312
  [[''],
1334
1313
  ['Emas 24 KaratHarga Emas 1 Gram', ''],
1335
- ['USD', '76,48↑', '+0,78+1,03%'],
1336
- ['KURS', '15.952,00↓', '-151,05-0,94%'],
1337
- ['IDR', '1.220.037,73↑', '+991,90+0,08%'],
1338
- ['Rabu, 15 Mei 2024 23:06']],
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:44']],
1339
1318
  [[''],
1340
1319
  ['Emas 1 Gram (IDR)Emas 1 Gram (USD)Kurs USD-IDR',
1341
1320
  'Hari Ini',
@@ -1346,19 +1325,19 @@ Output:
1346
1325
  '']],
1347
1326
  [['Pergerakkan Harga Emas 1 Gram'],
1348
1327
  ['', 'Penutupan Kemarin', 'Pergerakkan Hari Ini', 'Rata-rata'],
1349
- ['USD', '75,70', '75,70 - 76,48', '76,09'],
1350
- ['KURS', '16.103,05', '15.952,00 - 16.103,05', '16.027,53'],
1351
- ['IDR', '1.219.045,83', '1.219.045,83 - 1.220.037,73', '1.219.541,78'],
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'],
1352
1331
  [''],
1353
1332
  ['', 'Awal Tahun', 'Pergerakkan YTD', '+/- YTD'],
1354
- ['USD', '66,32', '64,07 - 77,14', '+10,16 (15,32%)'],
1355
- ['KURS', '15.390,10', '15.390,00 - 16.307,80', '+561,90 (3,65%)'],
1356
- ['IDR', '1.020.729,53', '997.660,12 - 1.256.829,06', '+199.308,20 (19,53%)'],
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%)'],
1357
1336
  [''],
1358
1337
  ['', 'Tahun Lalu / 52 Minggu', 'Pergerakkan 52 Minggu', '+/- 52 Minggu'],
1359
- ['USD', '64,66', '58,43 - 77,14', '+11,82 (18,28%)'],
1360
- ['KURS', '14.844,45', '14.796,95 - 16.307,80', '+1.107,55 (7,46%)'],
1361
- ['IDR', '959.794,03', '912.925,68 - 1.256.829,06', '+260.243,70 (27,11%)']])
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%)']])
1362
1341
  ```
1363
1342
 
1364
1343
  ## iloads
@@ -1488,7 +1467,7 @@ Output:
1488
1467
  ```py
1489
1468
  8
1490
1469
  ['mana', 'aja']
1491
- [<Element a at 0x7dfce538e0>, <Element a at 0x7dfccab700>, <Element a at 0x7dfccab7a0>, <Element a at 0x7dfccab7f0>, <Element a at 0x7dfccab840>, <Element a at 0x7dfccab890>, <Element a at 0x7dfccab8e0>, <Element a at 0x7dfccab930>, <Element a at 0x7dfccab980>, <Element a at 0x7dfccab9d0>, <Element a at 0x7dfccaba20>, <Element a at 0x7dfccaba70>, <Element a at 0x7dfccabac0>, <Element a at 0x7dfccabb10>, <Element a at 0x7dfccabb60>, <Element a at 0x7dfccabbb0>, <Element a at 0x7dfccabc00>, <Element a at 0x7dfccabc50>]
1470
+ [<Element a at 0x71d240e9e0>, <Element a at 0x71d22586e0>, <Element a at 0x71d2258780>, <Element a at 0x71d22587d0>, <Element a at 0x71d2258820>, <Element a at 0x71d2258870>, <Element a at 0x71d22588c0>, <Element a at 0x71d2258910>, <Element a at 0x71d2258960>, <Element a at 0x71d22589b0>, <Element a at 0x71d2258a00>, <Element a at 0x71d2258a50>, <Element a at 0x71d2258aa0>, <Element a at 0x71d2258af0>, <Element a at 0x71d2258b40>, <Element a at 0x71d2258b90>, <Element a at 0x71d2258be0>, <Element a at 0x71d2258c30>]
1492
1471
  False
1493
1472
  ```
1494
1473
 
@@ -1550,7 +1529,7 @@ print(list(iscandir("./", recursive=False, scan_file=False)))
1550
1529
 
1551
1530
  Output:
1552
1531
  ```py
1553
- <generator object iscandir at 0x7dfcdd7640>
1532
+ <generator object iscandir at 0x71d2337940>
1554
1533
  [PosixPath('.git'), PosixPath('.vscode'), PosixPath('pypipr'), PosixPath('__pycache__'), PosixPath('dist')]
1555
1534
  ```
1556
1535
 
@@ -1583,81 +1562,84 @@ iprint(ivars(__import__('pypipr')))
1583
1562
 
1584
1563
  Output:
1585
1564
  ```py
1586
- {'function': {'avg': <function avg at 0x7e091cc040>,
1587
- 'get_filemtime': <function get_filemtime at 0x7e04967060>,
1588
- 'print_colorize': <function print_colorize at 0x7e04967240>,
1589
- 'print_log': <function print_log at 0x7e04967100>,
1590
- 'console_run': <function console_run at 0x7e049671a0>,
1591
- 'auto_reload': <function auto_reload at 0x7e05328f40>,
1592
- 'basename': <function basename at 0x7e04902980>,
1593
- 'chr_to_int': <function chr_to_int at 0x7e049677e0>,
1594
- 'int_to_chr': <function int_to_chr at 0x7e04967880>,
1595
- 'irange': <function irange at 0x7e04967b00>,
1596
- 'batchmaker': <function batchmaker at 0x7e049674c0>,
1597
- 'calculate': <function calculate at 0x7e04967600>,
1598
- 'batch_calculate': <function batch_calculate at 0x7e04967380>,
1599
- 'bin_to_int': <function bin_to_int at 0x7e05328ea0>,
1600
- 'is_empty': <function is_empty at 0x7e049742c0>,
1601
- 'exit_if_empty': <function exit_if_empty at 0x7e04974180>,
1602
- 'input_char': <function input_char at 0x7e04974220>,
1603
- 'choices': <function choices at 0x7e04974540>,
1604
- 'chunk_array': <function chunk_array at 0x7e049745e0>,
1605
- 'create_folder': <function create_folder at 0x7e04974680>,
1606
- 'datetime_from_string': <function datetime_from_string at 0x7e04974720>,
1607
- 'datetime_now': <function datetime_now at 0x7e049740e0>,
1608
- 'dict_first': <function dict_first at 0x7e04976a20>,
1609
- 'dirname': <function dirname at 0x7e04976ac0>,
1610
- 'is_iterable': <function is_iterable at 0x7e04976ca0>,
1611
- 'to_str': <function to_str at 0x7e04976d40>,
1612
- 'filter_empty': <function filter_empty at 0x7e049672e0>,
1613
- 'get_by_index': <function get_by_index at 0x7e04976b60>,
1614
- 'get_class_method': <function get_class_method at 0x7e04976de0>,
1615
- 'get_filesize': <function get_filesize at 0x7e04976f20>,
1616
- 'github_init': <function github_init at 0x7e04976fc0>,
1617
- 'github_pull': <function github_pull at 0x7e04977060>,
1618
- 'github_push': <function github_push at 0x7e049771a0>,
1619
- 'github_user': <function github_user at 0x7e04977240>,
1620
- 'hex_to_int': <function hex_to_int at 0x7e049772e0>,
1621
- 'iargv': <function iargv at 0x7e04977380>,
1622
- 'idir': <function idir at 0x7e04977420>,
1623
- 'idumps_html': <function idumps_html at 0x7e04977b00>,
1624
- 'idumps': <function idumps at 0x7e04977560>,
1625
- 'int_to_int': <function int_to_int at 0x7e0473f9c0>,
1626
- 'ienumerate': <function ienumerate at 0x7e04732020>,
1627
- 'ienv': <function ienv at 0x7e0473f6a0>,
1628
- 'iexec': <function iexec at 0x7e0473fa60>,
1629
- 'ijoin': <function ijoin at 0x7e0473fba0>,
1630
- 'iloads_html': <function iloads_html at 0x7e0473fd80>,
1631
- 'iloads': <function iloads at 0x7e09b6a020>,
1632
- 'int_to_bin': <function int_to_bin at 0x7e0473fb00>,
1633
- 'int_to_hex': <function int_to_hex at 0x7e0473fce0>,
1634
- 'int_to_oct': <function int_to_oct at 0x7e0473fe20>,
1635
- 'is_valid_url': <function is_valid_url at 0x7e045cbba0>,
1636
- 'iopen': <function iopen at 0x7e04754040>,
1637
- 'iprint': <function iprint at 0x7e045cb6a0>,
1638
- 'ireplace': <function ireplace at 0x7e045cb7e0>,
1639
- 'iscandir': <function iscandir at 0x7e0468c9a0>,
1640
- 'isplit': <function isplit at 0x7e0468ca40>,
1641
- 'ivars': <function ivars at 0x7e0468cae0>,
1642
- 'log': <function log at 0x7e0468cb80>,
1643
- 'oct_to_int': <function oct_to_int at 0x7e0468cc20>,
1644
- 'password_generator': <function password_generator at 0x7e0468ccc0>,
1645
- 'pip_freeze_without_version': <function pip_freeze_without_version at 0x7e0468ce00>,
1646
- 'poetry_publish': <function poetry_publish at 0x7e0468cea0>,
1647
- 'poetry_update_version': <function poetry_update_version at 0x7e0468cfe0>,
1648
- 'print_dir': <function print_dir at 0x7e0468d1c0>,
1649
- 'print_to_last_line': <function print_to_last_line at 0x7e0468d260>,
1650
- 'random_bool': <function random_bool at 0x7e0468d300>,
1651
- 'restart': <function restart at 0x7e0468d3a0>,
1652
- 'set_timeout': <function set_timeout at 0x7e0468d440>,
1653
- 'sets_ordered': <function sets_ordered at 0x7e0468d4e0>,
1654
- 'str_cmp': <function str_cmp at 0x7e0468d580>,
1655
- 'text_colorize': <function text_colorize at 0x7e0468d620>},
1565
+ {'function': {'avg': <function avg at 0x71e05e0040>,
1566
+ 'get_filemtime': <function get_filemtime at 0x71db693060>,
1567
+ 'print_colorize': <function print_colorize at 0x71db693240>,
1568
+ 'print_log': <function print_log at 0x71db693100>,
1569
+ 'console_run': <function console_run at 0x71db6931a0>,
1570
+ 'auto_reload': <function auto_reload at 0x71dbe58f40>,
1571
+ 'basename': <function basename at 0x71db62e980>,
1572
+ 'chr_to_int': <function chr_to_int at 0x71db6937e0>,
1573
+ 'int_to_chr': <function int_to_chr at 0x71db693880>,
1574
+ 'irange': <function irange at 0x71db693b00>,
1575
+ 'batchmaker': <function batchmaker at 0x71db6934c0>,
1576
+ 'calculate': <function calculate at 0x71db693600>,
1577
+ 'batch_calculate': <function batch_calculate at 0x71db693380>,
1578
+ 'bin_to_int': <function bin_to_int at 0x71dbe58ea0>,
1579
+ 'is_empty': <function is_empty at 0x71db6a02c0>,
1580
+ 'exit_if_empty': <function exit_if_empty at 0x71db6a0180>,
1581
+ 'input_char': <function input_char at 0x71db6a0220>,
1582
+ 'choices': <function choices at 0x71db6a0540>,
1583
+ 'chunk_array': <function chunk_array at 0x71db6a05e0>,
1584
+ 'create_folder': <function create_folder at 0x71db6a0680>,
1585
+ 'datetime_from_string': <function datetime_from_string at 0x71db6a0720>,
1586
+ 'datetime_now': <function datetime_now at 0x71db6a00e0>,
1587
+ 'dict_first': <function dict_first at 0x71db6a2a20>,
1588
+ 'dirname': <function dirname at 0x71db6a2ac0>,
1589
+ 'is_iterable': <function is_iterable at 0x71db6a2ca0>,
1590
+ 'to_str': <function to_str at 0x71db6a2d40>,
1591
+ 'filter_empty': <function filter_empty at 0x71db6932e0>,
1592
+ 'get_by_index': <function get_by_index at 0x71db6a2b60>,
1593
+ 'get_class_method': <function get_class_method at 0x71db6a2de0>,
1594
+ 'get_filesize': <function get_filesize at 0x71db6a2f20>,
1595
+ 'github_init': <function github_init at 0x71db6a2fc0>,
1596
+ 'github_pull': <function github_pull at 0x71db6a3060>,
1597
+ 'github_push': <function github_push at 0x71db6a31a0>,
1598
+ 'github_user': <function github_user at 0x71db6a3240>,
1599
+ 'hex_to_int': <function hex_to_int at 0x71db6a32e0>,
1600
+ 'iargv': <function iargv at 0x71db6a3380>,
1601
+ 'idir': <function idir at 0x71db6a3420>,
1602
+ 'idumps_html': <function idumps_html at 0x71db6a3b00>,
1603
+ 'idumps': <function idumps at 0x71db6a3560>,
1604
+ 'int_to_int': <function int_to_int at 0x71db4ab9c0>,
1605
+ 'ienumerate': <function ienumerate at 0x71db49e020>,
1606
+ 'ienv': <function ienv at 0x71db4ab6a0>,
1607
+ 'iexec': <function iexec at 0x71db4aba60>,
1608
+ 'ijoin': <function ijoin at 0x71db4abba0>,
1609
+ 'iloads_html': <function iloads_html at 0x71db4abd80>,
1610
+ 'iloads': <function iloads at 0x71e0f72020>,
1611
+ 'int_to_bin': <function int_to_bin at 0x71db4abb00>,
1612
+ 'int_to_hex': <function int_to_hex at 0x71db4abce0>,
1613
+ 'int_to_oct': <function int_to_oct at 0x71db4abe20>,
1614
+ 'is_valid_url': <function is_valid_url at 0x71db2ebba0>,
1615
+ 'iopen': <function iopen at 0x71db4b8040>,
1616
+ 'iprint': <function iprint at 0x71db2eb6a0>,
1617
+ 'ireplace': <function ireplace at 0x71db2eb7e0>,
1618
+ 'iscandir': <function iscandir at 0x71db3a89a0>,
1619
+ 'isplit': <function isplit at 0x71db3a8a40>,
1620
+ 'ivars': <function ivars at 0x71db3a8ae0>,
1621
+ 'log': <function log at 0x71db3a8b80>,
1622
+ 'oct_to_int': <function oct_to_int at 0x71db3a8c20>,
1623
+ 'password_generator': <function password_generator at 0x71db3a8cc0>,
1624
+ 'pip_freeze_without_version': <function pip_freeze_without_version at 0x71db3a8e00>,
1625
+ 'poetry_publish': <function poetry_publish at 0x71db3a8ea0>,
1626
+ 'poetry_update_version': <function poetry_update_version at 0x71db3a8fe0>,
1627
+ 'print_dir': <function print_dir at 0x71db3a91c0>,
1628
+ 'print_to_last_line': <function print_to_last_line at 0x71db3a9260>,
1629
+ 'random_bool': <function random_bool at 0x71db3a9300>,
1630
+ 'restart': <function restart at 0x71db3a93a0>,
1631
+ 'set_timeout': <function set_timeout at 0x71db3a9440>,
1632
+ 'sets_ordered': <function sets_ordered at 0x71db3a94e0>,
1633
+ 'sqlite_delete_table': <function sqlite_delete_table at 0x71db3a9620>,
1634
+ 'sqlite_get_all_tables': <function sqlite_get_all_tables at 0x71db3a9120>,
1635
+ 'sqlite_get_data_table': <function sqlite_get_data_table at 0x71db3a9ee0>,
1636
+ 'str_cmp': <function str_cmp at 0x71db3a9f80>,
1637
+ 'text_colorize': <function text_colorize at 0x71db3aa020>},
1656
1638
  'class': {'ComparePerformance': <class 'pypipr.ComparePerformance.ComparePerformance'>,
1657
1639
  'PintUregQuantity': <class 'pint.Quantity'>,
1658
1640
  'RunParallel': <class 'pypipr.RunParallel.RunParallel'>},
1659
1641
  'variable': {'LINUX': True,
1660
- 'PintUreg': <pint.registry.UnitRegistry object at 0x7e091d3490>,
1642
+ 'PintUreg': <pint.registry.UnitRegistry object at 0x71e05eee10>,
1661
1643
  'WINDOWS': False},
1662
1644
  'module': {'asyncio': <module 'asyncio' from '/data/data/com.termux/files/usr/lib/python3.11/asyncio/__init__.py'>,
1663
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'>,
@@ -1747,7 +1729,7 @@ print(password_generator())
1747
1729
 
1748
1730
  Output:
1749
1731
  ```py
1750
- OR)^A<Ax
1732
+ u\=lyMuO
1751
1733
  ```
1752
1734
 
1753
1735
  ## pip_freeze_without_version
@@ -1805,7 +1787,7 @@ Output:
1805
1787
  __enter__ : https:/www.google.com
1806
1788
  __fspath__ : https:/www.google.com
1807
1789
  __getstate__ : (None, {'_drv': '', '_root': '', '_parts': ['https:', 'www.google.com'], '_str': 'https:/www.google.com'})
1808
- __hash__ : 423689897362171039
1790
+ __hash__ : -5917974921579735672
1809
1791
  __init__ : None
1810
1792
  __init_subclass__ : None
1811
1793
  __module__ : pathlib
@@ -1818,8 +1800,8 @@ Output:
1818
1800
  _cached_cparts : ['https:', 'www.google.com']
1819
1801
  _cparts : ['https:', 'www.google.com']
1820
1802
  _drv :
1821
- _flavour : <pathlib._PosixFlavour object at 0x7e08f1d4d0>
1822
- _hash : 423689897362171039
1803
+ _flavour : <pathlib._PosixFlavour object at 0x71e0329490>
1804
+ _hash : -5917974921579735672
1823
1805
  _parts : ['https:', 'www.google.com']
1824
1806
  _root :
1825
1807
  _str : https:/www.google.com
@@ -1841,7 +1823,7 @@ Output:
1841
1823
  is_reserved : False
1842
1824
  is_socket : False
1843
1825
  is_symlink : False
1844
- iterdir : <generator object Path.iterdir at 0x7dfce23d80>
1826
+ iterdir : <generator object Path.iterdir at 0x71d23b6f80>
1845
1827
  joinpath : https:/www.google.com
1846
1828
  name : www.google.com
1847
1829
  parent : https:
@@ -1915,7 +1897,7 @@ x.cancel()
1915
1897
 
1916
1898
  Output:
1917
1899
  ```py
1918
- <Timer(Thread-2, started 541094141168)>
1900
+ <Timer(Thread-2, started 488838880496)>
1919
1901
  menghentikan timeout 7
1920
1902
  ```
1921
1903
 
@@ -1933,10 +1915,22 @@ print(list(sets_ordered(array)))
1933
1915
 
1934
1916
  Output:
1935
1917
  ```py
1936
- <generator object sets_ordered at 0x7dfce6d560>
1918
+ <generator object sets_ordered at 0x71d2405970>
1937
1919
  [2, 3, 12, 42, 1, 43, 41, 4, 24, 32]
1938
1920
  ```
1939
1921
 
1922
+ ## sqlite_delete_table
1923
+
1924
+ `sqlite_delete_table(filename, tablename)`
1925
+
1926
+ ## sqlite_get_all_tables
1927
+
1928
+ `sqlite_get_all_tables(filename)`
1929
+
1930
+ ## sqlite_get_data_table
1931
+
1932
+ `sqlite_get_data_table(filename, tablename)`
1933
+
1940
1934
  ## str_cmp
1941
1935
 
1942
1936
  `str_cmp(t1, t2)`
@@ -2003,15 +1997,15 @@ print(ExampleComparePerformance().compare_performance())
2003
1997
 
2004
1998
  Output:
2005
1999
  ```py
2006
- {'a': <generator object ExampleComparePerformance.a.<locals>.<genexpr> at 0x7dfce6c6c0>,
2000
+ {'a': <generator object ExampleComparePerformance.a.<locals>.<genexpr> at 0x71d2404ad0>,
2007
2001
  'b': (0, 1, 2, 3, 4, 5, 6, 7, 8, 9),
2008
2002
  'c': [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
2009
2003
  'd': [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]}
2010
- {'a': 100, 'b': 124, 'c': 136, 'd': 135}
2011
- {'a': 100, 'b': 120, 'c': 118, 'd': 107}
2012
- {'a': 100, 'b': 121, 'c': 115, 'd': 117}
2013
- {'a': 100, 'b': 114, 'c': 106, 'd': 122}
2014
- {'a': 100, 'b': 118, 'c': 114, 'd': 115}
2004
+ {'a': 168, 'b': 135, 'c': 100, 'd': 150}
2005
+ {'a': 147, 'b': 139, 'c': 100, 'd': 130}
2006
+ {'a': 139, 'b': 136, 'c': 100, 'd': 127}
2007
+ {'a': 120, 'b': 133, 'c': 100, 'd': 130}
2008
+ {'a': 127, 'b': 131, 'c': 100, 'd': 126}
2015
2009
  ```
2016
2010
 
2017
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=bQXwbc9VduUhgoDvApdGiyiozO0tzdcFEeAMK3cC5jI,3129
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
76
+ pypipr/sqlite_delete_table.py,sha256=d-r1Xl4tgFJ2MHSZ4WGj1KvnZ5S8wElpaRcaAAvuTaA,189
77
77
  pypipr/sqlite_get_all_tables.py,sha256=lI_qYIZNWw0JIPGY4S_SnXagMfC-aG-BjweyeR7OW68,271
78
78
  pypipr/sqlite_get_data_table.py,sha256=9mlwy8h-XbIcB42PoDvaU7N14xp1F-3g78OC-NLFTA8,240
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.135.dist-info/METADATA,sha256=SL6ZoQWkscMhaIf5yyzB1CawB1CzxREvRiqXJzoRPBw,54729
83
- pypipr-1.0.135.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
84
- pypipr-1.0.135.dist-info/entry_points.txt,sha256=XEBtOa61BCVW4cVvoqYQnyTcenJ1tzFFB09YnuqlKBY,51
85
- pypipr-1.0.135.dist-info/RECORD,,
82
+ pypipr-1.0.137.dist-info/METADATA,sha256=_uBTYLDf2KUkp_fiV7UmKLFW3U8cC-ISoflaptA7riM,54840
83
+ pypipr-1.0.137.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
84
+ pypipr-1.0.137.dist-info/entry_points.txt,sha256=XEBtOa61BCVW4cVvoqYQnyTcenJ1tzFFB09YnuqlKBY,51
85
+ pypipr-1.0.137.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