jupyter-notebook

Is it possible to save a Google Colaboratory Notebook to HTML?

拟墨画扇 提交于 2021-02-06 10:13:06
问题 I have a Google Colaboratory Notebook for Data Analysis that I want to output as a HTML file as currently not everything loads within the Colab environment such as large Folium Heatmaps. Is it possible to export the notebook as a html file as opposed to the ipynb and py options? 回答1: Google Colab doesn't currently have such a feature as a built-in. Your best route is to first download it through File > Download .ipynb and then use the standard tool for Jupyter Notebook conversion, nbconvert :

Root access for Jupyter/iPython Notebook

北慕城南 提交于 2021-02-06 10:12:24
问题 I'm trying to use the bash kernel in iPython/Jupyter notebook, but I need sudo access within the notebook itself. I've tried $ sudo jupyter notebook to run the notebook as root, but that only returns: $ jupyter: 'notebook' is not a Jupyter command So, I'm left with running $ jupyter notebook (unless there's a way to run Jupyter notebook as root). I also can't do su root in the notebook itself because that requires an input and the notebook won't let me give an input. Finally, there is

How to create/modify a jupyter notebook from code (python)?

╄→尐↘猪︶ㄣ 提交于 2021-02-06 10:12:16
问题 I am trying to automate my project create process and would like as part of it to create a new jupyter notebook and populate it with some cells and content that I usually have in every notebook (i.e., imports, titles, etc.) Is it possible to do this via python? 回答1: You can do it using nbformat . Below an example taken from Creating an IPython Notebook programatically: import nbformat as nbf nb = nbf.v4.new_notebook() text = """\ # My first automatic Jupyter Notebook This is an auto-generated

Is there anyway I can download the file in Google colaboratory?

我们两清 提交于 2021-02-06 10:11:27
问题 I am trying tensorflow in Google Colaboratory from this codelab, I need to download 'http://download.tensorflow.org/example_images/flower_photos.tgz' this file to complete the lab. How I can download the file. Is there anyway to upload the tar file without downloading it on my machine. I tried this method import urllib testfile = urllib.URLopener() testfile.retrieve("http://randomsite.com/file.gz", "file.gz") This doesn't work, wget is not found also. Anyone please tell me how to do this. 回答1

Is it possible to save a Google Colaboratory Notebook to HTML?

随声附和 提交于 2021-02-06 10:07:35
问题 I have a Google Colaboratory Notebook for Data Analysis that I want to output as a HTML file as currently not everything loads within the Colab environment such as large Folium Heatmaps. Is it possible to export the notebook as a html file as opposed to the ipynb and py options? 回答1: Google Colab doesn't currently have such a feature as a built-in. Your best route is to first download it through File > Download .ipynb and then use the standard tool for Jupyter Notebook conversion, nbconvert :

debug Flask server inside Jupyter Notebook

生来就可爱ヽ(ⅴ<●) 提交于 2021-02-06 03:39:52
问题 I want to debug small flask server inside jupyter notebook for demo. I created virtualenv on latest Ubuntu and Python2 (on Mac with Python3 this error occurs as well), pip install flask jupyter. However, when I create a cell with helloworld script it does not run inside notebook. from flask import Flask app = Flask(__name__) @app.route("/") def hello(): return "Hello World!" if __name__ == "__main__": app.run(debug=True,port=1234) File "/home/***/test/local/lib/python2.7/site-packages

Numpy load with `allow_pickle=true` old `keras` in `tensorflow.keras`

落爺英雄遲暮 提交于 2021-02-05 10:47:41
问题 Numpy load with allow_pickle=true old keras in tensorflow.keras Situation I have taken a course, where a Jupyter-notebook with a few example use-cases was provided. In order to save time and to have a clean working-environment, I've decided to use the Docker-image: jupyter/tensorflow-notebook:latest (see here). These are the pip list results for the relevant modules: [...] Keras-Applications 1.0.8 Keras-Preprocessing 1.1.0 [...] numpy 1.17.5 [...] tensorflow 2.1.0 [...] (a) The following

Is there a way to turn off hover for certain functions in VSCode?

别来无恙 提交于 2021-02-05 09:45:33
问题 In VSCode, I have the hovers enabled that show me the docstrings of the functions (etc.) I use. I appreciate that functionality. However, some of the hovers get annoying with time. First and foremost, the one for print . I never need it, and it is huge. It is particularly annoying in Jupyter notebooks, where I use print quite often. Hence, my question: Is there a way to disable the hover for certain functions specifically? I have looked through the VSCode documentation but haven't found

Python - Change print console font family/style

我怕爱的太早我们不能终老 提交于 2021-02-05 08:11:51
问题 The question's straightforward, is it possible to change the font family of text in a Python print() output? Like Times New Roman, Arial, or Comic Sans? I only want to change some of the output. Not all of the text like in this question. I'm using Python 3, Jupyter Notebooks on a Mac. I know it's possible to make certain text bold like so: bold_start = '\033[1m' bold_end = '\033[0m' print(bold_start, "Hello", bold_end, "World") This outputs " Hello World" instead of "Hello World" or " Hello

Python - Change print console font family/style

血红的双手。 提交于 2021-02-05 08:11:06
问题 The question's straightforward, is it possible to change the font family of text in a Python print() output? Like Times New Roman, Arial, or Comic Sans? I only want to change some of the output. Not all of the text like in this question. I'm using Python 3, Jupyter Notebooks on a Mac. I know it's possible to make certain text bold like so: bold_start = '\033[1m' bold_end = '\033[0m' print(bold_start, "Hello", bold_end, "World") This outputs " Hello World" instead of "Hello World" or " Hello