-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Udacity Data Analysis Nanodegree Branch
- Loading branch information
1 parent
802bba0
commit 27e21da
Showing
63 changed files
with
844,137 additions
and
0 deletions.
There are no files selected for viewing
223 changes: 223 additions & 0 deletions
223
.ipynb_checkpoints/Jupyter keyboard-shortcuts-checkpoint.ipynb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,223 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": { | ||
"collapsed": true | ||
}, | ||
"source": [ | ||
"# Keyboard shortcuts\n", | ||
"\n", | ||
"In this notebook, you'll get some practice using keyboard shortcuts. These are key to becoming proficient at using notebooks and will greatly increase your work speed.\n", | ||
"\n", | ||
"First up, switching between edit mode and command mode. Edit mode allows you to type into cells while command mode will use key presses to execute commands such as creating new cells and openning the command palette. When you select a cell, you can tell which mode you're currently working in by the color of the box around the cell. In edit mode, the box and thick left border are colored green. In command mode, they are colored blue. Also in edit mode, you should see a cursor in the cell itself.\n", | ||
"\n", | ||
"By default, when you create a new cell or move to the next one, you'll be in command mode. To enter edit mode, press Enter/Return. To go back from edit mode to command mode, press Escape.\n", | ||
"\n", | ||
"> **Exercise:** Click on this cell, then press Enter + Shift to get to the next cell. Switch between edit and command mode a few times." | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 2, | ||
"metadata": { | ||
"collapsed": true | ||
}, | ||
"outputs": [], | ||
"source": [ | ||
"# mode practice" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"## Help with commands\n", | ||
"\n", | ||
"If you ever need to look up a command, you can bring up the list of shortcuts by pressing `H` in command mode. The keyboard shortcuts are also available above in the Help menu. Go ahead and try it now." | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"## Creating new cells\n", | ||
"\n", | ||
"One of the most common commands is creating new cells. You can create a cell above the current cell by pressing `A` in command mode. Pressing `B` will create a cell below the currently selected cell." | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": { | ||
"collapsed": true | ||
}, | ||
"outputs": [], | ||
"source": [] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"> **Exercise:** Create a cell above this cell using the keyboard command." | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"> **Exercise:** Create a cell below this cell using the keyboard command." | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": { | ||
"collapsed": true | ||
}, | ||
"outputs": [], | ||
"source": [] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"## Switching between Markdown and code\n", | ||
"\n", | ||
"With keyboard shortcuts, it is quick and simple to switch between Markdown and code cells. To change from Markdown to cell, press `Y`. To switch from code to Markdown, press `M`.\n", | ||
"\n", | ||
"> **Exercise:** Switch the cell below between Markdown and code cells." | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 4, | ||
"metadata": { | ||
"collapsed": true | ||
}, | ||
"outputs": [], | ||
"source": [ | ||
"## Practice here\n", | ||
"\n", | ||
"def fibo(n): # Recursive Fibonacci sequence!\n", | ||
" if n == 0:\n", | ||
" return 0\n", | ||
" elif n == 1:\n", | ||
" return 1\n", | ||
" return fibo(n-1) + fibo(n-2)" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"## Line numbers\n", | ||
"\n", | ||
"A lot of times it is helpful to number the lines in your code for debugging purposes. You can turn on numbers by pressing `L` (in command mode of course) on a code cell.\n", | ||
"\n", | ||
"> **Exercise:** Turn line numbers on and off in the above code cell." | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"## Deleting cells\n", | ||
"\n", | ||
"Deleting cells is done by pressing `D` twice in a row so `D`, `D`. This is to prevent accidently deletions, you have to press the button twice!\n", | ||
"\n", | ||
"> **Exercise:** Delete the cell below." | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": { | ||
"collapsed": true | ||
}, | ||
"outputs": [], | ||
"source": [ | ||
"# DELETE ME" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"## Saving the notebook\n", | ||
"\n", | ||
"Notebooks are autosaved every once in a while, but you'll often want to save your work between those times. To save the book, press `S`. So easy!" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"## The Command Palette\n", | ||
"\n", | ||
"You can easily access the command palette by pressing Shift + Control/Command + `P`. \n", | ||
"\n", | ||
"> **Note:** This won't work in Firefox and Internet Explorer unfortunately. There is already a keyboard shortcut assigned to those keys in those browsers. However, it does work in Chrome and Safari.\n", | ||
"\n", | ||
"This will bring up the command palette where you can search for commands that aren't available through the keyboard shortcuts. For instance, there are buttons on the toolbar that move cells up and down (the up and down arrows), but there aren't corresponding keyboard shortcuts. To move a cell down, you can open up the command palette and type in \"move\" which will bring up the move commands.\n", | ||
"\n", | ||
"> **Exercise:** Use the command palette to move the cell below down one position." | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": { | ||
"collapsed": true | ||
}, | ||
"outputs": [], | ||
"source": [ | ||
"# Move this cell down" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": { | ||
"collapsed": true | ||
}, | ||
"outputs": [], | ||
"source": [ | ||
"# below this cell" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"## Finishing up\n", | ||
"\n", | ||
"There is plenty more you can do such as copying, cutting, and pasting cells. I suggest getting used to using the keyboard shortcuts, you’ll be much quicker at working in notebooks. When you become proficient with them, you'll rarely need to move your hands away from the keyboard, greatly speeding up your work.\n", | ||
"\n", | ||
"Remember, if you ever need to see the shortcuts, just press `H` in command mode.\n" | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"anaconda-cloud": {}, | ||
"kernelspec": { | ||
"display_name": "Python [default]", | ||
"language": "python", | ||
"name": "python3" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 3 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3", | ||
"version": "3.5.2" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 1 | ||
} |
Binary file not shown.
Binary file added
BIN
+5.11 MB
Career Dev and Books/Think Stats - Probability and Statistics for Programmers [BIG].pdf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
""" | ||
Demo of the histogram (hist) function with a few features. | ||
In addition to the basic histogram, this demo shows a few optional features: | ||
* Setting the number of data bins | ||
* The ``normed`` flag, which normalizes bin heights so that the integral of | ||
the histogram is 1. The resulting histogram is a probability density. | ||
* Setting the face color of the bars | ||
* Setting the opacity (alpha value). | ||
""" | ||
import numpy as np | ||
import matplotlib.mlab as mlab | ||
import matplotlib.pyplot as plt | ||
|
||
|
||
# example data | ||
mu = 100 # mean of distribution | ||
sigma = 15 # standard deviation of distribution | ||
x = mu + sigma * np.random.randn(10000) | ||
|
||
num_bins = 50 | ||
# the histogram of the data | ||
n, bins, patches = plt.hist(x, num_bins, normed=1, facecolor='green', alpha=0.5) | ||
# add a 'best fit' line | ||
y = mlab.normpdf(bins, mu, sigma) | ||
plt.plot(bins, y, 'r--') | ||
plt.xlabel('Smarts') | ||
plt.ylabel('Probability') | ||
plt.title(r'Histogram of IQ: $\mu=100$, $\sigma=15$') | ||
|
||
# Tweak spacing to prevent clipping of ylabel | ||
plt.subplots_adjust(left=0.15) | ||
plt.show() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
Congruent,Incongruent,,sd,sd,SEM | ||
12.079,19.278,,3.559357958,4.797057122,1.219302842 | ||
16.791,18.741,,,, | ||
9.564,21.214,,,, | ||
8.63,15.687,,,, | ||
14.669,22.803,,,, | ||
12.238,20.878,,,, | ||
14.692,24.572,,,, | ||
8.987,17.394,,,, | ||
9.401,20.762,,,, | ||
14.48,26.282,,,, | ||
22.328,24.524,,,, | ||
15.298,18.644,,,, | ||
15.073,17.51,,,, | ||
16.929,20.33,,,, | ||
18.2,35.255,,,, | ||
12.13,22.158,,,, | ||
18.495,25.139,,,, | ||
10.639,20.429,,,, | ||
11.344,17.425,,,, | ||
12.369,34.288,,,, | ||
12.944,23.894,,,, | ||
14.233,17.96,,,, | ||
19.71,22.058,,,, | ||
16.004,21.157,,,, |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
QWERTY errors,Alphabetical errors | ||
6,6 | ||
6,11 | ||
2,8 | ||
7,5 | ||
8,11 | ||
8,8 | ||
2,10 | ||
3,7 | ||
5,4 | ||
7,3 | ||
10,7 | ||
5,6 | ||
4,10 | ||
7,10 | ||
5,6 | ||
7,5 | ||
4,10 | ||
5,11 | ||
2,13 | ||
5,8 | ||
3,5 | ||
4,11 | ||
4,7 | ||
4,8 | ||
4,5 |
Oops, something went wrong.