halib 0.1.41__py3-none-any.whl → 0.1.43__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.
halib/__init__.py CHANGED
@@ -28,13 +28,23 @@ __all__ = [
28
28
  "rcolor_str",
29
29
  "rcolor_palette_all"
30
30
  ]
31
+ import warnings
32
+ warnings.filterwarnings("ignore", message="Unable to import Axes3D")
31
33
 
34
+ # common libraries
35
+ import re
36
+ from tqdm import tqdm
37
+ import arrow
32
38
  import numpy as np
33
39
  import pandas as pd
40
+ import os
41
+
42
+ # my own modules
34
43
  from .filetype import *
35
44
  from .filetype.yamlfile import load_yaml
36
45
  from .system import cmd
37
46
  from .system import filesys as fs
47
+ from .filetype import csvfile
38
48
  from .cuda import tcuda
39
49
  from .common import console, console_log, ConsoleLog, now_str, norm_str
40
50
 
@@ -42,14 +52,14 @@ from .common import console, console_log, ConsoleLog, now_str, norm_str
42
52
  from loguru import logger
43
53
  from rich import inspect
44
54
  from rich import print as rprint
45
-
46
55
  from rich.pretty import pprint
47
56
  from timebudget import timebudget
48
- from tqdm import tqdm
49
- import matplotlib.pyplot as plt
50
- import re
51
- import arrow
52
57
  import omegaconf
53
58
  from omegaconf import OmegaConf
54
59
  from omegaconf.dictconfig import DictConfig
55
- from .rich_color import rcolor_str, rcolor_palette, rcolor_palette_all, rcolor_all_str
60
+ from .rich_color import rcolor_str, rcolor_palette, rcolor_palette_all, rcolor_all_str
61
+
62
+ # for visualization
63
+ import seaborn as sns
64
+ import matplotlib.pyplot as plt
65
+ import plotly.express as px
halib/rich_color.py CHANGED
@@ -212,9 +212,31 @@ all_colors = [
212
212
  "grey93",
213
213
  ]
214
214
 
215
+ basic_colors = [
216
+ "black",
217
+ "red",
218
+ "green",
219
+ "yellow",
220
+ "blue",
221
+ "magenta",
222
+ "cyan",
223
+ "white",
224
+ "bright_black",
225
+ "bright_red",
226
+ "bright_green",
227
+ "bright_yellow",
228
+ "bright_blue",
229
+ "bright_magenta",
230
+ "bright_cyan",
231
+ "bright_white",
232
+ ]
233
+
215
234
  def rcolor_all_str():
216
235
  pprint(all_colors)
217
236
 
237
+ def rcolor_basic_str():
238
+ pprint(basic_colors)
239
+
218
240
  def rcolor_str(in_str, color="white"):
219
241
  assert color in all_colors, f"color must be one of {all_colors}"
220
242
  return f"[{color}]{in_str}[/{color}]"
@@ -255,5 +277,9 @@ def rcolor_palette(color_list):
255
277
 
256
278
  # Print the table
257
279
  console.print(table)
280
+
281
+ def rcolor_palette_basic():
282
+ rcolor_palette(basic_colors)
283
+
258
284
  def rcolor_palette_all():
259
285
  rcolor_palette(all_colors)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: halib
3
- Version: 0.1.41
3
+ Version: 0.1.43
4
4
  Summary: Small library for common tasks
5
5
  Author: Hoang Van Ha
6
6
  Author-email: hoangvanhauit@gmail.com
@@ -9,7 +9,7 @@ Platform: UNKNOWN
9
9
  Classifier: Programming Language :: Python :: 3
10
10
  Classifier: License :: OSI Approved :: MIT License
11
11
  Classifier: Operating System :: OS Independent
12
- Requires-Python: >=3.6
12
+ Requires-Python: >=3.8
13
13
  Description-Content-Type: text/markdown
14
14
  License-File: LICENSE.txt
15
15
  Requires-Dist: arrow
@@ -42,6 +42,13 @@ Requires-Dist: tqdm
42
42
  Requires-Dist: tube-dl
43
43
 
44
44
  Helper package for coding and automation
45
+
46
+ **Version 0.1.43**
47
+ + filter the warning message of `UserWarning: Unable to import Axes3D.`
48
+
49
+ **Version 0.1.42**
50
+ + add <rich_color.py>: add basic color list (for easy usage)
51
+
45
52
  **Version 0.1.41**
