jupyter-notebook

Identation coverts to weird arrow while copying code from sublime to jupyter notebook

眉间皱痕 提交于 2020-05-29 16:09:31
问题 Copying this piece of code from sublime : # Texts Texts Texts Texts Texts Texts for i in range(10): #Idented Texxt print i results in below, with the line tab in jupyter-notebook. Now if i want to add to the code and do further testing in jupyter, i need to copy this weird arrow instead of hitting tab (else, it shows indentation error). Is there some simple way to change? I can imagine I am missing something really simple and this might not be a problem at all. I tried looking but found no

ValueError: Shapes (None, 50) and (None, 1) are incompatible in Tensorflow and Colab

时光总嘲笑我的痴心妄想 提交于 2020-05-29 10:35:08
问题 I am training a Tensorflow model with LSTMs for predictive maintenance. For each instance I create a matrix (50,4) where 50 is the length of the hisotry sequence, and 4 is the number of features for each records, so for training the model I use e.g. (55048, 50, 4) tensor and a (55048, 1) as labels. When I train on Jupyter on my computer it works (very slow, but it works), but on Colab I get this error: Training data shape is (55048, 50, 4) Labels shape is (55048, 1) WARNING:tensorflow:Layer

How to reset iPython/Jupyter profile after upgrade to 'factory' defaults?

*爱你&永不变心* 提交于 2020-05-29 06:05:21
问题 Returning to using iPython Notebooks after a year, [I installed my distro's version of Jupyter and now] Jupyter launches without menu bar. I'm guessing some of my old settings are carrying over. I'm guessing the fastest way to fix this is to .bak the old profile and create a new default. First, initialized a Jupyter profile from instructions on how-to setup multiple Jupyter profiles: $ jupyter notebook --generate-config Then, [after further investigation] I created a new iPython profile, $

How to set jupyter notebook to open on browser automatically

倾然丶 夕夏残阳落幕 提交于 2020-05-29 05:08:37
问题 So I don't have issues trying to open the jupyter notebook but for some reason, I cannot get it to open in the browser automatically no matter what I'm trying to do. I follow these posts to no avail: unable to open jupyter(ipython) notebook on browser https://github.com/jupyter/notebook/issues/2130 I created the jupyter config through jupyter notebook --generate-config and modified these settings: c.NotebookApp.browser = 'C:\Program Files (x86)\Google\Chrome\Application\chrome.exe' c

How to set jupyter notebook to open on browser automatically

青春壹個敷衍的年華 提交于 2020-05-29 05:08:00
问题 So I don't have issues trying to open the jupyter notebook but for some reason, I cannot get it to open in the browser automatically no matter what I'm trying to do. I follow these posts to no avail: unable to open jupyter(ipython) notebook on browser https://github.com/jupyter/notebook/issues/2130 I created the jupyter config through jupyter notebook --generate-config and modified these settings: c.NotebookApp.browser = 'C:\Program Files (x86)\Google\Chrome\Application\chrome.exe' c

Rpy2: calling to function conaining dots

微笑、不失礼 提交于 2020-05-28 09:48:55
问题 I'm tring to run a R function in Pyton via Jupyter Notebook. the problem is, that my function name (from mice lib) - containing dot. the name of the function is md.pattern , and this is the code that I'm tring to run: from rpy2.robjects.packages import importr mice = importr('mice') mice.md.pattern(train) and this is the error that I get: AttributeError: module 'mice' has no attribute 'md' I also tried to run: from rpy2.robjects.packages import importr mice = importr('mice') pattern =

Rpy2: calling to function conaining dots

五迷三道 提交于 2020-05-28 09:45:31
问题 I'm tring to run a R function in Pyton via Jupyter Notebook. the problem is, that my function name (from mice lib) - containing dot. the name of the function is md.pattern , and this is the code that I'm tring to run: from rpy2.robjects.packages import importr mice = importr('mice') mice.md.pattern(train) and this is the error that I get: AttributeError: module 'mice' has no attribute 'md' I also tried to run: from rpy2.robjects.packages import importr mice = importr('mice') pattern =

Rpy2: calling to function conaining dots

自闭症网瘾萝莉.ら 提交于 2020-05-28 09:42:36
问题 I'm tring to run a R function in Pyton via Jupyter Notebook. the problem is, that my function name (from mice lib) - containing dot. the name of the function is md.pattern , and this is the code that I'm tring to run: from rpy2.robjects.packages import importr mice = importr('mice') mice.md.pattern(train) and this is the error that I get: AttributeError: module 'mice' has no attribute 'md' I also tried to run: from rpy2.robjects.packages import importr mice = importr('mice') pattern =

Reset underscore (`_`) variable in Jupyter notebook powered by IPython kernel

ε祈祈猫儿з 提交于 2020-05-28 03:07:46
问题 Edit : The issue has been reported in GitHub. I'm leaving the question here in case it helps other people find the issue (I was not able to). I often use the _ variable for convenience when working in a Jupyter notebook (it returns the output of the latest code execution). However, when _ is used to as a placeholder for an unused variable (a typical use case in Python), it breaks the first use case. Note that this works as expected in an IPython console. Below, _ again holds the latest

Reset underscore (`_`) variable in Jupyter notebook powered by IPython kernel

感情迁移 提交于 2020-05-28 03:05:18
问题 Edit : The issue has been reported in GitHub. I'm leaving the question here in case it helps other people find the issue (I was not able to). I often use the _ variable for convenience when working in a Jupyter notebook (it returns the output of the latest code execution). However, when _ is used to as a placeholder for an unused variable (a typical use case in Python), it breaks the first use case. Note that this works as expected in an IPython console. Below, _ again holds the latest