anasm87 / ml-tutorial

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

python-template

Visual Studio Code

This repository is optimized for Visual Studio Code which is a great code editor for many languages like Python and Javascript. The introduction videos explain how to work with VS Code. The Python tutorial provides an introduction about common topics like code editing, linting, debugging and testing in Python. There is also a Data Science section showing how to work with Jupyter Notebooks and common Machine Learning libraries.

The .vscode directory contains configurations for useful extensions like GitLens and Python. When opening the repository, VS Code will open a prompt to install the recommended extensions.

Development Setup

Open the integrated terminal and run the setup script for your OS. This will install a Python virtual environment with all packages specified in requirements.txt.

If everything works you should be able to activate the Python environment by entering source .venv/bin/activate in the terminal. The command python src/hello.py will print the text "hello world" to your terminal.

Linux and Mac Users

  • run the setup script ./setup.sh or sh setup.sh

Windows Users

  • run the setup script .\setup.ps1

Development

  • activate python environment: source .venv/bin/activate
  • run python script: python <srcfilename.py> , e.g. python train.py
  • install new dependency: pip install sklearn
  • save current installed dependencies back to requirements.txt: pip freeze > requirements.txt

About


Languages

Language:Python 91.3%Language:Shell 3.9%Language:PowerShell 3.8%Language:Procfile 0.9%