-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Renan Souza
committed
Aug 28, 2020
1 parent
87b92a1
commit a8f1779
Showing
13 changed files
with
685 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
from time import time | ||
from provlake import prov_utils | ||
from provlake.utils import prov_utils | ||
import os | ||
|
||
|
||
|
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
def get_dict(_dict:dict) -> dict: | ||
if _dict is None: | ||
return None | ||
if len(_dict) == 0: | ||
return {} | ||
return { | ||
"type": "dict", | ||
"values": _dict | ||
} | ||
|
||
def get_list(_list:list) -> dict: | ||
if _list is None: | ||
return None | ||
if len(_list) == 0: | ||
return [] | ||
return { | ||
"type": "list", | ||
"values": _list | ||
} | ||
|
||
def get_recursive_dicts(_dict:dict) -> dict: | ||
if _dict is None: | ||
return None | ||
if len(_dict) == 0: | ||
return {} | ||
values = dict() | ||
for k in _dict: | ||
v = _dict[k] | ||
if type(v) == dict: | ||
values[k] = get_recursive_dicts(v) | ||
else: | ||
values[k] = v | ||
return { | ||
"type": "dict", | ||
"values": values | ||
} |
Oops, something went wrong.