<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 Build and test the environment
This document explains how to set up your environment for the geocomputing course.
1. Install Anaconda
First, install Anaconda for Python 3.5, following the instructions there.
If you wish, you can also install git for your platform, but it's not a requirement.
2. Get the course materials
If you are using git, clone this repo
Step1:  5. Check conda installs
If any of these fail, go out to a terminal and do this, replacing &lt;package&gt; with the name of the package.
source activate geocomp  # Or whatever is the name of the environment
conda install &lt;package&gt;
Step2:  6. Check pip installs
If any of these fail, go out to a terminal and do this, replacing &lt;package&gt; with the name of the package.
source activate geocomp  # Or whatever is the name of the environment
pip install &lt;package&gt;
Step3:  7. Download data
<ASSISTANT_TASK:>
Python Code:
!python -V
# Should be 3.5
import numpy as np
import matplotlib.pyplot as plt
from scipy.signal import ricker
Explanation: Build and test the environment
This document explains how to set up your environment for the geocomputing course.
1. Install Anaconda
First, install Anaconda for Python 3.5, following the instructions there.
If you wish, you can also install git for your platform, but it's not a requirement.
2. Get the course materials
If you are using git, clone this repo: https://github.com/EvanBianco/Practical_Programming_for_Geoscientists
If not, download this ZIP file: https://github.com/EvanBianco/Practical_Programming_for_Geoscientists/archive/master.zip
Put the folder somewhere you will find it again.
This file is in the top level folder, called Build_ad_test_environment.ipynb.
3. a. Set up the environment
Do the following in a terminal:
conda config –-add channels conda-forge
conda create –n geocomputing python=3.5 anaconda
Start the environment:
source activate geocomputing
Now install packages:
conda install numpy  # Ensures latest.
conda install obspy
conda install geopandas
conda install ipyparallel
conda install tqdm
conda install folium
pip install lasio
pip install welly
pip install bruges
All of this should go without trouble.
3. b. Enter the environment and the repo
Now you will need to start running this notebook.
# If you didn't do this already:
git clone https://github.com/EvanBianco/Practical_Programming_for_Geoscientists
Then...
cd geocomputing
jupyter notebook Build_and_test_environment.ipynb
or if you're already running it, restart its kernel... and we can go on to check the environment.
4. Check anaconda basics
End of explanation
import pandas as pd
import requests
import numba
import ipyparallel as ipp
import obspy
import geopandas as gpd  # Not a catastrophe if missing.
import folium    # Not a catastrophe if missing.
Explanation: 5. Check conda installs
If any of these fail, go out to a terminal and do this, replacing &lt;package&gt; with the name of the package.
source activate geocomp  # Or whatever is the name of the environment
conda install &lt;package&gt;
End of explanation
import lasio
import welly
import bruges as b
Explanation: 6. Check pip installs
If any of these fail, go out to a terminal and do this, replacing &lt;package&gt; with the name of the package.
source activate geocomp  # Or whatever is the name of the environment
pip install &lt;package&gt;
End of explanation
import os
import requests
files = [
    '2D_Land_vibro_data_2ms.tgz',
    '3D_gathers_pstm_nmo_X1001.sgy',
    'Penobscot_0-1000ms.sgy.gz',
    'Penobscot_NumPy.npy.gz',
]
url = "https://s3.amazonaws.com/agilegeo/"
localpath = ''  # For CWD.
for file in files:
    print(file)
    r = requests.get(url+file, stream=True)
    chunk_size = 1024 * 1024 # 1MB
    with open(os.path.join(localpath, file), 'wb') as fd:
        for chunk in r.iter_content(chunk_size):
            if chunk:
                fd.write(chunk)
Explanation: 7. Download data
End of explanation
<END_TASK>