GeezerVison is showing github.com — python implementation added · cellcpu/python_reference@8ecab48
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: ipython_magic/watermark.ipynb +23-2Lines changed: 23 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 1 | 1 | { | 2 | 2 | "metadata": { | 3 | 3 | "name": "", | 4 | | - "signature": "sha256:fca7570e5ddd2ad9995dcf8f622de267860c7dac6cb0b275efffc900a181ebd7" | | 4 | + "signature": "sha256:b293f22eb716f74ec27869a5122812437e0a7f4743ddfe8c06a94c39f31c7d3e" | 5 | 5 | }, | 6 | 6 | "nbformat": 3, | 7 | 7 | "nbformat_minor": 0, | | 81 | 81 | ], | 82 | 82 | "prompt_number": 1 | 83 | 83 | }, | | 84 | + { | | 85 | + "cell_type": "code", | | 86 | + "collapsed": false, | | 87 | + "input": [ | | 88 | + "%install_ext ./watermark.py" | | 89 | + ], | | 90 | + "language": "python", | | 91 | + "metadata": {}, | | 92 | + "outputs": [ | | 93 | + { | | 94 | + "output_type": "stream", | | 95 | + "stream": "stdout", | | 96 | + "text": [ | | 97 | + "Installed watermark.py. To use it, type:\n", | | 98 | + " %load_ext watermark\n" | | 99 | + ] | | 100 | + } | | 101 | + ], | | 102 | + "prompt_number": 1 | | 103 | + }, | 84 | 104 | { | 85 | 105 | "cell_type": "markdown", | 86 | 106 | "metadata": {}, | | 205 | 225 | "output_type": "stream", | 206 | 226 | "stream": "stdout", | 207 | 227 | "text": [ | 208 | | - "28/06/2014 14:08:08\n", | | 228 | + "28/06/2014 15:29:14\n", | 209 | 229 | "\n", | 210 | 230 | "Python 3.4.1\n", | | 231 | + "Python implementationCPython\n", | 211 | 232 | "IPython 2.1.0\n", | 212 | 233 | "\n", | 213 | 234 | "compiler : GCC 4.2.1 (Apple Inc. build 5577)\n", | |
Collapse file Copy file name to clipboardExpand all lines: ipython_magic/watermark.py +7-4Lines changed: 7 additions & 4 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 2 | 2 | Sebastian Raschka 2014 | 3 | 3 |
| 4 | 4 | watermark.py | 5 | | -version 1.0.0 | | 5 | +version 1.0.1 | 6 | 6 |
| 7 | 7 |
| 8 | 8 | IPython magic function to print date/time stamps and various system information. | @@ -50,7 +50,7 @@ class WaterMark(Magics): | 50 | 50 | """ | 51 | 51 | IPython magic function to print date/time stamps | 52 | 52 | and various system information. | 53 | | - | | 53 | +
| 54 | 54 | """ | 55 | 55 | @magic_arguments() | 56 | 56 | @argument('-d', '--date', action='store_true', help='prints current date') | @@ -68,6 +68,8 @@ def watermark(self, line): | 68 | 68 | IPython magic function to print date/time stamps | 69 | 69 | and various system information. | 70 | 70 | | | 71 | + watermark version 1.0.1 | | 72 | + | 71 | 73 | """ | 72 | 74 | self.out = '' | 73 | 75 | args = parse_argstring(self.watermark, line) | @@ -111,7 +113,8 @@ def _get_packages(self, pkgs): | 111 | 113 | def _get_pyversions(self): | 112 | 114 | if self.out: | 113 | 115 | self.out += '\n\n' | 114 | | - self.out += 'Python %s\nIPython %s' %( | | 116 | + self.out += '%s %s\nIPython %s' %( | | 117 | + platform.python_implementation(), | 115 | 118 | platform.python_version(), | 116 | 119 | IPython.__version__ | 117 | 120 | ) | @@ -134,4 +137,4 @@ def _get_sysinfo(self): | 134 | 137 |
| 135 | 138 |
| 136 | 139 | def load_ipython_extension(ipython): | 137 | | - ipython.register_magics(WaterMark) | | 140 | + ipython.register_magics(WaterMark) |
|