Skip to content

Commit

Permalink
Update gitignore
Browse files Browse the repository at this point in the history
  • Loading branch information
mxbi committed Jan 30, 2018
1 parent 1fb8c1b commit 697ee17
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Manual additions
.idea

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand Down
2 changes: 1 addition & 1 deletion mlcrate/time.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def format_elapsed(self, key, max_fields=3):
"""Get the time elapsed in seconds, nicely formatted by format_duration()"""
return format_duration(self.elapsed(key), max_fields)

def str_time_now():
def now():
"""Returns the current time as a string in the format 'YYYY_MM_DD_HH_MM_SS'. Useful for timestamping filenames etc."""
return time.strftime("%Y_%m_%d_%H_%M_%S")

Expand Down

0 comments on commit 697ee17

Please sign in to comment.