Skip to content

Instantly share code, notes, and snippets.

@seahrh
Created May 12, 2021 01:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save seahrh/4ff74a67beed66bfaceac76e756b57fc to your computer and use it in GitHub Desktop.
Save seahrh/4ff74a67beed66bfaceac76e756b57fc to your computer and use it in GitHub Desktop.
Make timestamped directory
import pathlib
from datetime import datetime
ts = datetime.now().strftime('%Y%m%d_%H%M%S')
job_dir = f"models/mlp/{ts}"
pathlib.Path(job_dir).mkdir(parents=True, exist_ok=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment