Giter VIP home page Giter VIP logo

help's Introduction

Jupyter

Read this in other languages: English, Español, Português, Français

Jupyter metapackage for installation and documents

Documentation structure

This documentation uses the Sphinx documentation engine.

The documentation is located in the docs/source folder. When you build the documentation, it will be placed in the docs/build folder. It is written in a combination of reStructuredText and MyST Markdown.

Build the documentation locally

There are a few ways to build the documentation; see below for instructions:

Build the documentation automatically with nox

The easiest way to build the documentation locally is by using the nox command line tool. This tool makes it easy to automate commands in a repository, and we have included a docs command to quickly install the dependencies and build the documentation.

To build and preview the site locally, follow these steps:

  1. Clone this repository.

    $ git clone https://github.com/jupyter/jupyter
    $ cd jupyter
  2. Install nox

    $ pip install nox
  3. Run the docs command

    $ nox -s docs

This will install the needed dependencies in a virtual environment using pip. It will then place the documentation in the docs/build/html folder. You may explore these HTML files in order to preview the site.

Create a live server to automatically preview changes

There is another nox command that will do the above, and also create a live server that watches your source files for changes, and auto-builds the website any time a change is made.

To start this live server, use the following nox command:

$ nox -s docs-live

When the build is finished, go to the URL that is displayed. It should show a live preview of your documentation.

To stop serving the website, press Ctrl-C in your terminal

Build the documentation manually

To build the documentation manually, follow these steps:

First, install the miniconda Python distribution.

Next, navigate to the /docs directory and create a conda environment:

conda env create -f environment.yml

Activate the environment:

source activate jupyter_docs

Build the docs using Sphinx with the following commands:

make clean
make html

The docs will be built in build/html. They can be viewed by opening build/html/index.html or starting an HTTP server and navigating to 0.0.0.0:8000 in your web browser.

python3 -m http.server

Releasing the jupyter metapackage

Anyone with push access to this repo can make a release of the Jupyter metapackage (this happens very rarely). We use tbump to publish releases.

tbump updates version numbers and publishes the git tag of the version. Our GitHub Actions then build the releases and publish them to PyPI.

The steps involved:

  1. Install tbump: pip install tbump
  2. Tag and publish the release tbump $NEW_VERSION.

That's it!

help's People

Contributors

carreau avatar ccordoba12 avatar chungjooho avatar damianavila avatar jasongrout avatar jzf2101 avatar minrk avatar parente avatar remram44 avatar rgbkrk avatar takluyver avatar willingc avatar yuvipanda avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

help's Issues

download hook for customized kernel

Is there any hook/API for a customized kernel to control how ipynb is saved? I am working on a kernel named sos and I found that Download as -> SoS (.sos) merely saves all the sources in code cells, ignoring cell index and all the markdown cells. It would be helpful if the kernel can jump in and save some more information.

In addition, one of the biggest concerns I have with using jupyter is version control of the scripts. It would be really helpful to save .ipynb file in a stripped down version without result cells. Something like

%cell markdown
# header stuff

%cell code 1
read.table('input.txt')

%cell code 2
...

with cell contents exactly as what users input into cells. I do not even need to save in .sos format if such a format exists.

No kernels available

hi, my jupyter stopped working after an update.
I updated it with "python3.5 -mpip install -U jupyter --user" and now upon "jupyter qtconsole" I have "jupyter_client.kernelspec.NoSuchKernel: No such kernel named python3"
Upon running jupyter kernelspec list, I have:

[ListKernelSpecs] WARNING | Native kernel (python2) is not available
No kernels available

I removed the python 2 kernel as I thought I had a python3 installed (before I knesw about kernelspec list) and the pythoné was preventing jupyter from seeing a python3 kernel.
I tried installing a python3 kernel following some github comments to no avail:
python3 -m ipykernel install --user does not work:
/usr/bin/python3: Error while finding spec for 'ipykernel.main' (<class 'ImportError'>: No module named 'IPython.paths'); 'ipykernel' is a package and cannot be directly executed

Cell Toolbar example not working

I'm trying to add a few cell toolbars to my notebook using the version in the master branch and I tried to run the following example (from the docs) in two different cells:

%%javascript
var CellToolbar = Jupyter.CellToolbar
var toggle =  function(div, cell) {
     var button_container = $(div)
     console.log("hello????")

     // let's create a button that shows the current value of the metadata
     var button = $('<button/>').addClass('btn btn-mini').text(String(cell.metadata.foo));

     // On click, change the metadata value and update the button label
     button.click(function(){
                 var v = cell.metadata.foo;
                 cell.metadata.foo = !v;
                 button.text(String(!v));
             })

     // add the button to the DOM div.
     button_container.append(button);
}

 // now we register the callback under the name foo to give the
 // user the ability to use it later
 CellToolbar.register_callback('tuto.foo', toggle);
%%javascript
Jupyter.CellToolbar.register_preset('Tutorial 1',['tuto.foo','default.rawedit'])
Jupyter.CellToolbar.register_preset('Tutorial 2',['slideshow.select','tuto.foo'])

Which resulted in the following menu items in the cell toolbar dropdown:

screen shot 2016-05-24 at 2 58 16 pm

However, when I click on the button, nothing is added to my cells. The default ones work as expected, but I don't even see my console statement.

how to load spark-csv in jupyter in windows specifically?

I managed to load spark-csv in a local mode using this command $SPARK_HOME/bin/spark-shell --packages com.databricks:spark-csv_2.11:1.4.0 but could not find a way to load in jupyter notebook. i have tried this command PYSPARK_DRIVER_PYTHON=ipython PYSPARK_DRIVER_PYTHON_OPTS=notebook /path/to/bin/pyspark --packages com.databricks:spark-csv_2.10:1.3.0 --master local[*] but cmd wont recoganized as internal or external command. i want to a method specifically for windows. plz help

Full Jupyter Directory

Hey everyone, I am a beginner in using Jupyter. I have actually the problem that my directory is overloaded. I have about 3.000 folders and files. The browser is crashing becaus of the big number. I uninstalled and installed it again. But the files are already there. If I try to delete it the message appears that I have not the permission.

Thanks for your help!

Legacy client, passing COM objects

I am trying to get a link working between a legacy application with a COM object model and a python 3 kernel, using the Jupyter client library. There are several tricky pieces to this but my sticking point at them moment is, I do not understand how comtypes and/or ctypes determines what API calls are exposed at the python module/object interface.

In particular, I'm looking for the CreateObjrefMoniker function in ole32.dll and can't figure out why I'm not seeing it. I will also want its evil twin, GetObject. See https://msdn.microsoft.com/en-us/library/windows/desktop/ms678493(v=vs.85).aspx

How is the short list of entry points that is exposed by ctypes.oledll.ole32 determined?

permission denied when homes on NFS

Hi All,

I have successfully installed jupyterhub via conda after installing the conda-forge channel (thanks to everyone for that). I'm running on RHEL 6.7 with automounted NFS home directories for most users, these users exist in LDAP and are authenticated via pam.

When I try to log into jupyterhub using one of the LDAP authenticated, NFS Home directory users I get the error below. Please note, I have verified that logging in and all functions do work for local only users. Additionally, I created /nfs/home/userx/.local and gave it 777 permissions, still same error only the next time the error was for /nfs/home/userx/.local/shared.

Please let me know if there is any other information needed.

Thanks in advance.

Thomas

Command starting jupyterhub:
jupyterhub --no-ssl --log-level=DEBUG

Error:
Spawning jupyterhub-singleuser --user=userx --port=37054 --cookie-name=jupyter-hub-token-userx --base-url=/user/userx --hub-host= --hub-prefix=/hub/ --hub-api-url=http://127.0.0.1:8081/hub/api --ip=127.0.0.1
[D 2016-06-12 15:47:32.676 JupyterHub spawner:316] Polling subprocess every 30s
Traceback (most recent call last):
File "/opt/anaconda3/lib/python3.5/site-packages/traitlets/traitlets.py", line 501, in get
value = obj._trait_values[self.name]
KeyError: 'runtime_dir'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/opt/anaconda3/bin/jupyterhub-singleuser", line 297, in
main()
File "/opt/anaconda3/bin/jupyterhub-singleuser", line 293, in main
return SingleUserNotebookApp.launch_instance()
File "/opt/anaconda3/lib/python3.5/site-packages/jupyter_core/application.py", line 267, in launch_instance
return super(JupyterApp, cls).launch_instance(argv=argv, *_kwargs)
File "/opt/anaconda3/lib/python3.5/site-packages/traitlets/config/application.py", line 595, in launch_instance
app.initialize(argv)
File "", line 2, in initialize
File "/opt/anaconda3/lib/python3.5/site-packages/traitlets/config/application.py", line 74, in catch_config_error
return method(app, *args, *_kwargs)
File "/opt/anaconda3/lib/python3.5/site-packages/notebook/notebookapp.py", line 1021, in initialize
self.init_configurables()
File "/opt/anaconda3/lib/python3.5/site-packages/notebook/notebookapp.py", line 815, in init_configurables
connection_dir=self.runtime_dir,
File "/opt/anaconda3/lib/python3.5/site-packages/traitlets/traitlets.py", line 529, in get
return self.get(obj, cls)
File "/opt/anaconda3/lib/python3.5/site-packages/traitlets/traitlets.py", line 508, in get
value = self.validate(obj, dynamic_default())
File "/opt/anaconda3/lib/python3.5/site-packages/jupyter_core/application.py", line 99, in runtime_dir_default
ensure_dir_exists(rd, mode=0o700)
File "/opt/anaconda3/lib/python3.5/site-packages/ipython_genutils/path.py", line 167, in ensure_dir_exists
os.makedirs(path, mode=mode)
File "/opt/anaconda3/lib/python3.5/os.py", line 231, in makedirs
makedirs(head, mode, exist_ok)
File "/opt/anaconda3/lib/python3.5/os.py", line 231, in makedirs
makedirs(head, mode, exist_ok)
File "/opt/anaconda3/lib/python3.5/os.py", line 231, in makedirs
makedirs(head, mode, exist_ok)
File "/opt/anaconda3/lib/python3.5/os.py", line 241, in makedirs
mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: '/nfs/home/userx/.local'
[W 2016-06-12 15:47:42.693 JupyterHub web:1521] 500 POST /hub/login?next= (10.91.23.183): Spawner failed to start [status=1]
[D 2016-06-12 15:47:42.696 JupyterHub base:441] No template for 500
[E 2016-06-12 15:47:42.708 JupyterHub log:99] {
"Referer": "http://system56.mydomain.com:8000/hub/login?next=",
"Content-Type": "application/x-www-form-urlencoded",
"Host": "system56.mydomain.com:8000",
"User-Agent": "Mozilla/5.0 (X11; OpenBSD amd64; rv:44.0) Gecko/20100101 Firefox/44.0",
"X-Forwarded-Proto": "http",
"Connection": "close",
"Accept-Language": "en-US,en;q=0.5",
"Content-Length": "33",
"X-Forwarded-Port": "8000",
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,
/
;q=0.8",
"Accept-Encoding": "gzip, deflate",
"X-Forwarded-For": "10.91.23.183"
}
[E 2016-06-12 15:47:42.708 JupyterHub log:100] 500 POST /hub/login?next= (@10.91.23.183) 13364.08ms
[D 2016-06-12 15:47:43.223 JupyterHub log:100] 304 GET /favicon.ico (@10.91.23.183) 0.83ms
[W 2016-06-12 15:48:02.737 JupyterHub user:264] userx's server never showed up at http://127.0.0.1:37054/user/userx after 30 seconds. Giving up
[E 2016-06-12 15:48:02.831 JupyterHub gen:871] Exception in Future <tornado.concurrent.Future object at 0x7f4d051cd198> after timeout
Traceback (most recent call last):
File "/opt/anaconda3/lib/python3.5/site-packages/tornado/gen.py", line 867, in error_callback
future.result()
File "/opt/anaconda3/lib/python3.5/site-packages/jupyterhub/user.py", line 280, in spawn
raise e
File "/opt/anaconda3/lib/python3.5/site-packages/jupyterhub/user.py", line 256, in spawn
yield self.server.wait_up(http=True, timeout=spawner.http_timeout)
File "/opt/anaconda3/lib/python3.5/site-packages/jupyterhub/orm.py", line 108, in wait_up
yield wait_for_http_server(self.url, timeout=timeout)
File "/opt/anaconda3/lib/python3.5/site-packages/jupyterhub/utils.py", line 94, in wait_for_http_server
**locals()
TimeoutError: Server at http://127.0.0.1:37054/user/userx didn't respond in 30 seconds

edit behavior of keyboard "ctrl-o" for opening line in notebook's edit mode

Hi all, I'd like to propose a suggestion to edit the behavior of the keyboard shortcut "ctrl + o" (mac system) when in edit mode in a Jupyter notebook cell.

Current behavior: ctrl+o "opens" (inserts) a line above your current line, but the pointer remains at your current line.
Suggested behavior: open the line as above, but also move the pointer to the newly-created line.

Rationale: Mac OS X, Emacs, and perhaps other environments implement the second behavior, which is therefore more familiar to many users.

Thanks all. Let me know if I need to clarify.

(Edit: Jupyter 4.1.0 on Mac OS X El Capitan and Safari)

Win Error 3 system cannot find the path secified

I did a fresh installation of Anaconda and simply tried to open a Jupyter notebook. It resulted in a long error saying it cannot find the config file.

FileNotFoundError: [WinError 3] the system cannot find the file path specified: 'P:\

If I run "jupyter --paths" it results in:
config:
P:\username.jupyter
C:\users\username\AppData\Local\Continuum\Anaconda3\etc\jupyter
C:\ProgramData\jupyter
data:
C:\users\username\AppData\Roaming\jupyter
C:\users\username\AppData\Local\Continuum\Anaconda3\share\jupyter
C:\ProgramData\jupyter
runtime:
C:\users\username\AppData\Roaming\jupyter\runtime

Most of these locations no not exist on my computer. I don't even have anything mapped to P? Is there a way to point jupyter to the right config file, and where is it stored?

ERROR:tornado.application:Exception in callback functools.partial

The code below runs fine in jupyter console (and also older iypthon notebooks) but not in jupyter notebook. In notebook, it produces the following error if in line "fig, ax = plt.subplots(1, 1, figsize=(x, 6))" the x is >13:

