image.png

cookiecutter神器

GitHub 地址:https://github.com/drivendata/cookiecutter-data-science

1. 安装

安装 cookiecutter 非常简单,一个 pip 就可以轻松搞定。

  1. pip install cookiecutter

2. 创建项目

在终端中输入以下命令,根据提示输入你想要的内容即可,完成之后即可得到类似上面脑图的目录结构了😜。

  1. cookiecutter https://github.com/drivendata/cookiecutter-data-science
  2. project_name [project_name]: xxx
  3. repo_name [xxx]:
  4. author_name [Your name (or your organization/company/team)]: yumingmin
  5. description [A short description of the project.]:
  6. Select open_source_license:
  7. 1 - MIT
  8. 2 - BSD-3-Clause
  9. 3 - No license file
  10. Choose from 1, 2, 3 [1]: 3
  11. s3_bucket [[OPTIONAL] your-bucket-for-syncing-data (do not include 's3://')]:
  12. aws_profile [default]:
  13. Select python_interpreter:
  14. 1 - python3
  15. 2 - python
  16. Choose from 1, 2 [1]: 1