thiiiiings
This commit is contained in:
6
utils/Singleton.py
Normal file
6
utils/Singleton.py
Normal file
@@ -0,0 +1,6 @@
|
||||
class Singleton(type):
|
||||
_instances = {}
|
||||
def __call__(cls, *args, **kwargs):
|
||||
if cls not in cls._instances:
|
||||
cls._instances[cls] = super(Singleton, cls).__call__(*args, **kwargs)
|
||||
return cls._instances[cls]
|
||||
BIN
utils/__pycache__/Singleton.cpython-38.pyc
Normal file
BIN
utils/__pycache__/Singleton.cpython-38.pyc
Normal file
Binary file not shown.
BIN
utils/__pycache__/util.cpython-38.pyc
Normal file
BIN
utils/__pycache__/util.cpython-38.pyc
Normal file
Binary file not shown.
5
utils/util.py
Normal file
5
utils/util.py
Normal file
@@ -0,0 +1,5 @@
|
||||
import re
|
||||
|
||||
def normalizeName(name):
|
||||
splitName = re.findall('[A-Z][^A-Z]*', name)
|
||||
return ' '.join(splitName)
|
||||
Reference in New Issue
Block a user