From ed0fe8c6aa08fe7ac8ec44a4f4495080f54d7ec2 Mon Sep 17 00:00:00 2001 From: Donne Martin Date: Sun, 12 Apr 2015 18:30:00 -0400 Subject: [PATCH] Added IPython magic for loading the contents of a file and for timing. --- commands/misc.ipynb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/commands/misc.ipynb b/commands/misc.ipynb index 6510f68..5b1c42e 100644 --- a/commands/misc.ipynb +++ b/commands/misc.ipynb @@ -1,7 +1,7 @@ { "metadata": { "name": "", - "signature": "sha256:fe560fb7ec0203c6822ae09be96cbbe66d66fbbcad3885529aa6d4969a2e7074" + "signature": "sha256:c39bbf32494020a300d424ed24cb9891d891ab8e67fe4c3162296bad4385c933" }, "nbformat": 3, "nbformat_minor": 0, @@ -89,8 +89,12 @@ "# Start IPython Notebook with a profile\n", "ipython notebook --profile=dark-bg\n", "\n", + "# Load the contents of a file\n", + "%load dir/file.py\n", + "\n", "# Time execution of a Python statement or expression\n", "%timeit\n", + "%%time\n", "\n", "# Activate the interactive debugger\n", "%debug\n",