Skip to content

Instantly share code, notes, and snippets.

@natronics
Last active December 20, 2015 14:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save natronics/6147721 to your computer and use it in GitHub Desktop.
Save natronics/6147721 to your computer and use it in GitHub Desktop.
iPython Notebook Example
{
"metadata": {
"name": "ip_gits_test"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "heading",
"level": 1,
"metadata": {},
"source": [
"iPython Notebook"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"A quick test of using iPython notebooks, saving in a [github gist](https://gist.github.com/natronics/6147721), and using [nbviewer](http://nbviewer.ipython.org/6147721).\n",
"\n",
"Here we can use markdown with `code` tags and even $\\LaTeX$"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"a = 5\n",
"print a"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"5\n"
]
}
],
"prompt_number": 1
},
{
"cell_type": "raw",
"metadata": {},
"source": [
"This is raw text"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# Using past variables:\n",
"print a + 67"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"72\n"
]
}
],
"prompt_number": 2
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"That's most of the features I care about. lets end with an empty plain txt box:"
]
},
{
"cell_type": "raw",
"metadata": {},
"source": []
}
],
"metadata": {}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment