Advertisement
pleabargain

ipython history magic seems broken

Jul 23rd, 2013
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 6.31 KB | None | 0 0
  1. {
  2.  "metadata": {
  3.   "name": ""
  4.  },
  5.  "nbformat": 3,
  6.  "nbformat_minor": 0,
  7.  "worksheets": [
  8.   {
  9.    "cells": [
  10.     {
  11.      "cell_type": "code",
  12.      "collapsed": false,
  13.      "input": [
  14.       "from IPython.display import YouTubeVideo\n",
  15.       "# Khan Academy on lists\n",
  16.       "YouTubeVideo('zEyEC34MY1A#t=1m23s') \n",
  17.       "#? does not work with time code\n",
  18.       "#don't use ? use #t"
  19.      ],
  20.      "language": "python",
  21.      "metadata": {},
  22.      "outputs": [
  23.       {
  24.        "html": [
  25.         "\n",
  26.         "        <iframe\n",
  27.         "            width=\"400\"\n",
  28.         "            height=300\"\n",
  29.         "            src=\"http://www.youtube.com/embed/zEyEC34MY1A#t=1m23s\"\n",
  30.         "            frameborder=\"0\"\n",
  31.         "            allowfullscreen\n",
  32.         "        ></iframe>\n",
  33.         "        "
  34.        ],
  35.        "metadata": {},
  36.        "output_type": "pyout",
  37.        "prompt_number": 20,
  38.        "text": [
  39.         "<IPython.lib.display.YouTubeVideo at 0x4374f50>"
  40.        ]
  41.       }
  42.      ],
  43.      "prompt_number": 20
  44.     },
  45.     {
  46.      "cell_type": "code",
  47.      "collapsed": false,
  48.      "input": [
  49.       "from IPython.display import YouTubeVideo\n",
  50.       "# Khan Academy on lists\n",
  51.       "YouTubeVideo('zEyEC34MY1A') #does not work with time code"
  52.      ],
  53.      "language": "python",
  54.      "metadata": {},
  55.      "outputs": [
  56.       {
  57.        "html": [
  58.         "\n",
  59.         "        <iframe\n",
  60.         "            width=\"400\"\n",
  61.         "            height=300\"\n",
  62.         "            src=\"http://www.youtube.com/embed/zEyEC34MY1A\"\n",
  63.         "            frameborder=\"0\"\n",
  64.         "            allowfullscreen\n",
  65.         "        ></iframe>\n",
  66.         "        "
  67.        ],
  68.        "output_type": "pyout",
  69.        "prompt_number": 3,
  70.        "text": [
  71.         "<IPython.lib.display.YouTubeVideo at 0x442c650>"
  72.        ]
  73.       }
  74.      ],
  75.      "prompt_number": 3
  76.     },
  77.     {
  78.      "cell_type": "code",
  79.      "collapsed": false,
  80.      "input": [
  81.       "Ipython.diplay?"
  82.      ],
  83.      "language": "python",
  84.      "metadata": {},
  85.      "outputs": [
  86.       {
  87.        "output_type": "stream",
  88.        "stream": "stdout",
  89.        "text": [
  90.         "Object `Ipython.diplay` not found.\n"
  91.        ]
  92.       }
  93.      ],
  94.      "prompt_number": 3
  95.     },
  96.     {
  97.      "cell_type": "code",
  98.      "collapsed": false,
  99.      "input": [
  100.       "from IPython.display import YouTubeVideo\n"
  101.      ],
  102.      "language": "python",
  103.      "metadata": {},
  104.      "outputs": [],
  105.      "prompt_number": 10
  106.     },
  107.     {
  108.      "cell_type": "code",
  109.      "collapsed": false,
  110.      "input": [
  111.       "IPython.display?"
  112.      ],
  113.      "language": "python",
  114.      "metadata": {},
  115.      "outputs": [
  116.       {
  117.        "output_type": "stream",
  118.        "stream": "stdout",
  119.        "text": [
  120.         "Object `IPython.display` not found.\n"
  121.        ]
  122.       }
  123.      ],
  124.      "prompt_number": 11
  125.     },
  126.     {
  127.      "cell_type": "code",
  128.      "collapsed": false,
  129.      "input": [
  130.       "%history -l 10-11"
  131.      ],
  132.      "language": "python",
  133.      "metadata": {},
  134.      "outputs": [
  135.       {
  136.        "output_type": "stream",
  137.        "stream": "stderr",
  138.        "text": [
  139.         "UsageError: argument -l: invalid int value: '10-11'"
  140.        ]
  141.       }
  142.      ],
  143.      "prompt_number": 12
  144.     },
  145.     {
  146.      "cell_type": "code",
  147.      "collapsed": false,
  148.      "input": [
  149.       "%history?"
  150.      ],
  151.      "language": "python",
  152.      "metadata": {},
  153.      "outputs": [],
  154.      "prompt_number": 13
  155.     },
  156.     {
  157.      "cell_type": "code",
  158.      "collapsed": false,
  159.      "input": [
  160.       "%history -n 10-11 -o"
  161.      ],
  162.      "language": "python",
  163.      "metadata": {},
  164.      "outputs": [
  165.       {
  166.        "output_type": "stream",
  167.        "stream": "stdout",
  168.        "text": [
  169.         "  10: from IPython.display import YouTubeVideo\n",
  170.         "  11: IPython.display?\n"
  171.        ]
  172.       }
  173.      ],
  174.      "prompt_number": 19
  175.     },
  176.     {
  177.      "cell_type": "code",
  178.      "collapsed": false,
  179.      "input": [
  180.       "%history -o -n 10-11"
  181.      ],
  182.      "language": "python",
  183.      "metadata": {},
  184.      "outputs": [
  185.       {
  186.        "output_type": "stream",
  187.        "stream": "stdout",
  188.        "text": [
  189.         "  10: from IPython.display import YouTubeVideo\n",
  190.         "  11: IPython.display?\n"
  191.        ]
  192.       }
  193.      ],
  194.      "prompt_number": 21
  195.     },
  196.     {
  197.      "cell_type": "code",
  198.      "collapsed": false,
  199.      "input": [
  200.       "%history -o"
  201.      ],
  202.      "language": "python",
  203.      "metadata": {},
  204.      "outputs": [
  205.       {
  206.        "output_type": "stream",
  207.        "stream": "stdout",
  208.        "text": [
  209.         "from IPython.display import YouTubeVideo\n",
  210.         "# Khan Academy on lists\n",
  211.         "YouTubeVideo('zEyEC34MY1A#t=1m23s') \n",
  212.         "#? does not work with time code\n",
  213.         "#don't use ? use #\n",
  214.         "<IPython.lib.display.YouTubeVideo at 0x4374590>\n",
  215.         "from IPython.display import YouTubeVideo\n",
  216.         "# Khan Academy on lists\n",
  217.         "YouTubeVideo('zEyEC34MY1A#t=1m23s') \n",
  218.         "#? does not work with time code\n",
  219.         "#don't use ? use #\n",
  220.         "<IPython.lib.display.YouTubeVideo at 0x4374650>\n",
  221.         "Ipython.diplay?\n",
  222.         "from IPython.display import YouTubeVideo\n",
  223.         "Ipython.display?\n",
  224.         "Ipython.display?\n",
  225.         "%history\n",
  226.         "IPython.display?\n",
  227.         "IPython.display?\n",
  228.         "from IPython.display import YouTubeVideo\n",
  229.         "IPython.display?\n",
  230.         "%history -l 10-11\n",
  231.         "%history?\n",
  232.         "%history -n 10-11\n",
  233.         "%history -n 10-11 -o\n",
  234.         "%history -o -n 10-11\n",
  235.         "%history -o 10-11 -n 10-11\n",
  236.         "%history -o -n 10-11\n",
  237.         "%history -n 10-11 -o\n",
  238.         "from IPython.display import YouTubeVideo\n",
  239.         "# Khan Academy on lists\n",
  240.         "YouTubeVideo('zEyEC34MY1A#t=1m23s') \n",
  241.         "#? does not work with time code\n",
  242.         "#don't use ? use #t\n",
  243.         "<IPython.lib.display.YouTubeVideo at 0x4374f50>\n",
  244.         "%history -o -n 10-11\n",
  245.         "%history -o\n"
  246.        ]
  247.       }
  248.      ],
  249.      "prompt_number": 22
  250.     },
  251.     {
  252.      "cell_type": "code",
  253.      "collapsed": false,
  254.      "input": [],
  255.      "language": "python",
  256.      "metadata": {},
  257.      "outputs": []
  258.     }
  259.    ],
  260.    "metadata": {}
  261.   }
  262.  ]
  263. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement