import its own ipynb files on google colab










0














I am working with jupyter notebook using google colab(all the files are in the drive). I have 2 files: Exploratory_Data_Analysis.ipynb et PCA.ipynb.
I want to import to use the data comming from first one in the secon one.
using only the jupyter notebook locally(not with google colaboratory), the importing is working simply by doing this:



!pip install import-ipynb
import import_ipynb
import Exploratory_Data_Analysis as eda


But with google colab I tried the following:



!pip install import-ipynb
import import_ipynb

!pip install -U -q PyDrive
from pydrive.auth import GoogleAuth
from pydrive.drive import GoogleDrive
from google.colab import auth
from oauth2client.client import GoogleCredentials
import os
import pandas as pd
auth.authenticate_user()
gauth = GoogleAuth()
gauth.credentials = GoogleCredentials.get_application_default()
drive = GoogleDrive(gauth)

listed = drive.ListFile('q': "'1CXqv7-PZmYrWes4MOk' in
parents and trashed=false").GetList()
for file in listed:
print('title , id '.format(file['title'], file['id']))

eda = os.path.join(download_path, 'Exploratory_Data_Analysis.ipynb')
temp_eda = drive.CreateFile('id': '1YpDhXGeJVtzuxUJS5gKsUbm')
temp_eda.GetContentFile(eda)

import Exploratory_Data_Analysis


and getting this:



importing Jupyter notebook from Exploratory_Data_Analysis.ipynb
NotJSONError: Notebook does not appear to be JSON: ''...


are there any other ways to import its own ipynb files on google colab?










share|improve this question


























    0














    I am working with jupyter notebook using google colab(all the files are in the drive). I have 2 files: Exploratory_Data_Analysis.ipynb et PCA.ipynb.
    I want to import to use the data comming from first one in the secon one.
    using only the jupyter notebook locally(not with google colaboratory), the importing is working simply by doing this:



    !pip install import-ipynb
    import import_ipynb
    import Exploratory_Data_Analysis as eda


    But with google colab I tried the following:



    !pip install import-ipynb
    import import_ipynb

    !pip install -U -q PyDrive
    from pydrive.auth import GoogleAuth
    from pydrive.drive import GoogleDrive
    from google.colab import auth
    from oauth2client.client import GoogleCredentials
    import os
    import pandas as pd
    auth.authenticate_user()
    gauth = GoogleAuth()
    gauth.credentials = GoogleCredentials.get_application_default()
    drive = GoogleDrive(gauth)

    listed = drive.ListFile('q': "'1CXqv7-PZmYrWes4MOk' in
    parents and trashed=false").GetList()
    for file in listed:
    print('title , id '.format(file['title'], file['id']))

    eda = os.path.join(download_path, 'Exploratory_Data_Analysis.ipynb')
    temp_eda = drive.CreateFile('id': '1YpDhXGeJVtzuxUJS5gKsUbm')
    temp_eda.GetContentFile(eda)

    import Exploratory_Data_Analysis


    and getting this:



    importing Jupyter notebook from Exploratory_Data_Analysis.ipynb
    NotJSONError: Notebook does not appear to be JSON: ''...


    are there any other ways to import its own ipynb files on google colab?










    share|improve this question
























      0












      0








      0


      1





      I am working with jupyter notebook using google colab(all the files are in the drive). I have 2 files: Exploratory_Data_Analysis.ipynb et PCA.ipynb.
      I want to import to use the data comming from first one in the secon one.
      using only the jupyter notebook locally(not with google colaboratory), the importing is working simply by doing this:



      !pip install import-ipynb
      import import_ipynb
      import Exploratory_Data_Analysis as eda


      But with google colab I tried the following:



      !pip install import-ipynb
      import import_ipynb

      !pip install -U -q PyDrive
      from pydrive.auth import GoogleAuth
      from pydrive.drive import GoogleDrive
      from google.colab import auth
      from oauth2client.client import GoogleCredentials
      import os
      import pandas as pd
      auth.authenticate_user()
      gauth = GoogleAuth()
      gauth.credentials = GoogleCredentials.get_application_default()
      drive = GoogleDrive(gauth)

      listed = drive.ListFile('q': "'1CXqv7-PZmYrWes4MOk' in
      parents and trashed=false").GetList()
      for file in listed:
      print('title , id '.format(file['title'], file['id']))

      eda = os.path.join(download_path, 'Exploratory_Data_Analysis.ipynb')
      temp_eda = drive.CreateFile('id': '1YpDhXGeJVtzuxUJS5gKsUbm')
      temp_eda.GetContentFile(eda)

      import Exploratory_Data_Analysis


      and getting this:



      importing Jupyter notebook from Exploratory_Data_Analysis.ipynb
      NotJSONError: Notebook does not appear to be JSON: ''...


      are there any other ways to import its own ipynb files on google colab?










      share|improve this question













      I am working with jupyter notebook using google colab(all the files are in the drive). I have 2 files: Exploratory_Data_Analysis.ipynb et PCA.ipynb.
      I want to import to use the data comming from first one in the secon one.
      using only the jupyter notebook locally(not with google colaboratory), the importing is working simply by doing this:



      !pip install import-ipynb
      import import_ipynb
      import Exploratory_Data_Analysis as eda


      But with google colab I tried the following:



      !pip install import-ipynb
      import import_ipynb

      !pip install -U -q PyDrive
      from pydrive.auth import GoogleAuth
      from pydrive.drive import GoogleDrive
      from google.colab import auth
      from oauth2client.client import GoogleCredentials
      import os
      import pandas as pd
      auth.authenticate_user()
      gauth = GoogleAuth()
      gauth.credentials = GoogleCredentials.get_application_default()
      drive = GoogleDrive(gauth)

      listed = drive.ListFile('q': "'1CXqv7-PZmYrWes4MOk' in
      parents and trashed=false").GetList()
      for file in listed:
      print('title , id '.format(file['title'], file['id']))

      eda = os.path.join(download_path, 'Exploratory_Data_Analysis.ipynb')
      temp_eda = drive.CreateFile('id': '1YpDhXGeJVtzuxUJS5gKsUbm')
      temp_eda.GetContentFile(eda)

      import Exploratory_Data_Analysis


      and getting this:



      importing Jupyter notebook from Exploratory_Data_Analysis.ipynb
      NotJSONError: Notebook does not appear to be JSON: ''...


      are there any other ways to import its own ipynb files on google colab?







      python jupyter-notebook google-colaboratory






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 12 '18 at 0:44









      user7748633

      93




      93






















          1 Answer
          1






          active

          oldest

          votes


















          0














          Have you managed to get your notebook/ipynb file to Google Colab?
          The way I migrate my ongoing work in local jupyter-notebook to Google Colab is by using Github and Clouderizer. Here is the tutorial how to easily setup your notebook from github to Google Colab using Clouderizer: Medium tutorial.



          So when you create new Clouderizer project, it will ask you if you have any code you would like to import from github so that you can immediately continue you work. After setups in Clouderizer, head to Google Colab and execute:



          !wget NS -content disposition '<https://to_whatever_link_you_get_to_console>'


          The url link to console will be given when you setup your Colab the project
          via Clouderizer.






          share|improve this answer




















          • You should put the steps for this migration in the answer, as it is, it's incomplete.
            – Matthieu Brucher
            yesterday










          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53254703%2fimport-its-own-ipynb-files-on-google-colab%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          Have you managed to get your notebook/ipynb file to Google Colab?
          The way I migrate my ongoing work in local jupyter-notebook to Google Colab is by using Github and Clouderizer. Here is the tutorial how to easily setup your notebook from github to Google Colab using Clouderizer: Medium tutorial.



          So when you create new Clouderizer project, it will ask you if you have any code you would like to import from github so that you can immediately continue you work. After setups in Clouderizer, head to Google Colab and execute:



          !wget NS -content disposition '<https://to_whatever_link_you_get_to_console>'


          The url link to console will be given when you setup your Colab the project
          via Clouderizer.






          share|improve this answer




















          • You should put the steps for this migration in the answer, as it is, it's incomplete.
            – Matthieu Brucher
            yesterday















          0














          Have you managed to get your notebook/ipynb file to Google Colab?
          The way I migrate my ongoing work in local jupyter-notebook to Google Colab is by using Github and Clouderizer. Here is the tutorial how to easily setup your notebook from github to Google Colab using Clouderizer: Medium tutorial.



          So when you create new Clouderizer project, it will ask you if you have any code you would like to import from github so that you can immediately continue you work. After setups in Clouderizer, head to Google Colab and execute:



          !wget NS -content disposition '<https://to_whatever_link_you_get_to_console>'


          The url link to console will be given when you setup your Colab the project
          via Clouderizer.






          share|improve this answer




















          • You should put the steps for this migration in the answer, as it is, it's incomplete.
            – Matthieu Brucher
            yesterday













          0












          0








          0






          Have you managed to get your notebook/ipynb file to Google Colab?
          The way I migrate my ongoing work in local jupyter-notebook to Google Colab is by using Github and Clouderizer. Here is the tutorial how to easily setup your notebook from github to Google Colab using Clouderizer: Medium tutorial.



          So when you create new Clouderizer project, it will ask you if you have any code you would like to import from github so that you can immediately continue you work. After setups in Clouderizer, head to Google Colab and execute:



          !wget NS -content disposition '<https://to_whatever_link_you_get_to_console>'


          The url link to console will be given when you setup your Colab the project
          via Clouderizer.






          share|improve this answer












          Have you managed to get your notebook/ipynb file to Google Colab?
          The way I migrate my ongoing work in local jupyter-notebook to Google Colab is by using Github and Clouderizer. Here is the tutorial how to easily setup your notebook from github to Google Colab using Clouderizer: Medium tutorial.



          So when you create new Clouderizer project, it will ask you if you have any code you would like to import from github so that you can immediately continue you work. After setups in Clouderizer, head to Google Colab and execute:



          !wget NS -content disposition '<https://to_whatever_link_you_get_to_console>'


          The url link to console will be given when you setup your Colab the project
          via Clouderizer.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered yesterday









          Daniel Kurniadi

          32




          32











          • You should put the steps for this migration in the answer, as it is, it's incomplete.
            – Matthieu Brucher
            yesterday
















          • You should put the steps for this migration in the answer, as it is, it's incomplete.
            – Matthieu Brucher
            yesterday















          You should put the steps for this migration in the answer, as it is, it's incomplete.
          – Matthieu Brucher
          yesterday




          You should put the steps for this migration in the answer, as it is, it's incomplete.
          – Matthieu Brucher
          yesterday

















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.





          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


          Please pay close attention to the following guidance:


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53254703%2fimport-its-own-ipynb-files-on-google-colab%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Kleinkühnau

          Makov (Slowakei)

          Deutsches Schauspielhaus