mirror of
https://github.com/khoj-ai/khoj.git
synced 2024-11-27 17:35:07 +01:00
649e5d1327
- Move them to utils.helper.py for reuse - Import those modules where required - Delete duplicate methods defined in org_to_jsonl.py, asymmetric.py
9 lines
217 B
Python
9 lines
217 B
Python
import pathlib
|
|
|
|
|
|
def is_none_or_empty(item):
|
|
return item == None or (hasattr(item, '__iter__') and len(item) == 0)
|
|
|
|
|
|
def get_absolute_path(filepath):
|
|
return str(pathlib.Path(filepath).expanduser().absolute())
|