Created
February 23, 2014 23:03
-
-
Save hassanshamim/9178611 to your computer and use it in GitHub Desktop.
notebook play
This file contains hidden or 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
{ | |
"metadata": { | |
"name": "notebook play" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": "Welcome to IPython Notebook\n===\n\n### It can do cool markdown stuff\n*like this*\n> or this quote\n - [Hassan](http://www.github.com/hassanshamim)\n" | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": "\" \".join(['and', 'of', 'course', 'python!'])", | |
"language": "python", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"metadata": {}, | |
"output_type": "pyout", | |
"prompt_number": 25, | |
"text": "'and of course python!'" | |
} | |
], | |
"prompt_number": 25 | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": "from pygments import highlight\nfrom pygments.lexers import PythonLexer\nfrom pygments.formatters import HtmlFormatter\n\ncode = \"print And it's packages\"\nhighlight(code, PythonLexer(), HtmlFormatter())", | |
"language": "python", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"metadata": {}, | |
"output_type": "pyout", | |
"prompt_number": 28, | |
"text": "u'<div class=\"highlight\"><pre><span class=\"k\">print</span> <span class=\"n\">And</span> <span class=\"n\">it</span><span class=\"s\">'s packages</span>\\n</pre></div>\\n'" | |
} | |
], | |
"prompt_number": 28 | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": "ls", | |
"language": "python", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"output_type": "stream", | |
"stream": "stdout", | |
"text": "\u001b[34mApplications\u001b[m\u001b[m/ \u001b[34mDocuments\u001b[m\u001b[m/ \u001b[34mEnvs\u001b[m\u001b[m/ \u001b[34mMusic\u001b[m\u001b[m/ \u001b[34mPycharmProjects\u001b[m\u001b[m/ \u001b[34mchef-repo\u001b[m\u001b[m/ notes_from_pytenn\r\n\u001b[34mBooks\u001b[m\u001b[m/ \u001b[34mDownloads\u001b[m\u001b[m/ \u001b[34mLibrary\u001b[m\u001b[m/ \u001b[34mPictures\u001b[m\u001b[m/ \u001b[34mSync\u001b[m\u001b[m/ \u001b[34mlandmark\u001b[m\u001b[m/\r\n\u001b[34mDesktop\u001b[m\u001b[m/ \u001b[34mDropbox\u001b[m\u001b[m/ \u001b[34mMovies\u001b[m\u001b[m/ \u001b[34mPublic\u001b[m\u001b[m/ \u001b[34mVirtualBox VMs\u001b[m\u001b[m/ notebook play.ipynb\r\n" | |
} | |
], | |
"prompt_number": 29 | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": "python --version", | |
"language": "python", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"ename": "NameError", | |
"evalue": "name 'python' is not defined", | |
"output_type": "pyerr", | |
"traceback": [ | |
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m\n\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)", | |
"\u001b[0;32m<ipython-input-30-50e2c9d9c6fd>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mpython\u001b[0m \u001b[0;34m-\u001b[0m\u001b[0;34m-\u001b[0m\u001b[0mversion\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m", | |
"\u001b[0;31mNameError\u001b[0m: name 'python' is not defined" | |
] | |
} | |
], | |
"prompt_number": 30 | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": "!python --version", | |
"language": "python", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"output_type": "stream", | |
"stream": "stdout", | |
"text": "Python 2.7.6\r\n" | |
} | |
], | |
"prompt_number": 31 | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": "!ps aux | grep notebook", | |
"language": "python", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"output_type": "stream", | |
"stream": "stdout", | |
"text": "avendesora 14294 3.0 0.0 2433364 912 s002 Ss+ 4:47PM 0:00.01 /bin/sh -c ps aux | grep \u001b[1;32m\u001b[Knotebook\u001b[m\u001b[K\r\navendesora 14228 1.7 0.3 2493380 25452 s000 S+ 4:19PM 0:00.96 /Users/avendesora/.virtualenvs/\u001b[1;32m\u001b[Knotebook\u001b[m\u001b[K-play/bin/python -c from IPython.kernel.zmq.kernelapp import main; main() -f /Users/avendesora/.ipython/profile_default/security/kernel-37049393-e47c-4867-a6ed-0c68c8c8be3f.json --IPKernelApp.parent_appname='ipython-\u001b[1;32m\u001b[Knotebook\u001b[m\u001b[K' --profile-dir /Users/avendesora/.ipython/profile_default --parent=1\r\navendesora 14219 0.6 0.3 2485940 28124 s000 S+ 4:19PM 0:01.15 /Users/avendesora/.virtualenvs/\u001b[1;32m\u001b[Knotebook\u001b[m\u001b[K-play/bin/python /Users/avendesora/.virtualenvs/\u001b[1;32m\u001b[Knotebook\u001b[m\u001b[K-play/bin/ipython \u001b[1;32m\u001b[Knotebook\u001b[m\u001b[K\r\navendesora 14296 0.0 0.0 2442000 644 s002 S+ 4:47PM 0:00.00 grep \u001b[1;32m\u001b[Knotebook\u001b[m\u001b[K\r\n" | |
} | |
], | |
"prompt_number": 36 | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": "cat ./notes_from_pytenn", | |
"language": "python", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"output_type": "stream", | |
"stream": "stdout", | |
"text": "BDaily - Systematic bias\r\n - from book \"Thinking fast and slow\" - kahneman?\r\n - \r\n" | |
} | |
], | |
"prompt_number": 55 | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": "", | |
"language": "python", | |
"metadata": {}, | |
"outputs": [] | |
} | |
], | |
"metadata": {} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment