-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
analyze tasks and only use preprocessing tasks intersecting with actu…
…al process_aoi; add MapcheteConfig.overview_levels and MapcheteConfig.processing_levels; clean up dead code
- Loading branch information
Showing
13 changed files
with
173 additions
and
68 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
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,31 @@ | ||
def pretty_bytes(count: float, round_value: int = 2) -> str: | ||
"""Return human readable bytes.""" | ||
for measurement in [ | ||
"bytes", | ||
"KiB", | ||
"MiB", | ||
"GiB", | ||
"TiB", | ||
"PiB", | ||
"EiB", | ||
"ZiB", | ||
"YiB", | ||
]: | ||
out = f"{round(count, round_value)} {measurement}" | ||
if count < 1024.0: | ||
break | ||
count /= 1024.0 | ||
|
||
return out | ||
|
||
|
||
def pretty_seconds(elapsed_seconds: float, round_value: int = 3): | ||
"""Return human readable seconds.""" | ||
minutes, seconds = divmod(elapsed_seconds, 60) | ||
hours, minutes = divmod(minutes, 60) | ||
if hours: | ||
return f"{int(hours)}h {int(minutes)}m {int(seconds)}s" | ||
elif minutes: | ||
return f"{int(minutes)}m {int(seconds)}s" | ||
else: | ||
return f"{round(seconds, round_value)}s" |
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
Oops, something went wrong.