Skip to content

Commit

Permalink
0.0.9.6.8
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikeshbajaj committed Aug 22, 2024
1 parent ebce98a commit 0016cc2
Show file tree
Hide file tree
Showing 6 changed files with 76 additions and 5 deletions.
77 changes: 74 additions & 3 deletions spkit/utils.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,55 @@ def print(*args, **kwargs):
# RELATIVE PATH NAMED TO BE CHANGED!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

sys.path.append("..")
from spkit.core.infotheory import entropy
from spkit.core.information_theory import entropy
from spkit.utils_misc.borrowed import resize
#from .core.infotheory import entropy
#from .all_utils.borrowed import resize
import warnings


class txcolors:
HEADER = '\033[95m'
OKBLUE = '\033[94m'
OKCYAN = '\033[96m'
OKGREEN = '\033[92m'
WARNING = '\033[93m'
FAIL = '\033[91m'
CRED = '\033[91m'
ENDC = '\033[0m'
BOLD = '\033[1m'
UNDERLINE = '\033[4m'
BGreen = '\x1b[6;10;42m'
BGrey = '\x1b[6;10;47m'
BRed = '\x1b[6;10;41m'
BYellow = '\x1b[6;10;43m'
BEND = '\x1b[0m'
#--new------------
CBLACK = '\33[30m'
CGREEN = '\33[32m'
CYELLOW = '\33[33m'
CBLUE = '\33[34m'
CVIOLET = '\33[35m'
CBEIGE = '\33[36m'
CWHITE = '\33[37m'
CBLACKBG = '\33[40m'
CREDBG = '\33[41m'
CGREENBG = '\33[42m'
CYELLOWBG = '\33[43m'
CBLUEBG = '\33[44m'
CVIOLETBG = '\33[45m'
CBEIGEBG = '\33[46m'
CWHITEBG = '\33[47m'
CGREY = '\33[90m'
CRED2 = '\33[91m'
CGREEN2 = '\33[92m'
CYELLOW2 = '\33[93m'
CBLUE2 = '\33[94m'
CVIOLET2 = '\33[95m'
CBEIGE2 = '\33[96m'
CWHITE2 = '\33[97m'


class bcolors:
HEADER = '\033[95m'
OKBLUE = '\033[94m'
Expand All @@ -40,6 +83,30 @@ class bcolors:
BRed = '\x1b[6;10;41m'
BYellow = '\x1b[6;10;43m'
BEND = '\x1b[0m'
#--new------------
CBLACK = '\33[30m'
CGREEN = '\33[32m'
CYELLOW = '\33[33m'
CBLUE = '\33[34m'
CVIOLET = '\33[35m'
CBEIGE = '\33[36m'
CWHITE = '\33[37m'
CBLACKBG = '\33[40m'
CREDBG = '\33[41m'
CGREENBG = '\33[42m'
CYELLOWBG = '\33[43m'
CBLUEBG = '\33[44m'
CVIOLETBG = '\33[45m'
CBEIGEBG = '\33[46m'
CWHITEBG = '\33[47m'
CGREY = '\33[90m'
CRED2 = '\33[91m'
CGREEN2 = '\33[92m'
CYELLOW2 = '\33[93m'
CBLUE2 = '\33[94m'
CVIOLET2 = '\33[95m'
CBEIGE2 = '\33[96m'
CWHITE2 = '\33[97m'

A=['\\','-','/','|']

Expand All @@ -48,7 +115,7 @@ def ProgBar_JL(i,N,title='',style=2,L=50,selfTerminate=True,delta=None,sym='▓'
▇ ▓ ▒ ░ ▉
'''
c1 = bcolors.ENDC
if color.lower() in ['green','blue','cyan','red']:
if color.lower() in ['green','blue','cyan','red','yellow']:
if color.lower()=='green':
c1 = bcolors.OKGREEN
elif color.lower()=='blue':
Expand All @@ -57,6 +124,8 @@ def ProgBar_JL(i,N,title='',style=2,L=50,selfTerminate=True,delta=None,sym='▓'
c1 = bcolors.OKCYAN
elif color.lower()=='red':
c1 = bcolors.CRED
elif color.lower()=='yellow':
c1 = bcolors.CYELLOW

c2 = bcolors.ENDC

Expand Down Expand Up @@ -84,7 +153,7 @@ def ProgBar(i,N,title='',style=2,L=50,selfTerminate=False,sym='▓',color='blue'
▇ ▓ ▒ ░ ▉
'''
c1 = bcolors.ENDC
if color.lower() in ['green','blue','cyan','red']:
if color.lower() in ['green','blue','cyan','red','yellow']:
if color.lower()=='green':
c1 = bcolors.OKGREEN
elif color.lower()=='blue':
Expand All @@ -93,6 +162,8 @@ def ProgBar(i,N,title='',style=2,L=50,selfTerminate=False,sym='▓',color='blue'
c1 = bcolors.OKCYAN
elif color.lower()=='red':
c1 = bcolors.CRED
elif color.lower()=='yellow':
c1 = bcolors.CYELLOW

c2 = bcolors.ENDC

Expand Down
Empty file modified spkit/utils_misc/__init__.py
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion spkit/utils_misc/borrowed.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
dtype_range = {bool: (False, True),
np.bool_: (False, True),
float: (-1, 1),
np.float_: (-1, 1),
#np.float_: (-1, 1),
np.float16: (-1, 1),
np.float32: (-1, 1),
np.float64: (-1, 1)}
Expand Down
Empty file modified spkit/utils_misc/io_utils.py
100644 → 100755
Empty file.
Empty file modified spkit/utils_misc/tf_utils.py
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion spkit/utils_misc/utils.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def print(*args, **kwargs):

import numpy as np
from scipy import stats
from ..core.infotheory import entropy
from ..core.information_theory import entropy
import warnings

class bcolors:
Expand Down

0 comments on commit 0016cc2

Please sign in to comment.