{"id":68,"date":"2017-04-07T15:56:32","date_gmt":"2017-04-07T15:56:32","guid":{"rendered":"http:\/\/lop.blogwyrm.com\/?p=68"},"modified":"2017-04-07T15:56:32","modified_gmt":"2017-04-07T15:56:32","slug":"smoothing-jupyter-startup","status":"publish","type":"post","link":"https:\/\/lop.blogwyrm.com\/?p=68","title":{"rendered":"Smoothing Jupyter Startup"},"content":{"rendered":"<p>Within:<\/p>\n<pre>C:\\Users\\\\.ipython\\profile_default\\startup<\/pre>\n<p>place whatever files you want executed with the following naming convention<\/p>\n<pre>\r\n00-global_imports.py\r\n01-local_imports.py\r\n02-global_magics.ipy\r\n<\/pre>\n<p>with contents like:<\/p>\n<pre>\r\n00-global_imports.py\r\n\r\n#global imports\r\nimport matplotlib as mpl\r\nmpl.use('agg')\r\n\r\nimport datetime          as dt\r\nimport matplotlib.cm     as cmap\r\nimport matplotlib.dates  as mdates\r\nimport matplotlib.pyplot as plt\r\nimport matplotlib.ticker as ticker\r\nimport numpy             as np\r\nimport os \r\nimport re\r\nimport scipy             as sp\r\nimport scipy.interpolate as interp\r\nimport scipy.optimize    as opt\r\nimport scipy.special     as special\r\nimport spacepy.pycdf     as pycdf\r\nimport sys\r\n<\/pre>\n<pre>\r\n02-global_magics.ipy\r\n\r\n#magic happens\r\n%load_ext autoreload\r\n%autoreload 2\r\n%matplotlib inline\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Within: C:\\Users\\\\.ipython\\profile_default\\startup place whatever files you want executed with the following naming convention 00-global_imports.py 01-local_imports.py 02-global_magics.ipy with contents like: 00-global_imports.py #global imports import matplotlib as mpl mpl.use('agg') import datetime as dt import matplotlib.cm as cmap import matplotlib.dates as mdates import matplotlib.pyplot as plt import matplotlib.ticker as ticker import numpy as np import os import re &hellip; <a href=\"https:\/\/lop.blogwyrm.com\/?p=68\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Smoothing Jupyter Startup<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-68","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/lop.blogwyrm.com\/index.php?rest_route=\/wp\/v2\/posts\/68","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lop.blogwyrm.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lop.blogwyrm.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lop.blogwyrm.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/lop.blogwyrm.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=68"}],"version-history":[{"count":1,"href":"https:\/\/lop.blogwyrm.com\/index.php?rest_route=\/wp\/v2\/posts\/68\/revisions"}],"predecessor-version":[{"id":69,"href":"https:\/\/lop.blogwyrm.com\/index.php?rest_route=\/wp\/v2\/posts\/68\/revisions\/69"}],"wp:attachment":[{"href":"https:\/\/lop.blogwyrm.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=68"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lop.blogwyrm.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=68"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lop.blogwyrm.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=68"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}