datacamp_tutorials

by thushv89

148 Stars 133 Forks Last release: Not found 8 Commits 0 Releases

Available items

No Items, yet!

The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:

Introduction

This repository contains various tutorials written for DataCamp.

How to run code?

I like to keep the Python setup in my OS very simple and create virtual environments with required custom libraries depending on the project I want to run. I would very much like to use Docker for this purpose, as that is the de-facto standard for process isolation. However since I am using Windows there is no way for me to expose my GPU to Docker. Thus, I opt to

conda
and Python virtual environment.

Using conda environment

  1. Download and install Anaconda
  2. Make sure conda is in the system PATH by trying
    conda --version
    on a terminal
  3. Create a conda virtual environment using
    conda create -n datacamp.tutorials python=3.5
  4. cd
    into the project directory
  5. Install tensorflow as follows
    • If you do not have a GPU use:
      conda install -n datacamp.tutorial --yes --file requirements.txt
    • If you do have a GPU use:
      conda install -n datacamp.tutorials --yes --file requirements_gpu.txt
  6. Activate the newly created environment with
    activate datacamp.tutorials

Further reading on how to setup conda environments: Here

Using Python virtualenv

I prefer conda because numpy, pandas and tensorflow CPU operations are much faster than when used with pip according to this article. But if you prefer to use Python virtualenv, use the following steps.

  1. Download and install Python 3.5
  2. Now install
    virtualenv
    with
    pip3 install virtualenv
  3. cd
    into the project directory
  4. Create a virtual environment with
    virtualenv -p  datacamp.tutorials
  5. Activate the virtual environment as follows
    • If you are on Windows:
      \datacamp.tutorials\Scripts\activate
    • If you are on Ubuntu:
      source \datacamp.tutorials\bin\activate
  6. Install tensorflow as follows
    • If you do not have a GPU use:
      pip3 install -r requirements.txt
    • If you do have a GPU use:
      pip3 install -r requirements_gpu.txt

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.