ERROR:tornado.application:Exception in callback functools.partial(<function wrap.<locals>.null_wrapper at 0xb07ebb24>)
Traceback (most recent call last):
  File "/usr/local/lib/python3.4/dist-packages/tornado/ioloop.py", line 600, in _run_callback
    ret = callback()
  File "/usr/local/lib/python3.4/dist-packages/tornado/stack_context.py", line 275, in null_wrapper
    return fn(*args, **kwargs)
  File "/usr/local/lib/python3.4/dist-packages/ipykernel/iostream.py", line 140, in <lambda>
    self.io_loop.add_callback(lambda : self._really_send(*args, **kwargs))
  File "/usr/local/lib/python3.4/dist-packages/ipykernel/iostream.py", line 150, in _really_send
    self.socket.send_multipart(msg, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/zmq/sugar/socket.py", line 236, in send_multipart
    self.send(msg, SNDMORE|flags, copy=copy, track=track)
  File "socket.pyx", line 565, in zmq.backend.cython.socket.Socket.send (zmq/backend/cython/socket.c:5263)
  File "socket.pyx", line 619, in zmq.backend.cython.socket.Socket.send (zmq/backend/cython/socket.c:5111)
  File "message.pyx", line 183, in zmq.backend.cython.message.Frame.__cinit__ (zmq/backend/cython/message.c:1682)
OverflowError: can't convert negative value to size_t

jupyter --version 4.1.0 on Linux 3.13.0-34-generic

Here's the code, any help is much appreciated:

%matplotlib inline

import matplotlib.pyplot as plt
import numpy as np

years_m = [1556, 1558, 1569, 1580, 1581, 1582, 1583, 1584, 1585, 1586, 1587, 1588, 1589, 1590, 1591, 1592, 1593, 1594, 1595, 1596, 1597, 1598, 1599, 1600, 1601, 1602, 1603, 1604, 1605, 1606, 1607, 1608, 1609, 1610, 1611, 1612, 1613, 1614, 1615, 1616, 1617, 1618, 1619, 1620, 1621, 1622, 1623, 1624, 1625, 1626, 1627, 1628, 1629, 1630, 1631, 1632, 1633, 1634, 1635, 1636, 1637, 1638, 1639, 1640, 1641, 1642, 1643, 1644, 1645, 1646, 1647, 1648, 1649, 1650, 1651, 1652, 1653, 1654, 1655, 1656, 1657, 1658, 1659, 1660, 1661, 1662, 1663, 1664, 1665, 1666, 1667, 1668, 1669, 1670, 1671, 1672, 1673, 1674, 1675, 1676, 1677, 1678, 1679, 1680, 1681, 1682, 1683, 1684, 1685, 1686, 1687, 1688, 1689, 1690, 1691, 1692, 1693, 1694, 1695, 1696, 1697, 1698, 1699, 1700, 1701, 1702, 1703, 1704, 1705, 1706, 1707, 1708, 1709, 1710, 1711, 1712, 1713, 1714, 1715, 1716, 1717, 1718, 1719, 1720, 1721, 1722, 1723, 1724, 1725, 1726, 1727, 1728, 1729, 1730, 1731, 1732, 1733, 1734, 1735, 1736, 1737, 1738, 1739, 1740, 1741, 1742, 1743, 1744, 1745, 1746, 1747, 1748, 1749, 1750, 1751, 1752, 1753, 1754, 1755, 1756, 1757, 1758, 1759, 1760, 1761, 1762, 1763, 1764, 1765, 1766, 1767, 1768, 1769, 1770, 1771, 1772, 1773, 1774, 1775, 1776, 1777, 1778, 1779, 1780, 1781, 1782, 1783, 1784, 1785, 1786, 1787, 1788, 1789, 1790, 1791, 1792, 1793, 1794, 1795, 1796, 1797, 1798, 1799, 1800, 1801, 1802, 1803, 1804, 1805, 1806, 1807, 1808, 1809, 1810, 1811, 1812, 1813, 1814, 1815, 1816, 1817, 1818, 1819, 1820, 1821, 1822, 1823, 1824, 1825, 1826, 1827, 1828, 1829, 1830, 1831, 1832, 1833, 1834, 1835, 1836, 1837, 1838, 1839, 1840, 1841, 1842, 1843, 1844, 1845, 1846, 1847, 1848, 1849, 1850, 1851, 1852, 1853, 1854, 1855, 1856, 1857, 1858, 1859, 1860, 1861, 1862, 1863, 1864, 1865, 1866, 1867, 1868, 1869, 1870, 1871, 1872, 1873, 1874, 1875, 1876, 1877, 1878, 1879, 1880, 1881, 1882, 1883, 1884, 1885, 1886, 1887, 1888, 1889, 1890, 1891, 1892, 1893, 1894, 1895, 1896, 1897, 1898, 1899, 1900, 1901, 1902, 1903, 1904, 1905, 1906, 1907, 1908, 1909, 1910, 1911, 1912, 1913, 1914, 1915, 1916, 1917, 1918, 1919, 1920, 1921, 1922, 1923, 1924, 1925, 1926, 1927, 1928, 1929, 1930, 1931, 1932, 1933, 1934, 1935, 1936, 1937, 1938, 1939, 1940, 1941, 1942, 1943, 1944, 1945, 1946, 1947, 1948, 1949, 1950, 1951, 1952, 1953, 1954, 1955, 1956, 1957, 1958, 1959, 1960, 1961, 1962, 1963, 1964, 1965, 1966, 1967, 1968, 1969, 1970, 1971, 1972, 1973, 1974, 1975, 1976, 1977, 1978, 1979, 1980, 1981, 1982, 1983, 1984, 1985, 1986, 1987, 1988, 1989, 1990, 1991, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000]
stats_m = [1.0, 1.0, 1.0, 14.0, 20.5, 23.0, 19.5, 25.0, 32.0, 28.5, 28.5, 22.5, 29.0, 22.0, 18.0, 23.0, 43.5, 32.5, 60.5, 49.5, 57.5, 40.5, 65.0, 63.5, 72.0, 96.5, 86.5, 114.0, 118.5, 152.0, 182.0, 172.0, 219.0, 189.5, 268.5, 276.0, 272.0, 230.5, 256.0, 315.0, 277.0, 313.0, 358.5, 330.5, 302.0, 320.5, 309.5, 335.5, 377.5, 366.5, 364.0, 306.5, 407.0, 413.5, 380.5, 372.0, 439.0, 415.0, 723.5, 560.0, 506.5, 542.5, 537.0, 526.0, 669.0, 674.0, 659.5, 593.0, 592.5, 644.5, 623.0, 602.5, 890.0, 1518.0, 800.5, 690.0, 697.0, 691.0, 601.0, 568.5, 607.0, 700.0, 727.0, 716.5, 698.0, 685.0, 742.0, 762.0, 921.5, 816.5, 852.5, 836.0, 867.0, 871.5, 846.0, 851.0, 833.0, 887.0, 870.0, 828.5, 929.5, 840.0, 886.0, 914.5, 928.0, 994.5, 949.5, 1136.0, 1178.5, 1092.5, 1115.5, 1032.5, 1019.0, 933.0, 965.0, 941.5, 946.0, 1134.0, 1203.0, 1121.0, 1097.0, 1116.0, 988.0, 1105.5, 1059.0, 1191.5, 1163.0, 1374.5, 1272.0, 1410.0, 1310.0, 1140.0, 1160.5, 1217.0, 1190.5, 1197.0, 1123.0, 1168.5, 1284.0, 1239.5, 1198.0, 1195.0, 1201.0, 1225.5, 1268.0, 1263.0, 1255.0, 1303.5, 1355.5, 1257.0, 1223.5, 1336.5, 1321.5, 1266.0, 1328.5, 1274.0, 1390.5, 1452.5, 1330.0, 1271.0, 1291.0, 1298.5, 1269.0, 1354.5, 1384.0, 1264.5, 2213.5, 1720.5, 1554.5, 1540.0, 1447.0, 1302.0, 1253.5, 1359.0, 1344.0, 1315.0, 1283.0, 1319.0, 1357.5, 1333.5, 1325.5, 1245.5, 1313.5, 1351.0, 1343.0, 1436.5, 1430.0, 1334.0, 1357.0, 1355.0, 1368.0, 1330.5, 1361.0, 1411.5, 1356.0, 1378.5, 1355.0, 1297.5, 1354.0, 1346.0, 1390.0, 1402.5, 1416.0, 1436.0, 1281.5, 1346.0, 1356.5, 1278.5, 1309.5, 1403.5, 1393.0, 1381.5, 1361.0, 1402.0, 1418.5, 1351.0, 1475.0, 1495.5, 1390.0, 1293.5, 1419.0, 1390.5, 1381.0, 1396.5, 1479.0, 1562.5, 1396.0, 1462.5, 1286.5, 1422.5, 1632.5, 1477.5, 1442.5, 1646.5, 1720.5, 1508.5, 1427.5, 1481.0, 1555.0, 1452.5, 1434.0, 1397.5, 1450.0, 1477.5, 1532.5, 1506.5, 1476.0, 1448.5, 1509.5, 1590.5, 1586.5, 1628.5, 1474.5, 1492.5, 1569.0, 1476.5, 1436.0, 1476.0, 1334.0, 1414.0, 1356.0, 1424.0, 1434.0, 1454.5, 1566.5, 1590.5, 1688.5, 1507.0, 1587.0, 1679.0, 1527.5, 1667.0, 1732.0, 1663.5, 1765.5, 1734.0, 1653.5, 1722.0, 1662.5, 1815.5, 1665.0, 1721.5, 1915.0, 1911.0, 1987.5, 2017.0, 2103.5, 2094.0, 2116.0, 2106.0, 2204.0, 2681.5, 3102.0, 2287.0, 2280.0, 2647.0, 2492.0, 2490.0, 2424.0, 2330.0, 2275.0, 2331.5, 2194.5, 2281.5, 2347.5, 2243.5, 2205.0, 2139.5, 2137.5, 2222.0, 2359.0, 2283.0, 2329.0, 2271.5, 2382.0, 2299.5, 2241.0, 2216.0, 2089.0, 2242.5, 2167.0, 2207.0, 2050.5, 1557.0, 91.5, 76.5, 71.0, 73.0, 62.0, 69.5, 82.0, 63.5, 64.0, 65.0, 67.0, 53.0, 48.5, 43.0, 17.0, 21.5, 20.5, 24.5, 54.0, 32.0, 36.5, 33.0, 27.0, 27.0, 21.0, 24.0, 24.5, 17.0, 23.0, 23.5, 23.0, 27.0, 25.5, 31.0, 24.5, 25.0, 32.0, 36.5, 31.5, 18.0, 16.0, 18.5, 23.0, 23.0, 34.5, 29.0, 40.0, 30.0, 29.0, 33.0, 48.5, 36.5, 21.0, 24.0, 33.0, 23.5, 21.0, 16.0, 20.0, 13.0, 21.0, 10.0, 15.0, 6.0, 3.0, 5.0, 3.0, 5.0, 9.0, 7.5, 5.0, 7.0, 4.0, 4.0, 6.0, 7.0, 4.0, 5.0, 1.0, 5.0, 4.0, 11.5, 8.0, 3.0, 6.0, 5.0, 6.0, 6.0, 2.0, 2.0, 5.0, 2.0, 5.0, 1.0, 5.0, 5.0, 2.0, 3.0, 1.0]

years_t = [1539, 1568, 1581, 1582, 1583, 1584, 1585, 1586, 1587, 1588, 1589, 1590, 1591, 1592, 1593, 1594, 1595, 1596, 1597, 1598, 1599, 1600, 1601, 1602, 1603, 1604, 1605, 1606, 1607, 1608, 1609, 1610, 1611, 1612, 1613, 1614, 1615, 1616, 1617, 1618, 1619, 1620, 1621, 1622, 1623, 1624, 1625, 1626, 1627, 1628, 1629, 1630, 1631, 1632, 1633, 1634, 1635, 1636, 1637, 1638, 1639, 1640, 1641, 1642, 1643, 1644, 1645, 1646, 1647, 1648, 1649, 1650, 1651, 1652, 1653, 1654, 1655, 1656, 1657, 1658, 1659, 1660, 1661, 1662, 1663, 1664, 1665, 1666, 1667, 1668, 1669, 1670, 1671, 1672, 1673, 1674, 1675, 1676, 1677, 1678, 1679, 1680, 1681, 1682, 1683, 1684, 1685, 1686, 1687, 1688, 1689, 1690, 1691, 1692, 1693, 1694, 1695, 1696, 1697, 1698, 1699, 1700, 1701, 1702, 1703, 1704, 1705, 1706, 1707, 1708, 1709, 1710, 1711, 1712, 1713, 1714, 1715, 1716, 1717, 1718, 1719, 1720, 1721, 1722, 1723, 1724, 1725, 1726, 1727, 1728, 1729, 1730, 1731, 1732, 1733, 1734, 1735, 1736, 1737, 1738, 1739, 1740, 1741, 1742, 1743, 1744, 1745, 1746, 1747, 1748, 1749, 1750, 1751, 1752, 1753, 1754, 1755, 1756, 1757, 1758, 1759, 1760, 1761, 1762, 1763, 1764, 1765, 1766, 1767, 1768, 1769, 1770, 1771, 1772, 1773, 1774, 1775, 1776, 1777, 1778, 1779, 1780, 1781, 1782, 1783, 1784, 1785, 1786, 1787, 1788, 1789, 1790, 1791, 1792, 1793, 1794, 1795, 1796, 1797, 1798, 1799, 1800, 1801, 1802, 1803, 1804, 1805, 1806, 1807, 1808, 1809, 1810, 1811, 1812, 1813, 1814, 1815, 1816, 1817, 1818, 1819, 1820, 1821, 1822, 1823, 1824, 1825, 1826, 1827, 1828, 1829, 1830, 1831, 1832, 1833, 1834, 1835, 1836, 1837, 1838, 1839, 1840, 1841, 1842, 1843, 1844, 1845, 1846, 1847, 1848, 1849, 1850, 1851, 1852, 1853, 1854, 1855, 1856, 1857, 1858, 1859, 1860, 1861, 1862, 1863, 1864, 1865, 1866, 1867, 1868, 1869, 1870, 1871, 1872, 1873, 1874, 1875, 1876, 1877, 1878, 1879, 1880, 1881, 1882, 1883, 1884, 1885, 1886, 1887, 1888, 1889, 1890, 1891, 1892, 1893, 1894, 1895, 1896, 1897, 1898, 1899, 1900, 1901, 1902, 1903, 1904, 1905, 1906, 1907, 1908, 1909, 1910, 1911, 1912, 1913, 1914, 1915, 1916, 1917, 1918, 1919, 1920, 1921, 1922, 1923, 1924, 1925, 1926, 1927, 1928, 1929, 1930, 1931, 1932, 1933, 1934, 1935, 1936, 1937, 1938, 1939, 1940, 1941, 1942, 1943, 1944, 1945, 1946, 1947, 1948, 1949, 1950, 1951, 1952, 1953, 1954, 1955, 1956, 1957, 1958, 1959, 1960, 1961, 1962, 1963, 1964, 1965, 1966, 1967, 1968, 1969, 1970, 1971, 1972, 1973, 1974, 1975, 1976, 1977, 1978, 1979, 1980, 1981, 1982, 1983, 1984, 1985, 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000]
stats_t = [1, 1, 4, 6, 1, 3, 20, 11, 18, 15, 13, 15, 7, 17, 12, 21, 23, 22, 25, 29, 39, 48, 45, 95, 118, 232, 243, 225, 219, 320, 271, 716, 342, 489, 582, 678, 969, 605, 587, 631, 678, 828, 768, 754, 687, 725, 716, 772, 743, 720, 747, 943, 797, 833, 789, 800, 826, 827, 884, 965, 1110, 1118, 1161, 1282, 1385, 1276, 1308, 1349, 1352, 1378, 1017, 1161, 1275, 1387, 1655, 1974, 1815, 1747, 1717, 1712, 1687, 1677, 1688, 1518, 1679, 1701, 1609, 1821, 1717, 1775, 1888, 2377, 1967, 1953, 1918, 2290, 2344, 2247, 2412, 2509, 2292, 2930, 2609, 2668, 2623, 2634, 2643, 2823, 2876, 2818, 2903, 3379, 2899, 2964, 2751, 2656, 2803, 2940, 2995, 3017, 2987, 3209, 2916, 2955, 2959, 2939, 3054, 3033, 3280, 3249, 3224, 3283, 3084, 3194, 3120, 3088, 3154, 3168, 3225, 3166, 3160, 3147, 3116, 3270, 3391, 3404, 3316, 3349, 3174, 3413, 3438, 3428, 3412, 3442, 3428, 3627, 3564, 3615, 3539, 3498, 3508, 3301, 3231, 3334, 3113, 3541, 3505, 3470, 3538, 3596, 3572, 3519, 3504, 3570, 3538, 3601, 3595, 3526, 3442, 3505, 3400, 3637, 3376, 3315, 3393, 3455, 3536, 4247, 3308, 3334, 3552, 3483, 3356, 3149, 3454, 3639, 3657, 3475, 3557, 3472, 3749, 3676, 3556, 3778, 3525, 3686, 3760, 3607, 3555, 3431, 3563, 3570, 3426, 3593, 3515, 3484, 3613, 3683, 3628, 3617, 3784, 3706, 3745, 4082, 4093, 4067, 4222, 3933, 4208, 4517, 4374, 4480, 4665, 4669, 4397, 4656, 4498, 4566, 4763, 4219, 4625, 4485, 4591, 4720, 4596, 4721, 4593, 4420, 4281, 4276, 4258, 4286, 4408, 4456, 4346, 4440, 4499, 4436, 4631, 4609, 4739, 4648, 4478, 4679, 4562, 4539, 4560, 4767, 4698, 4604, 5028, 5185, 4811, 4836, 4752, 4740, 4645, 4969, 5114, 5027, 5118, 5628, 5474, 5883, 6108, 6317, 6225, 6512, 6531, 7011, 6503, 8101, 6126, 6346, 6715, 6450, 6665, 6772, 7058, 6625, 6984, 7250, 7550, 7251, 6878, 7356, 7208, 6850, 7083, 6754, 6750, 7756, 6564, 6504, 6438, 6604, 6213, 6494, 6186, 5594, 6587, 5182, 5108, 5360, 4932, 4967, 5460, 5361, 5713, 5654, 4890, 4867, 4571, 4601, 4302, 4285, 3208, 2795, 2753, 2576, 3184, 3407, 2969, 2578, 2418, 2507, 2675, 2249, 2001, 2009, 2048, 2178, 1790, 1867, 1890, 1867, 1643, 1691, 1652, 1696, 1651, 1450, 1594, 1373, 1839, 1856, 1590, 2090, 1817, 1729, 860, 555, 522, 482, 475, 413, 407, 419, 376, 428, 385, 384, 396, 396, 401, 407, 391, 357, 332, 310, 284, 273, 207, 173, 138, 123, 131, 118, 130, 112, 133, 127, 144, 137, 137, 117, 107, 116, 108, 135, 165, 130, 115, 143, 122, 120, 105, 130, 121, 103, 140, 48]

years_s = [1508, 1582, 1583, 1584, 1592, 1594, 1595, 1596, 1597, 1598, 1599, 1600, 1601, 1602, 1603, 1604, 1605, 1606, 1607, 1608, 1609, 1610, 1611, 1612, 1613, 1614, 1615, 1616, 1617, 1618, 1619, 1620, 1621, 1622, 1623, 1624, 1625, 1626, 1627, 1628, 1629, 1630, 1631, 1632, 1633, 1634, 1635, 1636, 1637, 1638, 1639, 1640, 1641, 1642, 1643, 1644, 1645, 1646, 1647, 1648, 1649, 1650, 1651, 1652, 1653, 1654, 1655, 1656, 1657, 1658, 1659, 1660, 1661, 1662, 1663, 1664, 1665, 1666, 1667, 1668, 1669, 1670, 1671, 1672, 1673, 1674, 1675, 1676, 1677, 1678, 1679, 1680, 1681, 1682, 1683, 1684, 1685, 1686, 1687, 1688, 1689, 1690, 1691, 1692, 1693, 1694, 1695, 1696, 1697, 1698, 1699, 1700, 1701, 1702, 1703, 1704, 1705, 1706, 1707, 1708, 1709, 1710, 1711, 1712, 1713, 1714, 1715, 1716, 1717, 1718, 1719, 1720, 1721, 1722, 1723, 1724, 1725, 1726, 1727, 1728, 1729, 1730, 1731, 1732, 1733, 1734, 1735, 1736, 1737, 1738, 1739, 1740, 1741, 1742, 1743, 1744, 1745, 1746, 1747, 1748, 1749, 1750, 1751, 1752, 1753, 1754, 1755, 1756, 1757, 1758, 1759, 1760, 1761, 1762, 1763, 1764, 1765, 1766, 1767, 1768, 1769, 1770, 1771, 1772, 1773, 1774, 1775, 1776, 1777, 1778, 1779, 1780, 1781, 1782, 1783, 1784, 1785, 1786, 1787, 1788, 1789, 1790, 1791, 1792, 1793, 1794, 1795, 1796, 1797, 1798, 1799, 1800, 1801, 1802, 1803, 1804, 1805, 1806, 1807, 1808, 1809, 1810, 1811, 1812, 1813, 1814, 1815, 1816, 1817, 1818, 1819, 1820, 1821, 1822, 1823, 1824, 1825, 1826, 1827, 1828, 1829, 1830, 1831, 1832, 1833, 1834, 1835, 1836, 1837, 1838, 1839, 1840, 1841, 1842, 1843, 1844, 1845, 1846, 1847, 1848, 1849, 1850, 1851, 1852, 1853, 1854, 1855, 1856, 1857, 1858, 1859, 1860, 1861, 1862, 1863, 1864, 1865, 1866, 1867, 1868, 1869, 1870, 1871, 1872, 1873, 1874, 1875, 1876, 1877, 1878, 1879, 1880, 1881, 1882, 1883, 1884, 1885, 1886, 1887, 1888, 1889, 1890, 1891, 1892, 1893, 1894, 1895, 1896, 1897, 1898, 1899, 1900, 1901, 1902, 1903, 1904, 1905, 1906, 1907, 1908, 1909, 1910, 1911, 1912, 1913, 1914, 1915, 1916, 1917, 1918, 1919, 1920, 1921, 1922, 1923, 1924, 1925, 1926, 1927, 1928, 1929, 1930, 1931, 1932, 1933, 1934, 1935, 1936, 1937, 1938, 1939, 1940, 1941, 1942, 1943, 1944, 1945, 1946, 1947, 1948, 1949, 1950, 1951, 1952, 1953, 1954, 1955, 1956, 1957, 1958, 1959, 1960, 1961, 1962, 1963, 1964, 1965, 1966, 1967, 1968, 1969, 1970, 1971, 1972, 1973, 1974, 1975, 1976, 1977, 1978, 1979, 1980, 1981, 1982, 1983, 1984, 1985, 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000]
stats_s = [1, 1, 1, 1, 1, 5, 11, 6, 8, 3, 28, 14, 11, 13, 38, 41, 24, 79, 143, 120, 161, 216, 191, 101, 107, 155, 131, 117, 522, 929, 596, 190, 202, 156, 220, 137, 185, 257, 299, 204, 202, 213, 171, 227, 243, 623, 202, 257, 228, 242, 188, 664, 231, 273, 260, 267, 260, 311, 374, 1110, 1369, 794, 399, 364, 385, 408, 447, 432, 497, 482, 515, 983, 564, 849, 723, 750, 803, 721, 728, 590, 756, 1012, 670, 686, 735, 783, 898, 1143, 877, 852, 800, 941, 885, 849, 889, 1134, 950, 988, 915, 1016, 989, 1266, 1050, 1110, 1161, 1246, 1402, 1001, 951, 944, 1096, 1295, 1010, 1012, 1422, 1285, 1120, 1171, 1136, 1208, 1315, 1198, 1330, 1477, 1296, 1397, 1386, 1338, 1335, 1223, 1366, 1855, 1385, 1453, 1314, 1468, 1490, 1412, 1467, 1563, 1695, 1962, 1582, 1743, 1616, 1531, 1634, 1798, 1762, 1730, 1673, 2625, 2101, 2991, 2736, 1666, 1698, 1731, 1699, 1547, 1564, 1773, 1750, 1786, 1703, 1676, 1847, 1770, 1746, 1885, 2083, 1756, 1737, 1998, 1972, 1960, 1920, 2011, 2020, 2034, 1996, 2062, 2264, 2827, 2142, 2058, 2092, 1994, 2107, 1986, 1990, 2040, 2140, 2169, 2279, 2231, 2257, 2168, 2100, 2149, 2408, 2260, 2310, 2346, 2408, 2325, 2396, 2474, 2508, 2511, 2573, 2960, 2571, 2435, 2552, 2484, 2732, 3006, 2765, 2482, 2697, 2848, 2399, 2609, 2523, 2518, 2491, 2653, 2644, 2421, 2459, 2464, 2498, 2529, 2582, 2513, 2537, 2721, 2683, 2725, 2854, 2735, 2639, 2820, 2785, 2845, 2618, 2719, 3098, 2790, 2682, 2771, 2922, 2700, 2782, 2743, 3270, 2788, 3087, 3048, 2831, 3303, 2838, 2887, 2763, 2809, 3160, 3119, 3174, 3229, 3339, 3372, 3281, 3304, 4799, 3773, 3985, 3888, 3806, 3847, 3684, 4611, 3850, 3605, 3468, 3801, 3781, 3849, 3781, 3916, 4023, 4717, 4156, 4167, 3943, 4233, 4430, 4306, 4523, 4533, 4281, 5206, 4430, 4494, 4297, 4191, 4066, 3889, 4098, 3904, 4257, 4657, 4104, 4096, 3856, 3621, 3850, 3501, 3566, 4119, 3683, 3470, 3506, 3694, 3325, 3204, 2988, 2893, 2689, 2831, 2380, 2255, 2218, 2195, 2147, 2104, 1782, 1755, 1709, 1654, 1465, 1247, 1258, 1193, 1034, 1079, 1054, 970, 992, 974, 885, 861, 880, 897, 899, 980, 1096, 795, 716, 560, 569, 544, 536, 478, 488, 403, 380, 402, 381, 352, 406, 275, 242, 208, 246, 176, 131, 127, 142, 139, 128, 131, 112, 84, 99, 96, 87, 92, 98, 100, 75, 66, 108, 83, 92, 83, 63, 78, 72, 54, 34, 51, 42, 27, 16, 20, 15, 16, 18, 12, 15, 2]

fig, ax = plt.subplots(1, 1, figsize=(15, 6))
ax.spines['top'].set_visible(False)
ax.spines['bottom'].set_visible(False)
ax.spines['right'].set_visible(False)
ax.spines['left'].set_visible(False)
ax.get_xaxis().tick_bottom()
ax.get_yaxis().tick_left()

plt.xticks(range(1500, 2000, 25))
plt.title('Gesamtzahl der Eintraege')

# Plot data
plt.plot(years_m, stats_m, 'b')
plt.plot(years_t, stats_t, 'g')
plt.plot(years_s, stats_s, 'r') 

Jupyter cannot make geochart with googleVIS

Using this works in R console:

plot(G)

but when typed into a cell in jupyter I get:

starting httpd help server ... done
and no graph.

So here is what I did. Into Anaconda 2.7.11, I installed R essentials

conda install -c r r-essentials

started up jupyter

notebook jupyter

installed needed reqs, XML and googleVIS, by typing this into a cell

options(repos=structure(c(CRAN="https://cloud.r-project.org/")))
install.packages('googleVis')
install.packages('XML')

typed this code into a cell

suppressPackageStartupMessages(library(googleVis))
library(googleVis)
library(XML)
url <- "http://en.wikipedia.org/wiki/List_of_countries_by_credit_rating"
x <- readHTMLTable(readLines(url), which=3)
levels(x$Rating) <- substring(levels(x$Rating), 4, 
                            nchar(levels(x$Rating)))
x$Ranking <- x$Rating
levels(x$Ranking) <- nlevels(x$Rating):1
x$Ranking <- as.character(x$Ranking)
x$Rating <- paste(x$Country, x$Rating, sep=": ")
G <- gvisGeoChart(x, "Country", "Ranking", hovervar="Rating",
                options=list(gvis.editor="S&P",
                             projection="kavrayskiy-vii",
                             colorAxis="{colors:['#91BFDB', '#FC8D59']}"))

then

plot(G)

This code works fine when typed directly into an R console and makes a nice map. But something is causing jupyter to choke on starting a server. I guess since jupyter itself is web page running in a server there is some sort of problem with a web page starting a server? GoogleVIS needs to start the http do server that I think is built into R. But I don't know how to test whether this functionality exists in jupyter or the R essentials that I installed into Python.

Additional Checkpoint Metadata

Hey again,

Some background: As I've mentioned a few times, I'm working on a custom checkpoint solution. One thing that I want to add is a "commit message" so that users can provide more context for the actual checkpoint.

My question has 2 parts:

  1. I need to be able to give the user a way to provide this message. Is there a way to modify the checkpoint creation behavior (for example, if i click File > Save and Checkpoint) so that I can bring up a dialog box and prompt the user?
  2. I want to show this commit message in the checkpoint dropdown (File > Revert to Checkpoint). Is there a way to modify the representation of the checkpoints in this menu? I found this part of the templates which seems to indicate that its hardcoded, but I'm probably missing something.

Cannot POST to files, use PUT instead

As I mentioned in #9, i'm working on a RestfulContentManager (very much a WIP) that consumes an external API to retrieve files/directories. When I try to create a new file in the browser, I run into the following error message:

screen shot 2016-04-06 at 2 30 56 pm

However, I'm not sure how/why the method used by the client has changed. The manager does POST when interacting with the API but I was under the impression that the /files mentioned in the error is on the jupyter server (which I don't think I changed), not the external api. Does someone by chance know what could have caused this?

Sorry if there's not enough information to go off of, let me know if there's anything else you need.

bug in using ipython remotly from amazon AWS

I try to use ipython remotly from AWS server
I only can use ~ 3 minut
but after 3 minutes session is closed
sandercode/.Timeout, server 54.82.aa.bbb not responding.
[W 15:05:27.008 NotebookApp] WebSocket ping timeout after 119965 ms.

Cannot change Jupyter QtConsole font size (ipython_config.py)

OS: Windows 7 x64
Jupyter 4.1.0

I can't change the default font size for ipython qtconsole.

So far, I've tried creating .ipython/profile_default/ipython_config.py

c = get_config()

c.IPythonWidget.font_size = 24
c.IPythonWidget.font_family = 'Consolas'

But this does not change the font size. I have to manually zoom in using Ctrl-Shift-+ (that should be fixed as well).

(I confirmed that the file is being run by ipython. When I add deliberate syntax errors, they show up in Command Prompt, NOT qtconsole)

syntax highlighting for other (non-python) languages

Is there a way to enable syntax highlighting for non-Python languages in a notebook? I frequently use %%Ruby cell magic for work and this feature would be very helpful and happened automatically in a previous version of the notebook. Thanks for your help.

Notebook widget rendering documentation, or tutorial for writing custom widgets?

Hello Jupyter Team,

I would like to write a custom Jupyter Notebook widget: an HTML table with a grid of checkboxes that map interactively to a Python datastructure of booleans.

So far, the docs I have found are [1][2], but these only explain the general project structure, not the way of thinking about Notebook widgets. How does the rendering of widgets work? I have found a JS render function in the widget_bool.js [3]. Does this way of rendering mean that I cannot just render a Checkbox in HTML, then concatenate a HTML string for the table, and output it? Do I need to build the table in Javascript using jQuery appendTo()?

I also found qgrid [4], which seems to be a static table without interactive components. Is this a good base for extending it with Checkboxes?

Finally, what is the standard way of including static HTML resources (like CSS files) with an extension? Based on the docs [1][2], I believe they should go into a server extension. However, I could not get this example [5] to run, nbextension install worked, but nbextension enable said:

(my_extension)[david@hopper tmp]$ jupyter nbextension enable my_fancy_module --sys-prefix    
Enabling notebook extension my_fancy_module...
      - Validating: problems found:
        - require?  X my_fancy_module

Appreciate your help or pointers in any of these issues!

Thanks,
David

[1] http://jupyter-notebook.readthedocs.org/en/latest/extending/frontend_extensions.html#installing-and-enabling-extensions
[2] http://jupyter-notebook.readthedocs.org/en/latest/extending/handlers.html#writing-a-notebook-server-extension
[3] .../python3.5/site-packages/ipywidgets/static/widgets/js/widget_bool.js - can't seem to find it on github.
[4] https://github.com/quantopian/qgrid
[5] http://jupyter-notebook.readthedocs.org/en/latest/examples/Notebook/Distributing%20Jupyter%20Extensions%20as%20Python%20Packages.html#Example---Server-extension-and-nbextension

auto indent when using cell magic (Ruby)

I'm experiencing annoying indentation behavior when using cell magic. If I edit a line that was indented it will become left justified. However, this only happens when editing or appending the end of the LOC. For example, adding .to_s to the puts statement...

%%ruby

# do stuff
objs.each do |obj|

    puts obj.name

end

...becomes

%%ruby

# do stuff
objs.each do |obj|

puts obj.name.to_s

end

I'm not sure if this is a setting that could be changed or if this is a bug. Thanks for your help.

URL rerouting for user connecting to another users notebook

I am using JupyterHub 0.5, running behind an Nginx reverse proxy in a subdirectory (https://myhost/jupyter/ redirects to the JupyterHub process running on localhost). I am using a custom authenticator that gets authentication from Nginx-added headers. For calls to my custom authenticator with a 'next' url argument, it also replaces the /user/_username _with the appropriate name (from Nginx headers) and redirects.

I have three users -
joe (logged in)
bob (logged in)
jane (not logged in)

When I try to go to a notebook url with a user that is not logged in, the process redirects me to the login url with a 'next' argument, then the custom authenticator redirects me appropriate. For instance if joe goes to https://myhost/jupyter/user/**jane**/notebooks/notebook_dir/example.ipynb, then I get the following redirects --

-- Auth credentials of user Joe
(REST method, url, response code)
GET https://myhost/jupyter/user/**jane**/notebooks/notebook_dir/example.ipynb - 302
GET https://myhost/jupyter/hub/user/**jane**/notebooks/notebook_dir/example.ipynb - 302
GET https://myhost/jupyter/hub/nginx_login?next=%2Fjupyter%2Fhub%2Fuser%2F**jane**%2Fnotebooks%2Fnotebook_dir%2Fexample.ipynb - 302
GET https://myhost/jupyter/hub/user/**joe**/notebooks/notebook_dir/example.ipynb - 302
GET https://myhost/jupyter/user/**joe**/notebooks/notebook_dir/example.ipynb - 304

I don't really know why I get those bounces around from /user/ to /hub/user and back, but in any case, the redirect works like I want it to.

When I try to go to a notebook url with a user that is logged in (but doesn't match my account), the process never ends up redirecting me to the login url. This is what I get -

-- Auth credentials of user Joe
(REST method, url, response code)
GET https://myhost/jupyter/user/**bob**/notebooks/notebook_dir/example.ipynb - 302
GET https://myhost/jupyter/hub/?next=%2Fjupyter%2Fuser%2F**bob**%2Fnotebooks%2Fnotebook_dir%2Fexample.ipynb - 302
GET https://myhost/jupyter/user/**joe** - 302
GET https://myhost/jupyter/user/**joe**/tree/opt/jupyter/notebooks - 304

The last place that it drops me is interesting because that's the location that my custom authenticator sends a user to when there's no "next" url argument, but I don't see any redirects to /nginx_login in that series of 302's.

I am hoping someone can help me understand the series of handlers, especially what handles the request to https://myhost/jupyter/hub, since I don't see /hub in the default handlers for base.py or pages.py. Why is the behavior seeming to be different when I try to go to a /user/_username _of someone who is logged into the hub vs someone who is not?

Thanks so much in advance.

how to set global variable when cell starts executing

How can one reset a variable when any cell executes? I trapped the "pre_run_cell" event but this does not appear to have access to the variables in the jupyter session.

Specifically....I wrote the code below to print all output from plt.plot in a grid format with 3 charts per row rather than each chart taking up a whole row. I import it into jupyter and it works fine on first execution. However if it showed 4 charts then the next time I run the cell or another cell it starts in position 5. I want to reset the position (gplot_n) to 1 on each execution.

# puts plt.plot results in a grid r*c
gplot_r=20
gplot_c=3
gplot_n = 1
mpl.rcParams['figure.figsize'] = (gplot_c*4, gplot_r*4)
def plot_decorator(method):
    def decorated(self=None):
        global gplot_n
        plt.subplot(gplot_r,gplot_c,gplot_n)
        gplot_n = gplot_n + 1
        if gplot_n > gplot_r * gplot_c:
            gplot_n = 1
        return method(self)
    return decorated
plt.plot = plot_decorator(plt.plot)

Calling a JS function from a python script repetitively may be causing a memory leak?

I execute a python script in a notebook cell, which calls a JS function repetitively. It is WebGL application and a long code. Just to keep it simple, it looks like the folowing. The JSfunction updates an attribute of an object, and then the whole graphic is redrawn. Without the update, there is no memory increase.

while True:
        jso = Javascript("someJSfunction()")
        IPython.display.display_javascript(jso)                // to be able to see the visual output

When I look at the memory usage from the Windows Task Manager, I see memory usage is increasing. At first it goes up, and then down (posssibly garbage cleaning), then up, and down again; but after a kind of "threshold", it goes up, and never comes back, resulting at performance degredation.

I thought multiple jso's keep up building and causing the memory leak. Added a new line at the bottom of the loop - del jso - to delete it after display. Script failed to work, and I understand it is not advised tod elete an object, and let the garbage collector do it, but still I am suspicious.

Then I tried several other ways, eliminating the jso variable, by combining the two lines into one:

IPython.display.display_javascript(Javascript("someJSfunction()"))

I got the same problem. Then somewhere I saw there is a get_ipython().runcode function, and tried:

get_ipython(runcode('IPython.display.display_javascript(Javascript("someJSfunction()"))') with same result. ( I am not sure whether executing the code directly in the cell, or with runcode option is faster).

Is it really abusing the Javascript command, to use it over and over again; not intended and not suggested for that kind of usage? Or is it an expected result to have an increasing memory due to ... ?
Any suggestions to do it more effectively?

Using customized lexer.

I am developing a kernel for a language that is not available on pygments. It would be nice if Jupyter could accept a Lexer directly from the language definition, such as

 language_info = {
        "pygments_lexer": MyLexer(),
    }

Widgets fail to load with "Widget Javascript not detected. It may not be installed properly."

I seem to have messed up my notebook installation, and unfortunately uninstalling and reinstalling doesn't seem to fix things.

Any suggestions for debugging?

Here's my pip list:

alabaster (0.7.7)
appnope (0.1.0)
astropy (1.1)
Babel (2.2.0)
backports.shutil-get-terminal-size (1.0.0)
cycler (0.9.0)
Cython (0.24b0)
decorator (4.0.9)
docutils (0.12)
entrypoints (0.2.1)
fastcache (1.0.2)
Flask (0.10.1)
frosted (1.4.1)
galanyl (0.1.6, /Users/goldbaum/Documents/galaxy_analysis)
gnureadline (6.3.3)
h5py (2.5.0)
ipdb (0.8.1)
ipykernel (4.3.1)
ipython (4.2.0)
ipython-genutils (0.1.0)
ipywidgets (5.1.2)
itsdangerous (0.24)
Jinja2 (2.8)
jsonschema (2.5.1)
jupyter (1.0.0)
jupyter-client (4.2.2)
jupyter-console (4.1.1)
jupyter-core (4.1.0)
MarkupSafe (0.23)
matplotlib (1.5.1)
mccabe (0.3.1)
mistune (0.7.2)
mpi4py (2.0.0)
nbconvert (4.2.0)
nbformat (4.0.1)
networkx (1.10)
nose (1.3.7)
nose-timer (0.5.0)
notebook (4.2.0)
numexpr (2.4.6)
numpy (1.10.4)
numpydoc (0.5)
path.py (8.1.2)
pep8 (1.5.7)
pexpect (4.0.1)
pickleshare (0.7.2)
pies (2.6.7)
Pillow (3.1.0)
Pint (0.6)
pip (8.1.1)
ptyprocess (0.5.1)
pyds9 (1.8.1)
Pygments (2.1.3)
pyinstrument (0.13.1)
pymongo (3.2.2)
pyparsing (2.0.7)
pyregion (1.1.4)
python-dateutil (2.4.2)
python-hglib (1.9)
pytz (2015.7)
pyzmq (15.2.0)
qtconsole (4.2.1)
regolith (0.1, /Users/goldbaum/Documents/regolith)
RunNotebook (0.1, /Users/goldbaum/Documents/RunNotebook)
scikit-image (0.11.3)
scipy (0.16.1)
setuptools (20.10.1)
simplegeneric (0.8.1)
six (1.10.0)
snowballstemmer (1.2.1)
Sphinx (1.4a0.dev20160128, /Users/goldbaum/Documents/sphinx)
sphinx-bootstrap-theme (0.4.8)
sphinx-rtd-theme (0.1.9)
sympy (0.7.6.1)
tabulate (0.7.5)
termcolor (1.1.0)
terminado (0.6)
tinydb (3.1.3)
tornado (4.3)
traitlets (4.2.1)
wcsaxes (0.6)
Werkzeug (0.11.5)
wheel (0.26.0)
widgetsnbextension (1.2.1)
yt (3.3.dev0, /Users/goldbaum/Documents/yt-hg-python3)

Running a R code cell indefinetely

Hello,

I'm working on a project that requires a Jupyter R Notebook cell to be executed periodically, refreshing its output (a plot made on ggplot). What's the best way to overcome this problem in Jupyter?

I tried creating an infinite loop in the R code, however, I wasn't able to find a way to clear the output cell, thus, the output cell keeps accumulating many plots (instead of just showing one).

Thank you,

Marcos

Importing Keras does not work

I am unable to run some simple code inside jupyter notebook using Keras that works perfectly well in the normal command interepreter.

Running this works fine:

import keras
print "Hello world"
>>> Hello world

But running this never executes, or never finishes executing:

import keras
from keras.models import Sequential
print "Hello world"

It remains stuck on "In: [*]", with the CPU pretty much idle, so it doesn't seem to be processing anything.

If I run the same code in ipython I get this output:

WARNING (theano.configdefaults): g++ not detected ! Theano will be unable to execute optimized C-implementations (for both CPU and GPU) and will default to Python implementations. Performance will be severely degraded. To remove this warning, set Theano flags cxx to an empty string.
WARNING (theano.tensor.blas): Failed to import scipy.linalg.blas, and Theano flag blas.ldflags is empty. Falling back on slower implementations for dot(matrix, vector), dot(vector, matrix) and dot(vector, vector) (DLL load failed: The specified module could not be found.)

But it works as expected. Do you know what could be causing this problem? Thanks!

python2 kernel ImportError «jupyter_client»

Hi,
I am running jupyter on a linux arch. I have both python2 and python3, ipython2 and ipython3 installed.

jupyter-kernelspec list Available kernels: python3 /usr/local/share/jupyter/kernels/python3 python2 /usr/share/jupyter/kernels/python2

and when I tried to execute the python2 kernel:
[I 16:36:02.191 NotebookApp] KernelRestarter: restarting kernel (4/5) WARNING:root:kernel 0b399212-5976-4fb6-b812-825a46fd35c2 restarted /usr/lib/python2.7/site-packages/IPython/kernel/__init__.py:13: ShimWarning: TheIPython.kernelpackage has been deprecated. You should import from ipykernel or jupyter_client instead. "You should import from ipykernel or jupyter_client instead.", ShimWarning) Traceback (most recent call last): File "<string>", line 1, in <module> File "/usr/lib/python2.7/site-packages/IPython/kernel/__init__.py", line 31, in <module> from ipykernel import comm, inprocess File "/usr/lib/python2.7/site-packages/ipykernel/__init__.py", line 2, in <module> from .connect import * File "/usr/lib/python2.7/site-packages/ipykernel/connect.py", line 18, in <module> import jupyter_client ImportError: No module named jupyter_client

Seems that there is no jupyter_client module for python2.7 ???

Am I doing anything wrong ?

Customizing jupyterhub routing

I'm trying to host jupyterhub "underneath" a specific url (ie, /jupyter ) however jupyterhub seems to be directing traffic to a few fixed routes like /login, /logout, and /hub. What is the easiest way to change these to accommodate a different url structure?

Reading HTML Files

Hello

First let me say I have been using Jupyter for use with Python and occasionally JS, and love it so far.

I'm using google chrome for my browser. I have two related issues:

  1. When I try to open up a HTML file via Jupyter's local host (and using the Jupyter GUI), it doesn't open it in HTML format, it just shows me the raw HTML code. Is there someway to tell Jupyter I only want the HTML view?

I read Jupyter has certain 'trust' measures. As far as I know though, there seems to be know way to 'trust' a html file so that it loads. Again I'm not sure if that's the underlying issue.

Obviously, viewing the raw code is helpful, but sometimes I would like to leverage having a local host like Jupyter's at my disposal for testing out how a webpage will look and function. Is it possible to do such a thing?

Second issue is as follows:

  1. Whenever I run Jupyter and think I have a local host going (which I know I do to some extent because I can run certain python libraries that require HTTP protocol within Jupyter), however when I click on an html file (in Jupyter's local host home directory, but not using Jupyter's GUI, in otherwords just opening the containing folder and hitting the enter key on it) it doesn't load properly in the browser. In the address bar it just shows the real path like "C:\Users\Me\file.html" the html doesn't seem to know it can use my local host. As a result, the http protocol is not brought to bear and certain errors occur like when I try to read data from a csv or json when I check developer's tools.

So, I'm not sure if Jupyter is creating a local host for only notebook files and not html files? or did I not point something the right way?

Offline installations.....Possible?

Hi Everyone,

I tried posting this via sending an email to [email protected], but it bounced, so I apologize if this isn't the correct venue.

I am trying to install jupyterhub in an enterprise environment on RHEL
6.7 systems with no connectivity.

I've read through all of the docs and don't see a way to do an "offline"
installation. Is there a way to perform an installation without having
pip and npm or git reach out to the internet?

I did see some notes about anaconda, but that looked to only be for the client side, correct me if i'm wrong.

Additionally, everything seemed to be focused towards Ubuntu, any rpm based instructions?

Thanks

Thomas

Unable to start Python3 kernel - no errors?

I'm trying to set up a Jupyter server. The environment is clean (ubuntu 16.04 docker image), and all dependencies are the latest from PIP. Note that python2 is not present - just python3.

An strace indicates that the kernel child process exists with status 1. I've run both the notebook and the kernel in --debug mode. Neither the strace (too big to paste here) nor the log messages give any indication of why the kernel exits this way.

I'm having a hard time debugging this, could anyone point me to where I could look next?

[D 12:37:01.274 NotebookApp] 200 GET /api/sessions?_=1467375836539 (172.20.0.1) 0.84ms
[D 12:37:01.281 NotebookApp] 200 GET /api/terminals?_=1467375836540 (172.20.0.1) 0.72ms
[D 12:37:01.332 NotebookApp] 200 GET /api/contents?type=directory&_=1467375836541 (172.20.0.1) 1.17ms
[D 12:37:04.157 NotebookApp] Using contents: services/contents
[D 12:37:04.158 NotebookApp] 304 GET /notebooks/A%20test%20notebook.ipynb (172.20.0.1) 2.23ms
[D 12:37:04.317 NotebookApp] 304 GET /custom/custom.css (172.20.0.1) 1.26ms
[D 12:37:04.326 NotebookApp] 304 GET /static/components/MathJax/MathJax.js?config=TeX-AMS_HTML-full,Safe&delayStartupUntil=configured (172.20.0.1) 1.36ms
[D 12:37:04.427 NotebookApp] 304 GET /static/components/MathJax/config/TeX-AMS_HTML-full.js?rev=2.6.0 (172.20.0.1) 1.07ms
[D 12:37:04.678 NotebookApp] 304 GET /custom/custom.js?v=20160701113721 (172.20.0.1) 1.83ms
[D 12:37:04.700 NotebookApp] 304 GET /static/components/MathJax/config/Safe.js?rev=2.6.0 (172.20.0.1) 0.82ms
[D 12:37:04.719 NotebookApp] 200 GET /api/config/notebook?_=1467376624469 (172.20.0.1) 3.03ms
[D 12:37:04.733 NotebookApp] 200 GET /api/config/common?_=1467376624470 (172.20.0.1) 2.54ms
[D 12:37:04.780 NotebookApp] Found kernel python3 in /usr/local/share/jupyter/kernels
[D 12:37:04.781 NotebookApp] Found kernel python3 in /usr/local/share/jupyter/kernels
[D 12:37:04.782 NotebookApp] 200 GET /api/kernelspecs (172.20.0.1) 2.35ms
[W 12:37:04.800 NotebookApp] Notebook A test notebook.ipynb is not trusted
[D 12:37:04.801 NotebookApp] 200 GET /api/contents/A%20test%20notebook.ipynb?type=notebook&_=1467376624471 (172.20.0.1) 3.14ms
[D 12:37:04.926 NotebookApp] Found kernel python3 in /usr/local/share/jupyter/kernels
[D 12:37:04.927 NotebookApp] Starting kernel: ['/usr/bin/python3', '-m', 'ipykernel', '-f', '/root/.local/share/jupyter/runtime/kernel-d1587fca-52ab-48a9-8b90-ec8d41afb4da.json', '--debug', '--no-secure']
[D 12:37:04.931 NotebookApp] Connecting to: tcp://127.0.0.1:53650
[I 12:37:04.932 NotebookApp] Kernel started: d1587fca-52ab-48a9-8b90-ec8d41afb4da
[D 12:37:04.932 NotebookApp] Kernel args: {'kernel_name': 'python3', 'cwd': '/notebooks'}
[D 12:37:04.933 NotebookApp] 201 POST /api/sessions (172.20.0.1) 16.93ms
[D 12:37:04.935 NotebookApp] 200 GET /api/contents/A%20test%20notebook.ipynb/checkpoints?_=1467376624472 (172.20.0.1) 1.24ms
[D 12:37:04.937 NotebookApp] Using contents: services/contents
[W 12:37:04.938 NotebookApp] 404 GET /nbextensions/widgets/notebook/js/extension.js?v=20160701113721 (172.20.0.1) 2.17ms referer=https://at-qa-jupyter.ondergetekende.nl/notebooks/A%20test%20notebook.ipynb
[D 12:37:04.967 NotebookApp] 304 GET /static/components/MathJax/jax/output/HTML-CSS/fonts/STIX-Web/fontdata.js?rev=2.6.0 (172.20.0.1) 1.19ms
[D 12:37:04.979 NotebookApp] 304 GET /static/components/MathJax/extensions/Safe.js?rev=2.6.0 (172.20.0.1) 1.73ms
[D 12:37:05.077 NotebookApp] Initializing websocket connection /api/kernels/d1587fca-52ab-48a9-8b90-ec8d41afb4da/channels
[D 12:37:05.081 NotebookApp] Requesting kernel info from d1587fca-52ab-48a9-8b90-ec8d41afb4da
[D 12:37:05.081 NotebookApp] Connecting to: tcp://127.0.0.1:51644
[IPKernelApp] IPYTHONDIR set to: /root/.ipython
[IPKernelApp] Using existing profile dir: '/root/.ipython/profile_default'
[IPKernelApp] Searching path ['/notebooks', '/root/.ipython/profile_default', '/usr/local/etc/ipython', '/etc/ipython'] for config files
[IPKernelApp] Attempting to load config file: ipython_config.py
[IPKernelApp] Looking for ipython_config in /etc/ipython
[IPKernelApp] Looking for ipython_config in /usr/local/etc/ipython
[IPKernelApp] Looking for ipython_config in /root/.ipython/profile_default
[IPKernelApp] Looking for ipython_config in /notebooks
[IPKernelApp] Attempting to load config file: ipython_kernel_config.py
[IPKernelApp] Looking for ipython_kernel_config in /etc/ipython
[IPKernelApp] Looking for ipython_kernel_config in /usr/local/etc/ipython
[IPKernelApp] Looking for ipython_kernel_config in /root/.ipython/profile_default
[IPKernelApp] Looking for ipython_kernel_config in /notebooks
[IPKernelApp] Loading connection file /root/.local/share/jupyter/runtime/kernel-d1587fca-52ab-48a9-8b90-ec8d41afb4da.json
[IPKernelApp] WARNING | Message signing is disabled.  This is insecure and not recommended!
[IPKernelApp] Starting the kernel at pid: 325
[IPKernelApp] shell ROUTER Channel on port: 51644
[IPKernelApp] stdin ROUTER Channel on port: 37236
[IPKernelApp] control ROUTER Channel on port: 53650
[IPKernelApp] iopub PUB Channel on port: 41426
[IPKernelApp] Heartbeat REP Channel on port: 39497
[IPKernelApp] Writing connection file: /root/.local/share/jupyter/runtime/kernel-d1587fca-52ab-48a9-8b90-ec8d41afb4da.json
[IPKernelApp] To connect another client to this kernel, use:
[IPKernelApp]     --existing kernel-d1587fca-52ab-48a9-8b90-ec8d41afb4da.json
[IPKernelApp] Loading IPython extensions...
[IPKernelApp] Loading IPython extension: storemagic
[I 12:37:07.934 NotebookApp] KernelRestarter: restarting kernel (1/5)

However, I can't see any errors

Is it possible to add something to indicate the server isn't running on the notebook dashboard?

(Apologies I can't provide details on when the server failed re: windows and versions etc or simply user error) but, assuming the dashboard hasn't been refreshed, could some error notification be added to the browser to indicate the server is no longer available? The errors when trying to do something like create a new notebook are not super informative ("error") and for people interacting with it from a launcher like Anaconda's Navigator, the CLI is not an obvious signal.

Or even just change the error message when making a new notebook when it's in that state to something more legible and actionable than "error"?

It came up during a training course with some frustrated students looking at an interface that looked fine but was no longer active.

Cheers.

Source install fails on Windows

Running python setup.py js css fails for me with the below error:

[py-dev] C:\dev\code\notebook (master) ([email protected])
λ python setup.py js css

<SNIP>

running css
> npm run build:css

> [email protected] build:css C:\dev\code\notebook
> concurrent 'npm run build:css:ipython' 'npm run build:css:style'

[0] 'np' is not recognized as an internal or external command,
[0] operable program or batch file.
[1] 'run' is not recognized as an internal or external command,
[1] operable program or batch file.
[2] The filename, directory name, or volume label syntax is incorrect.
[3] 'np' is not recognized as an internal or external command,
[3] operable program or batch file.
[4] 'run' is not recognized as an internal or external command,
[4] operable program or batch file.
[5] The filename, directory name, or volume label syntax is incorrect.
[4] run exited with code 1
[3] np exited with code 1
[2] build:css:ipython' exited with code 1
[1] run exited with code 1
[0] np exited with code 1
[5] build:css:style' exited with code 1

npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "build:css"
npm ERR! node v6.2.0
npm ERR! npm  v3.8.9
npm ERR! code ELIFECYCLE
npm ERR! [email protected] build:css: `concurrent 'npm run build:css:ipython' 'npm run build:css:style'`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build:css script 'concurrent 'npm run build:css:ipython' 'npm run build:css:style''.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the jupyter-notebook-deps package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     concurrent 'npm run build:css:ipython' 'npm run build:css:style'
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs jupyter-notebook-deps
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls jupyter-notebook-deps
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\dev\code\notebook\npm-debug.log
Traceback (most recent call last):
  File "setup.py", line 199, in <module>
    main()
  File "setup.py", line 196, in main
    setup(**setup_args)
  File "C:\Python\envs\py-dev\lib\distutils\core.py", line 148, in setup
    dist.run_commands()
  File "C:\Python\envs\py-dev\lib\distutils\dist.py", line 955, in run_commands
    self.run_command(cmd)
  File "C:\Python\envs\py-dev\lib\distutils\dist.py", line 974, in run_command
    cmd_obj.run()
  File "C:\dev\code\notebook\setupbase.py", line 412, in run
    run(['npm', 'run', 'build:css'])
  File "C:\dev\code\notebook\setupbase.py", line 333, in run
    return check_call(cmd, *args, **kwargs)
  File "C:\Python\envs\py-dev\lib\subprocess.py", line 584, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['npm', 'run', 'build:css']' returned non-zero exit status 1

Any idea what is wrong? Should this work on Windows?

NB: The npm-debug.log doesn't exist.

GitHub LaTeX "Math Processing Error" when rendering Jupyter notebooks

Description of specific issue

Mathematical equations, in both inline and display modes,
render correctly when viewed in local browser --
however, when a Jupyter notebook with such equations
is viewed at GitHub the following message is generated:
"Math Processing Error"

The issue can be traced solely to GitHub since
a notebook's source commited to a GH repo viewed through
http://nbviewer.jupyter.org renders the math correctly.

Expected behavior

Here's the correct renderings via
http://nbviewer.jupyter.org/github/rsvp/fecon235/blob/master/nb/qdl-spx-earn-div.ipynb
while noticing the actual source code resides at GitHub.

Observed behavior

Here's the problematic rendering at GitHub:
https://github.com/rsvp/fecon235/blob/master/nb/qdl-spx-earn-div.ipynb
where all the LaTeX math is replaced by this message,
"Math Processing Error".

Steps towards resolution?

It is not clear how (or if) LaTeX is being rendered at GitHub.

[ Added further details: https://github.com/rsvp/fecon235/issues/3 ]

I use apache2 to proxy , but many function was blocked

I run

jupyter notebook --ip=* --NotebookApp.password='sha1:xxxxxxxxxxxxxx' --no-browser

And make a proxy by apache2,and explore it,many functions were blocked,

for example,when i shutdown a kernel.

It said

[W 15:10:30.385 NotebookApp] Blocking Cross Origin API request.  Origin: http://mydomain, Host: 127.0.0.1:8888
[W 15:10:30.388 NotebookApp] 404 DELETE /api/sessions/73a652a5-3eca-4039-8ad0-e14dd5313fdf (127.0.0.1) 2.65ms referer=http://mydomain/tree

What should I do?

What options exist for extending markdown cells to support reports on multiple kernels? [Was: Can customized kernel hijack markdown cells?]

I am working on a kernel where the underlying workflow system can generate reports based on results of other steps. For example,

! ## samples
! There are ${nsamples} samples with names ${sample_names}

would generate

## samples
There are 2 samples with names sampleA, sampleB

I would like to store these report lines in jupyter as markdown cells but currently the kernel can only handle script cells through do_execute. Is there anyway that I can hijack markdown cell, change its content (expand ${samples} etc) before it is rendered?

kernel can't connect on remote notebook server

I've tried to set up a remote notebook server and am having mixed success.

I tried to follow the steps here

I created the ssl certificate, setup a password, opened up all IPs, set a port, etc.

I am able to log in to the server using the password I set up. I can then navigate folders/files. When I try to open or create a new notebook I get that that the kernel tries to connect a number of times and then gives up.

The output of the shell console where I started jupyter notebook --verbose looks like this:

~|⇒ jupyter notebook --debug
[D 00:26:59.718 NotebookApp] Searching ['/home/sglyon', '/home/sglyon/.jupyter', '/home/sglyon/anaconda3/etc/jupyter', '/usr/local/etc/jupyter', '/etc/jupyter'] for config files
[D 00:26:59.719 NotebookApp] Looking for jupyter_config in /etc/jupyter
[D 00:26:59.719 NotebookApp] Looking for jupyter_config in /usr/local/etc/jupyter
[D 00:26:59.719 NotebookApp] Looking for jupyter_config in /home/sglyon/anaconda3/etc/jupyter
[D 00:26:59.719 NotebookApp] Looking for jupyter_config in /home/sglyon/.jupyter
[D 00:26:59.719 NotebookApp] Looking for jupyter_config in /home/sglyon
[D 00:26:59.719 NotebookApp] Looking for jupyter_notebook_config in /etc/jupyter
[D 00:26:59.719 NotebookApp] Looking for jupyter_notebook_config in /usr/local/etc/jupyter
[D 00:26:59.719 NotebookApp] Looking for jupyter_notebook_config in /home/sglyon/anaconda3/etc/jupyter
[D 00:26:59.720 NotebookApp] Looking for jupyter_notebook_config in /home/sglyon/.jupyter
[D 00:26:59.720 NotebookApp] Loaded config file: /home/sglyon/.jupyter/jupyter_notebook_config.py
[D 00:26:59.722 NotebookApp] Looking for jupyter_notebook_config in /home/sglyon
[I 00:27:00.003 NotebookApp] Serving notebooks from local directory: /home/sglyon
[I 00:27:00.004 NotebookApp] 0 active kernels
[I 00:27:00.004 NotebookApp] The Jupyter Notebook is running at: https://[all ip addresses on your system]:9999/
[I 00:27:00.004 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[D 00:27:04.578 NotebookApp] 200 GET /api/terminals?_=1461299346902 (MYIPADDRESS) 1.17ms
[D 00:27:04.584 NotebookApp] 200 GET /api/sessions?_=1461299346901 (MYIPADDRESS) 0.88ms
[D 00:27:04.605 NotebookApp] 200 GET /api/contents?type=directory&_=1461299346903 (MYIPADDRESS) 7.11ms
[W 00:27:08.516 NotebookApp] delete /Untitled.ipynb
[D 00:27:08.517 NotebookApp] Unlinking file /home/sglyon/Untitled.ipynb
[D 00:27:08.520 NotebookApp] unlinking /home/sglyon/.ipynb_checkpoints/Untitled-checkpoint.ipynb
[D 00:27:08.521 NotebookApp] 204 DELETE /api/contents/Untitled.ipynb (MYIPADDRESS) 4.70ms
[I 00:27:10.631 NotebookApp] Creating new notebook in
[D 00:27:10.634 NotebookApp] Saving /home/sglyon/Untitled.ipynb
[D 00:27:10.746 NotebookApp] 201 POST /api/contents (MYIPADDRESS) 117.90ms
[D 00:27:10.763 NotebookApp] Using contents: services/contents
[D 00:27:10.795 NotebookApp] 200 GET /notebooks/Untitled.ipynb?kernel_name=python3 (MYIPADDRESS) 32.36ms
[D 00:27:10.820 NotebookApp] 304 GET /custom/custom.css (MYIPADDRESS) 0.65ms
[D 00:27:10.821 NotebookApp] 304 GET /static/components/MathJax/MathJax.js?config=TeX-AMS_HTML-full,Safe&delayStartupUntil=configured (MYIPADDRESS) 0.42ms
[D 00:27:10.842 NotebookApp] 304 GET /static/components/MathJax/config/TeX-AMS_HTML-full.js?rev=2.5.3 (MYIPADDRESS) 0.75ms
[D 00:27:10.920 NotebookApp] 200 GET /static/services/contents.js?v=20160422002659 (MYIPADDRESS) 0.73ms
[D 00:27:10.927 NotebookApp] 200 GET /custom/custom.js?v=20160422002659 (MYIPADDRESS) 0.74ms
[D 00:27:10.934 NotebookApp] 304 GET /static/components/MathJax/config/Safe.js?rev=2.5.3 (MYIPADDRESS) 0.60ms
[D 00:27:10.955 NotebookApp] 200 GET /api/config/common?_=1461299427943 (MYIPADDRESS) 0.62ms
[D 00:27:10.956 NotebookApp] 200 GET /api/config/notebook?_=1461299427942 (MYIPADDRESS) 0.39ms
[D 00:27:10.985 NotebookApp] Native kernel (python3) available from /home/sglyon/anaconda3/lib/python3.5/site-packages/ipykernel/resources
[D 00:27:10.985 NotebookApp] Native kernel (python3) available from /home/sglyon/anaconda3/lib/python3.5/site-packages/ipykernel/resources
[D 00:27:10.986 NotebookApp] 200 GET /api/kernelspecs (MYIPADDRESS) 2.36ms
[D 00:27:11.048 NotebookApp] 200 GET /api/contents/Untitled.ipynb?type=notebook&_=1461299427944 (MYIPADDRESS) 57.18ms
[D 00:27:11.050 NotebookApp] 200 GET /nbextensions/widgets/notebook/js/extension.js?v=20160422002659 (MYIPADDRESS) 0.56ms
[D 00:27:11.069 NotebookApp] 304 GET /static/components/MathJax/jax/output/HTML-CSS/fonts/STIX-Web/fontdata.js?rev=2.5.3 (MYIPADDRESS) 0.57ms
[D 00:27:11.076 NotebookApp] 304 GET /static/components/MathJax/extensions/Safe.js?rev=2.5.3 (MYIPADDRESS) 0.58ms
[D 00:27:11.115 NotebookApp] Native kernel (python3) available from /home/sglyon/anaconda3/lib/python3.5/site-packages/ipykernel/resources
[D 00:27:11.115 NotebookApp] Starting kernel: ['/home/sglyon/anaconda3/bin/python', '-m', 'ipykernel', '-f', '/run/user/1000/jupyter/kernel-fb983d90-a170-46ab-b657-dc14b54136f2.json']
[D 00:27:11.118 NotebookApp] Connecting to: tcp://127.0.0.1:42223
[I 00:27:11.119 NotebookApp] Kernel started: fb983d90-a170-46ab-b657-dc14b54136f2
[D 00:27:11.119 NotebookApp] Kernel args: {'kernel_name': 'python3', 'cwd': '/home/sglyon'}
[D 00:27:11.120 NotebookApp] 201 POST /api/sessions (MYIPADDRESS) 15.34ms
[D 00:27:11.121 NotebookApp] 200 GET /api/contents/Untitled.ipynb/checkpoints?_=1461299427945 (MYIPADDRESS) 0.69ms
[D 00:27:11.126 NotebookApp] 200 GET /nbextensions/widgets/widgets/js/init.js?v=20160422002659 (MYIPADDRESS) 0.61ms
[D 00:27:11.127 NotebookApp] 200 GET /nbextensions/widgets/notebook/js/widgetarea.js?v=20160422002659 (MYIPADDRESS) 0.52ms
[D 00:27:11.161 NotebookApp] 304 GET /static/components/jquery-ui/themes/smoothness/images/ui-icons_222222_256x240.png (MYIPADDRESS) 0.52ms
[D 00:27:11.183 NotebookApp] 200 GET /nbextensions/widgets/widgets/js/manager.js?v=20160422002659 (MYIPADDRESS) 0.74ms
[D 00:27:11.185 NotebookApp] 200 GET /nbextensions/widgets/widgets/js/widget_link.js?v=20160422002659 (MYIPADDRESS) 0.53ms
[D 00:27:11.186 NotebookApp] 200 GET /nbextensions/widgets/widgets/js/widget_bool.js?v=20160422002659 (MYIPADDRESS) 0.59ms
[D 00:27:11.197 NotebookApp] 200 GET /nbextensions/widgets/widgets/js/widget.js?v=20160422002659 (MYIPADDRESS) 13.77ms
[D 00:27:11.198 NotebookApp] 200 GET /nbextensions/widgets/widgets/js/widget_float.js?v=20160422002659 (MYIPADDRESS) 0.59ms
[D 00:27:11.204 NotebookApp] 200 GET /nbextensions/widgets/widgets/js/widget_image.js?v=20160422002659 (MYIPADDRESS) 0.51ms
[D 00:27:11.205 NotebookApp] 200 GET /nbextensions/widgets/widgets/js/widget_int.js?v=20160422002659 (MYIPADDRESS) 0.57ms
[D 00:27:11.211 NotebookApp] 200 GET /nbextensions/widgets/widgets/js/widget_color.js?v=20160422002659 (MYIPADDRESS) 0.63ms
[D 00:27:11.219 NotebookApp] 200 GET /nbextensions/widgets/widgets/js/widget_selection.js?v=20160422002659 (MYIPADDRESS) 0.71ms
[D 00:27:11.220 NotebookApp] 200 GET /nbextensions/widgets/widgets/js/widget_output.js?v=20160422002659 (MYIPADDRESS) 0.49ms
[D 00:27:11.226 NotebookApp] 200 GET /nbextensions/widgets/widgets/js/widget_selectioncontainer.js?v=20160422002659 (MYIPADDRESS) 0.64ms
[D 00:27:11.233 NotebookApp] 200 GET /nbextensions/widgets/widgets/js/widget_controller.js?v=20160422002659 (MYIPADDRESS) 0.68ms
[D 00:27:11.234 NotebookApp] 200 GET /nbextensions/widgets/widgets/js/widget_string.js?v=20160422002659 (MYIPADDRESS) 0.57ms
[D 00:27:11.234 NotebookApp] 200 GET /nbextensions/widgets/widgets/js/widget_box.js?v=20160422002659 (MYIPADDRESS) 0.52ms
[D 00:27:11.240 NotebookApp] 200 GET /api/kernels/fb983d90-a170-46ab-b657-dc14b54136f2?_=1461299427946 (MYIPADDRESS) 0.49ms
[D 00:27:11.240 NotebookApp] 200 GET /nbextensions/widgets/widgets/js/widget_button.js?v=20160422002659 (MYIPADDRESS) 0.50ms
[D 00:27:11.247 NotebookApp] 200 GET /static/components/backbone/backbone-min.js?v=20160422002659 (MYIPADDRESS) 0.59ms
[D 00:27:11.275 NotebookApp] 304 GET /nbextensions/widgets/widgets/css/widgets.min.css (MYIPADDRESS) 0.55ms
[D 00:27:12.292 NotebookApp] 200 GET /api/kernels/fb983d90-a170-46ab-b657-dc14b54136f2?_=1461299427947 (MYIPADDRESS) 0.59ms
[D 00:27:14.334 NotebookApp] 200 GET /api/kernels/fb983d90-a170-46ab-b657-dc14b54136f2?_=1461299427948 (MYIPADDRESS) 0.92ms
[D 00:27:18.372 NotebookApp] 200 GET /api/kernels/fb983d90-a170-46ab-b657-dc14b54136f2?_=1461299427949 (MYIPADDRESS) 0.76ms
[D 00:27:26.415 NotebookApp] 200 GET /api/kernels/fb983d90-a170-46ab-b657-dc14b54136f2?_=1461299427950 (MYIPADDRESS) 0.60ms
[D 00:27:42.750 NotebookApp] 200 GET /api/kernels/fb983d90-a170-46ab-b657-dc14b54136f2?_=1461299427951 (MYIPADDRESS) 1.38ms

Meanwhile in the javascript console in the notebook that doesn't want to connect to any kernels I see this:

[Log] Default extension for cell metadata editing loaded. (main.min.js, line 24082)
[Log] Raw Cell Format toolbar preset loaded. (main.min.js, line 24168)
[Log] Slideshow extension for metadata editing loaded. (main.min.js, line 24216)
[Warning] actions (2) (main.min.js, line 28971)
[Log] Session: kernel_created (b743ac78-0ecc-4fb8-ab40-12483dbac162) (main.min.js, line 23370)
[Log] Starting WebSockets: – "wss://128.122.185.159:9999/api/kernels/fb983d90-a170-46ab-b657-dc14b54136f2" (main.min.js, line 22673)
[Error] WebSocket network error: OSStatus Error -9807: Invalid certificate chain 
[Log] Kernel: kernel_disconnected (fb983d90-a170-46ab-b657-dc14b54136f2) (main.min.js, line 22329)
[Log] Connection lost, reconnecting in 1 seconds. (main.min.js, line 22771)
[Log] Loading extension: widgets/notebook/js/extension (main.min.js, line 12109)
[Log] loaded widgets (extension.js, line 81)
[Log] Kernel: kernel_reconnecting (fb983d90-a170-46ab-b657-dc14b54136f2) (main.min.js, line 22329)
[Log] Starting WebSockets: – "wss://128.122.185.159:9999/api/kernels/fb983d90-a170-46ab-b657-dc14b54136f2" (main.min.js, line 22673)
[Error] WebSocket network error: OSStatus Error -9807: Invalid certificate chain 
[Log] Kernel: kernel_disconnected (fb983d90-a170-46ab-b657-dc14b54136f2) (main.min.js, line 22329)
[Log] Connection lost, reconnecting in 2 seconds. (main.min.js, line 22771)
[Log] Kernel: kernel_reconnecting (fb983d90-a170-46ab-b657-dc14b54136f2) (main.min.js, line 22329)
[Log] Starting WebSockets: – "wss://128.122.185.159:9999/api/kernels/fb983d90-a170-46ab-b657-dc14b54136f2" (main.min.js, line 22673)
[Error] WebSocket network error: OSStatus Error -9807: Invalid certificate chain 
[Log] Kernel: kernel_disconnected (fb983d90-a170-46ab-b657-dc14b54136f2) (main.min.js, line 22329)
[Log] Connection lost, reconnecting in 4 seconds. (main.min.js, line 22771)
[Log] Kernel: kernel_reconnecting (fb983d90-a170-46ab-b657-dc14b54136f2) (main.min.js, line 22329)
[Log] Starting WebSockets: – "wss://128.122.185.159:9999/api/kernels/fb983d90-a170-46ab-b657-dc14b54136f2" (main.min.js, line 22673)
[Error] WebSocket network error: OSStatus Error -9807: Invalid certificate chain 
[Log] Kernel: kernel_disconnected (fb983d90-a170-46ab-b657-dc14b54136f2) (main.min.js, line 22329)
[Log] Connection lost, reconnecting in 8 seconds. (main.min.js, line 22771)
[Log] Kernel: kernel_reconnecting (fb983d90-a170-46ab-b657-dc14b54136f2) (main.min.js, line 22329)
[Log] Starting WebSockets: – "wss://128.122.185.159:9999/api/kernels/fb983d90-a170-46ab-b657-dc14b54136f2" (main.min.js, line 22673)
[Error] WebSocket network error: OSStatus Error -9807: Invalid certificate chain 
[Log] Kernel: kernel_disconnected (fb983d90-a170-46ab-b657-dc14b54136f2) (main.min.js, line 22329)
[Log] Connection lost, reconnecting in 16 seconds. (main.min.js, line 22771)
[Log] Kernel: kernel_reconnecting (fb983d90-a170-46ab-b657-dc14b54136f2) (main.min.js, line 22329)
[Log] Starting WebSockets: – "wss://128.122.185.159:9999/api/kernels/fb983d90-a170-46ab-b657-dc14b54136f2" (main.min.js, line 22673)
[Error] WebSocket network error: OSStatus Error -9807: Invalid certificate chain 
[Log] Kernel: kernel_disconnected (fb983d90-a170-46ab-b657-dc14b54136f2) (main.min.js, line 22329)
[Log] Connection lost, reconnecting in 32 seconds. (main.min.js, line 22771)
[Log] Kernel: kernel_reconnecting (fb983d90-a170-46ab-b657-dc14b54136f2) (main.min.js, line 22329)
[Log] Starting WebSockets: – "wss://128.122.185.159:9999/api/kernels/fb983d90-a170-46ab-b657-dc14b54136f2" (main.min.js, line 22673)
[Error] WebSocket network error: OSStatus Error -9807: Invalid certificate chain 
[Log] Kernel: kernel_disconnected (fb983d90-a170-46ab-b657-dc14b54136f2) (main.min.js, line 22329)
[Log] Connection lost, reconnecting in 64 seconds. (main.min.js, line 22771)
[Log] Kernel: kernel_reconnecting (fb983d90-a170-46ab-b657-dc14b54136f2) (main.min.js, line 22329)
[Log] Starting WebSockets: – "wss://128.122.185.159:9999/api/kernels/fb983d90-a170-46ab-b657-dc14b54136f2" (main.min.js, line 22673)
[Error] WebSocket network error: OSStatus Error -9807: Invalid certificate chain 
[Log] Kernel: kernel_disconnected (fb983d90-a170-46ab-b657-dc14b54136f2) (main.min.js, line 22329)
[Log] Failed to reconnect, giving up. (main.min.js, line 22778)

Any suggestions? Thank you!

How can I change notebook saving behavior on a per-object/cell basis?

Is there a way to change what gets saved in a jupyter notebook for a specific python object? I'm thinking of something akin to _repr_html_, but that operates only when the notebook is saved (i.e., it could produce the relevant html content for the cell to be saved as).

I found the on-save hook functions in jupyter, but what I really want is something that would operate on a python class/object level, rather than having to have a single global hook for a notebook - we want to be able to distribute this functionality with another package, and I imagine it's not very good practice to override a global function like that?

File exists path empty when creating new notebook

Hey all,

Sorry to keep flooding your help channels but I have run into another issue for which I could use some advice.

When creating a new notebook, the file_exists handler is called (I'm assuming to check for the conflicts with the name of the notebook its about to create). However, my function is passed an empty string for path so I can't really check if there is already a notebook with the name. I saw on the documentation a line that says The server is responsible for naming the new file but I dont really see where that happens or how I specify the new name/path.

Can't connect to kernel when hosted on aws instance

I have installed Jupyter via anaconda on an aws Ubuntu instance. I have the appropriate 433,8888 ports open for access over https from my browser and I can connect and create, save notebooks just fine. However it can never execute a cell as it can connect to the kernel...
What am I missing - is there additional ports that need to be opened for the kernel comms??

I've read that it could be an issue with Safari and self-signed certs but I get the same issue in chrome as well.
It's probably somethings basic but has got me stumped!

trouble with _repr_latex_ and nbconvert

I'm using Jupyter 4.1.2.

I have a simple class designed to make a separator. This helps me stay sane with cells that have a lot of output.

from IPython.display import display
class Separator(object):
    def __repr__(self):
        return "---------------------------------------------------------"
    def _repr_latex_(self):
        return "$\\noindent\\rule{8cm}{0.4pt}$"
    def _repr_html_(self):
        return "<hr style='border: solid black 1px'/>"

def separate():
    sep = Separator()
    display(sep)

Well, I'm having trouble getting nbconvert to call Separator._repr_latex_. Instead, in my tex output I get the __repr__ output, like this:

    \begin{verbatim}
---------------------------------------------------------
    \end{verbatim}

What am I missing? I've had this problem before in other situations involving every table library I could get my hands on. Now the issue is coming up in a very clean cut circumstance!

How to pass configuration options to nbconvert --execute?

I've never really understood how the Jupyter configuration system (all this "traitlets" stuff) works.
Now I have a concrete question and I hope I'll get an answer which will help shed some light on this.

I'm interested in the InlineBackend.figure_formats option (some docs). I know how to use it within a Jupyter notebook, e.g.

%config InlineBackend.figure_formats = {'png', 'pdf'}

... and I know how to use it in a Jupyter config file.

But what if I want to pass the option to nbconvert --execute?

Actually, that's not enough, I'd like to pass it programmatically from within Python code to nbconvert's ExecutePreprocessor (some docs).

I saw in the source code that there is a traitlet named extra_arguments and it looks like it could be helpful, but I don't know how to use it.

How can I pass the above config option to the ExecutePreprocessor constructor?

Clarification on Notebook Path

Hey all,

I'm working on a custom notebook storage solution driven by a RESTful api. In order to provide the required information, the docs say that both notebooks and directories need the "Full (API-style) path to the entity". Does this mean that the file's path includes the parent directory aswell? Ie, if there is a notebook called insight.ipynb and I want it to be "inside" of the directory /foo, is the notebook's path /foo/insight.ipynb and the directory path simply /foo? This seems like it has a bit of repeated data since there is already a relationship between directories and files/notebooks (I should be able to figure out the filepath by looking at what directories i've gone through) but maybe I'm missing something

Problems selecting, copying and pasting

I am not sure this is strictly related to Jupyter notebooks, but I don't seem to be having the problem in other OS or web applications (CentOS machine). Jupyter version 4.1.0.

On an open notebook, I am finding troubles selecting rows of code. Either using the mouse, or keyboard (Shift+Arrows/Home/End). It always seems to be the first or last row of a snipet of code. When I do manage to select it, and I copy and paste it (Ctrl+C and Ctrl+V), the first (or last) row does not copy...

Nobody else is experiencing this problem?

Cursor initial position in header MD cells

Hi all.

When I create a Markdown cell in a Jupyter notebook and decide to format it as a header, this inserts 1–6 pound key symbols (as it should). To edit the cell, I press Enter, and the cursor is positioned at the very left of the cell, before the # symbols.

Wouldn't it be more practical to automatically put the cursor right after the # symbols (possibly separated by a blankspace), when editing?

Thank you.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.