46
53
  + add <rich_color.py> to display rich color information in <rich> python package (rcolor_str, rcolor_pallet_all, etc.)
47
54
 
@@ -1,4 +1,4 @@
1
- halib/__init__.py,sha256=KrD3NLEgEE3mWparYxAu2iprtv6Al42zaDmECUpa_dE,1176
1
+ halib/__init__.py,sha256=lZ-RFpPrkKy88RqiLd7Nkktat90LfP-NrcgSiibB-kI,1420
2
2
  halib/common.py,sha256=28kBN56Ema1A1pIDF2B8BydepXy799L21o2cc01SANc,2039
3
3
  halib/csvfile.py,sha256=Eoeni0NIbNG3mB5ESWAvNwhJxOjmCaPd1qqYRHImbvk,1567
4
4
  halib/cuda.py,sha256=1bvtBY8QvTWdLaxalzK9wqXPl0Ft3AfhcrebupxGzEA,1010
@@ -11,7 +11,7 @@ halib/jsonfile.py,sha256=9XfdFS1wcTdBRmpAGzVu2dVCcJp8RCpsSY16f6KUNts,480
11
11
  halib/listop.py,sha256=Vpa8_2fI0wySpB2-8sfTBkyi_A4FhoFVVvFiuvW8N64,339
12
12
  halib/plot.py,sha256=4pUJ5GeKQ1LzgiQXbAZlUqSydXSk5tt2_qsw78nSzA4,9445
13
13
  halib/projectmake.py,sha256=8dNTxB2jgQlwvovaOnJcCKgHe5vM0nBwzm46Yc8INEI,4048
14
- halib/rich_color.py,sha256=3048TppVjaJX7P0K3OpJZajH3_wlF6JLFFUKIOeuk3Q,5971
14
+ halib/rich_color.py,sha256=tyK5fl3Dtv1tKsfFzt_5Rco4Fj72QliA-w5aGXaVuqQ,6392
15
15
  halib/tele_noti.py,sha256=xL8f889VFR65uVJTj1NNT3qSi3lJ7s_iDjcObwZ0-V0,5926
16
16
  halib/textfile.py,sha256=EhVFrit-nRBJx18e6rtIqcE1cSbgsLnMXe_kdhi1EPI,399
17
17
  halib/torchloader.py,sha256=-q9YE-AoHZE1xQX2dgNxdqtucEXYs4sQ22WXdl6EGfI,6500
@@ -33,8 +33,8 @@ halib/sys/filesys.py,sha256=ERpnELLDKJoTIIKf-AajgkY62nID4qmqmX5TkE95APU,2931
33
33
  halib/system/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
34
34
  halib/system/cmd.py,sha256=b2x7JPcNnFjLGheIESVYvqAb-w2UwBM1PAwYxMZ5YjA,228
35
35
  halib/system/filesys.py,sha256=ERpnELLDKJoTIIKf-AajgkY62nID4qmqmX5TkE95APU,2931
36
- halib-0.1.41.dist-info/LICENSE.txt,sha256=qZssdna4aETiR8znYsShUjidu-U4jUT9Q-EWNlZ9yBQ,1100
37
- halib-0.1.41.dist-info/METADATA,sha256=c9F-wY1MFnD-88XjO2yCwtljfINAwxJlYrfWvbHzNVw,3483
38
- halib-0.1.41.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
39
- halib-0.1.41.dist-info/top_level.txt,sha256=7AD6PLaQTreE0Fn44mdZsoHBe_Zdd7GUmjsWPyQ7I-k,6
40
- halib-0.1.41.dist-info/RECORD,,
36
+ halib-0.1.43.dist-info/LICENSE.txt,sha256=qZssdna4aETiR8znYsShUjidu-U4jUT9Q-EWNlZ9yBQ,1100
37
+ halib-0.1.43.dist-info/METADATA,sha256=172NSy2ssQ626MJNBCSQQH5DNr8o6dBOpN25NZQK9Vo,3657
38
+ halib-0.1.43.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
39
+ halib-0.1.43.dist-info/top_level.txt,sha256=7AD6PLaQTreE0Fn44mdZsoHBe_Zdd7GUmjsWPyQ7I-k,6
40
+ halib-0.1.43.dist-info/RECORD,,
File without changes