def in_notebook():
    """Check if code is being executed in a Jupyter notebook.

	:rtype: bool
	"""
    try:
        from IPython import get_ipython
    except ImportError:
        return False
    ipy = get_ipython()
    if not ipy:
        return False
    return type(ipy).__name__ == 'ZMQInteractiveShell'
