Skip to content

Instantly share code, notes, and snippets.

@hernamesbarbara
Last active February 8, 2018 02:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save hernamesbarbara/6516531 to your computer and use it in GitHub Desktop.
Save hernamesbarbara/6516531 to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
{
"metadata": {
"name": "Scientific Python Setup"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# [INTRODUCTION TO DATA SCIENCE IN PYTHON](http://www.datagotham.com/tutorials/#yhat)\n",
"## Tutorial by [Yhat](http://yhathq.com)\n",
"## [DataGotham 2013](http://www.datagotham.com) New York, NY\n",
"\n",
"<b>Wifi Network</b>: foo\n",
"\n",
"<b>Wifi Password</b>: bar\n",
"\n",
"[View this page](http://nbviewer.ipython.org/6512456)\n",
"\n",
"[Download this notebook](https://gist.github.com/6512456)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<hr>\n",
"# Before we begin....\n",
"\n",
"If you haven't already, double check that you have the following tools installed on your machines."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<style>\n",
" table {font-size: 16px; width: 35%;}\n",
"</style>\n",
"\n",
"<table>\n",
" <thead>\n",
" <tr>\n",
" <th>Name</th>\n",
" <th>URL</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <td>Python 2.7</td>\n",
" <td><a href=\"http://www.python.org/download/releases/2.7/\">http://www.python.org/download/releases/2.7/</a></td>\n",
" </tr>\n",
" <tr>\n",
" <td>pip</td>\n",
" <td><a href=\"http://www.pip-installer.org/en/latest/installing.html\">http://www.pip-installer.org/en/latest/installing.html</a></td>\n",
" </tr>\n",
" <tr>\n",
" <td>numpy >= 1.6</td>\n",
" <td><a href=\"http://sourceforge.net/projects/numpy/files/NumPy/\">http://sourceforge.net/projects/numpy/files/NumPy/</a></td>\n",
" </tr>\n",
" <tr>\n",
" <td>scipy</td>\n",
" <td><a href=\"http://sourceforge.net/projects/scipy/files/scipy/\">http://sourceforge.net/projects/scipy/files/scipy/</a></td>\n",
" </tr>\n",
" <tr>\n",
" <td>pandas</td>\n",
" <td><a href=\"http://pandas.pydata.org/getpandas.html\">http://pandas.pydata.org/getpandas.html</a></td>\n",
" </tr>\n",
" <tr>\n",
" <td>matplotlib</td>\n",
" <td><a href=\"http://matplotlib.org/users/installing.html\">http://matplotlib.org/users/installing.html</a></td>\n",
" </tr>\n",
" <tr>\n",
" <td>yhat</td>\n",
" <td><a href=\"https://github.com/yhat/yhat-client\">https://github.com/yhat/yhat-client</a></td>\n",
" </tr>\n",
" </tbody>\n",
"</table>"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<hr>\n",
"# Installing Python\n",
"http://www.python.org/download/releases/2.7/"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"osX:\n",
"\n",
"- Apple ships macs w/ Python already installed. Though you can use the system installation of Python, it's safer to install your own to keep the system version clean.\n",
"\n",
"- to install your own version of Python apart from the one that came installed on your computer, you can run:\n",
"\n",
"<pre><code>brew install python</code></pre>\n",
"\n",
"if you have homebrew. Alternatively, you can download the Mac Installer disk image for Python 2.7 for OS X 10.3 on the Python website.\n",
"\n",
"Windows: \n",
"\n",
"- Windows computers do not ship with Python, but it's pretty easy to install via a double-click\n",
"\n",
"- There's a link to download the .exe installer on the python website"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<hr>\n",
"# Installing pip\n",
"http://www.pip-installer.org/en/latest/installing.html\n",
"\n",
"An excellent tool for installing and managing Python packages. <code>pip</code> relies on another tool called <code>setuptools</code>, so we need to install that first."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"To check if ```pip``` is installed on your machine, enter this command in your terminal shell:\n",
"\n",
" pip --help\n",
"\n",
"If you're on a mac, install pip by entering the following terminal commands.\n",
"\n",
" # downloads setuptools installer script and saves it to a file called ez_setup.py in your current directory\n",
" curl --ssl https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py >> ez_setup.py\n",
"\n",
"```ez_setup.py``` is a python script that will install ```setuptools```. To run it, enter the following command in your terminal.\n",
"\n",
" python ez_setup.py\n",
"\n",
"Now that you have setuptools, you can install ```pip```. Grab the ```pip``` installer using ```curl``` like so:\n",
"\n",
" curl --ssl https://raw.github.com/pypa/pip/master/contrib/get-pip.py >> get-pip.py\n",
"\n",
"and run it\n",
"\n",
" python get-pip.py\n",
"\n",
"To make sure it worked, run this again\n",
"\n",
" pip --help"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<hr>\n",
"# Installing numpy \n",
"http://docs.scipy.org/doc/numpy/user/install.html\n",
"\n",
"A fast library for matrix math / n-dimensional arrays."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"```pip install --upgrade numpy```\n",
"\n",
"Windows installer: http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<hr>\n",
"# Installing scipy\n",
"\n",
"General scientific library containing routines and functions for optimization, linear algebra, statistics, FFT, clustering, etc."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"```pip install --upgrade scipy```\n",
"\n",
"Windows installer: http://www.lfd.uci.edu/~gohlke/pythonlibs/#scipy"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<hr>\n",
"# Installing matplotlib\n",
"http://matplotlib.org/\n",
"\n",
"A python 2D plotting library."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"```pip install --upgrade matplotlib```\n",
"\n",
"Windows installer: <br> http://www.lfd.uci.edu/~gohlke/pythonlibs/#pandas"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<hr>\n",
"# Installing pandas\n",
"http://pandas.pydata.org/pandas-docs/stable/install.html\n",
"\n",
"Primary package for handling and operating on data.\n",
"<br>Provides R-like functionality including <code>DataFrame</code>, <code>reshape</code>, <code>melt</code>, <code>groupby, <code>join</code>, etc)."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"```pip install --upgrade pip```\n",
"\n",
"Windows installer: http://www.lfd.uci.edu/~gohlke/pythonlibs/#pandas"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<hr>\n",
"# Installing IPython\n",
"http://ipython.org/install.html\n",
"\n",
"Command line and web IDE designed for use with Python and several other scientific and web-based technologies."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"```pip install --upgrade ipython```\n",
"\n",
"Windows installer: http://www.lfd.uci.edu/~gohlke/pythonlibs/#ipython"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Installing scikit-learn\n",
"http://scikit-learn.org/stable/install.html\n",
"\n",
"Simple and efficient tools for analysing and mining data in Python. <br>\n",
"Includes dozens of algorithms and utilities for classification, regression, dimensionality reduction, clustering, model selection, and preprocessing."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"```pip install --upgrade scikit-learn```\n",
"\n",
"Windows installer: http://www.lfd.uci.edu/~gohlke/pythonlibs/#scikit-learn"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Installing yhat\n",
"https://github.com/yhat/yhat-client\n",
"\n",
"Package for deploying your analytical routines as RESTful APIs.\n",
"\n",
" pip install --upgrade yhat"
]
}
],
"metadata": {}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment