Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import sys
- import os
- def main(argv = sys.argv):
- if len(argv) == 1:
- print('[USAGE] python create_template.py <project_name>')
- return 0
- project_name = argv[1]
- if project_name in os.listdir('.'):
- print('name : %s already exist' % (project_name))
- return 0
- os.mkdir(project_name)
- os.chdir(project_name)
- os.mkdir('data')
- os.mkdir('hpsearch')
- os.mkdir('models')
- os.mkdir('results')
- os.mkdir('tests')
- with open('.gitignore', 'w') as f:
- pass
- with open('README', 'w') as f:
- pass
- with open('main.py', 'w') as f:
- pass
- with open('data/download.sh', 'w') as f:
- pass
- with open('hpsearch/hyperband.py', 'w') as f:
- pass
- with open('hpsearch/randomsearch.py', 'w') as f:
- pass
- with open('models/__init__.py', 'w') as f:
- pass
- with open('models/basic_model.py', 'w') as f:
- pass
- with open('results/.gitkeep', 'w') as f:
- pass
- if __name__ == '__main__':
- main(sys.argv)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement