jupyter

how to control size of images in quarto html report

how to control size of images in quarto html report Question: I have tried to set image size using the chunk options fig.height and fig-height but the image sizes are unaffected. — title: ‘image size’ author: ‘Joseph Powers’ date: 2024-05-07 format: html: toc: true toc-depth: 3 html-math-method: webtex editor: source fig.align: ‘center’ dpi: 300 include: …

Total answers: 1

python/sage: how to get the last expression?

python/sage: how to get the last expression? Question: If I do in Jupiter (in both python and sage) something like: a = 42 b = 43 a + b it will, somehow, manage to understand that this process returns the value a + b, i.e. 85 here: Similarly, if I just do: a = 42 …

Total answers: 2

Minimum package requirements to run a jupyter notebook in vscode

Minimum package requirements to run a jupyter notebook in vscode Question: Recently I keep running into problems with my python notebooks in vscode where vscode doesn’t see the installed ipykernel. There are several posts on this issue with suggestions to update certain packages (VSCode not picking up ipykernel, Python requires ipykernel to be installed, vscode …

Total answers: 3

my ipywidgets work in jupyter notebook, but not in html file after exporting

my ipywidgets work in jupyter notebook, but not in html file after exporting Question: i can press a button and get it to trigger events within the notebook, but when i export a html file, they no longer work. import ipywidgets as widgets from IPython.display import HTML from ipywidgets import interactive from ipywidgets import interact …

Total answers: 1

Import "numpy" could not be resolved; ipynb in vscode

Import "numpy" could not be resolved; ipynb in vscode Question: Im in trouble with using umpy module in ipynb(jupyter notebook) file in vscode, it doesn’t work only in ipynb file. If I make new .py file and import modules, no error comes out. Could anybody tell me why this happens? Asked By: COTHE || Source …

Total answers: 1

Jupyter Notebook cells not showing in code-server running in a docker

Jupyter Notebook cells not showing in code-server running in a docker Question: I want to use Jupyter notebooks in Code-Server in a docker. For whatever reasons I cant get it running and I also have/found no error messages that could help me finding the cause. Jupyter notebook files (ipynb) can be created and I can …

Total answers: 1

How to access Python variables notebook from python script

How to access Python variables notebook from python script Question: How to access Python variables (for example a Pandas dataframe in a Jupyterlab notebook) from a python script ? I need to access a Dataframe (while I’m working in a notebook) from a python script, locally. I need to access it without having to type …

Total answers: 1

Get value and type of python variable similar to Jupyter behavior

Get value and type of python variable similar to Jupyter behavior Question: Assume you have a Jupyter notebook with one entry that has three lines: x = 1 y = x + 1 y The output will print ‘2’ I want to do this inside my python code. If I have a variable lines and …

Total answers: 1