google-colaboratory

How to import and read a shelve or Numpy file in Google Colaboratory?

北城余情 提交于 2019-11-26 20:31:10
问题 I have file.npy and I want to load it in Google Colaboratory Notebook. I already know that I must load the file from Google Drive, however I have no idea how to do so. Any help is welcome 回答1: Upload your file into Colaboratory Notebook with the following: from google.colab import files uploaded = files.upload() Then you can reach the contents of your file from uploaded object and then write it into a file: with open("my_data.h5", 'w') as f: f.write(uploaded[uploaded.keys()[0]]) If you run:

Google Colab: how to read data from my google drive?

不羁岁月 提交于 2019-11-26 19:36:12
The problem is simple: I have some data on gDrive, for example at /projects/my_project/my_data* . Also I have a simple notebook in gColab. So, I would like to do something like: for file in glob.glob("/projects/my_project/my_data*"): do_something(file) Unfortunately, all examples (like this - https://colab.research.google.com/notebook#fileId=/v2/external/notebooks/io.ipynb , for example) suggests to only mainly load all necessary data to notebook. But, if I have a lot of pieces of data, it can be quite complicated. Is there any opportunities to solve this issue? Thanks for help! Good news,

Can I use TensorBoard with Google Colab?

点点圈 提交于 2019-11-26 19:32:33
Is there any way to use TensorBoard when training a TensorFlow model on Google Colab? Joppe Geluykens EDIT: You probably want to give the official %tensorboard magic a go, available from TensorFlow 1.13 onward. Prior to the existence of the %tensorboard magic, the standard way to achieve this was to proxy network traffic to the Colab VM using ngrok . A Colab example can be found here . These are the steps (the code snippets represent cells of type "code" in colab): Get TensorBoard running in the background. Inspired by this answer . LOG_DIR = '/tmp/log' get_ipython().system_raw( 'tensorboard -

How to use R with Google Colaboratory?

吃可爱长大的小学妹 提交于 2019-11-26 18:10:46
问题 Google Colaboratory supports Python version 2.7 and 3.6 I see an example how to use Swift in Colab a while ago. Today, I happened to run !jupyter-kernelspec list And found a new kernel: IRkernel Available kernels: ir /usr/local/share/jupyter/kernels/ir python2 /usr/local/share/jupyter/kernels/python2 python3 /usr/local/share/jupyter/kernels/python3 swift /usr/local/share/jupyter/kernels/swift Is it now possible to use R in Colab as well? No hassle in installing R kernel? 回答1: Yes. You can

Import data into Google Colaboratory

早过忘川 提交于 2019-11-26 15:40:36
What are the common ways to import private data into Google Colaboratory notebooks? Is it possible to import a non-public Google sheet? You can't read from system files. The introductory docs link to a guide on using BigQuery , but that seems a bit... much. An official example notebook demonstrating local file upload/download and integration with Drive and sheets is available here: https://colab.research.google.com/notebooks/io.ipynb The simplest way to share files is to mount your Google Drive. To do this, run the following in a code cell: from google.colab import drive drive.mount('/content

Plotly notebook mode with google colaboratory

匆匆过客 提交于 2019-11-26 12:44:33
问题 I am am trying out colaboratory with plotly notebook mode - I open a new notebook, copy and paste the following simple example from plotly\'s documentation, but don\'t see an output. There is a large blank in the output space where the plot whould normally be. This works fine in my local notebook (which is a newer version of plotly, but per their docs offline mode should work with the google colab version) Any ideas? import plotly from plotly.graph_objs import Scatter, Layout plotly.offline

Colaboratory: Can I access to my Google drive folder and file?

≡放荡痞女 提交于 2019-11-26 12:38:25
问题 Google Colaboratory is really cool, but it would be more useful if I can access all my google drive files, without using standard google drive API. Is it possible and easy? and how? 回答1: Here's an example of using a FUSE Drive interface to access your Drive files like local files: https://colab.research.google.com/notebook#fileId=1srw_HFWQ2SMgmWIawucXfusGzrj1_U0q In short: # Load the Drive helper and mount from google.colab import drive drive.mount('/content/drive') After executing the code

Using Kaggle Datasets in Google Colab

我是研究僧i 提交于 2019-11-26 12:02:35
问题 Is it possible to use any datasets available via the kaggle API in Google Colab? I see the Kaggle API is used in this Colab notebook, but it\'s a bit unclear to me what datasets it provides access to. 回答1: Step-by-step -- Create an API key in Kaggle. To do this, go to kaggle.com/ and open your user settings page. Next, scroll down to the API access section and click generate to download an API key. This will download a file called kaggle.json to your computer. You'll use this file in Colab to

Can I use TensorBoard with Google Colab?

末鹿安然 提交于 2019-11-26 06:59:28
问题 Is there any way to use TensorBoard when training a TensorFlow model on Google Colab? 回答1: EDIT: You probably want to give the official %tensorboard magic a go, available from TensorFlow 1.13 onward. Prior to the existence of the %tensorboard magic, the standard way to achieve this was to proxy network traffic to the Colab VM using ngrok. A Colab example can be found here. These are the steps (the code snippets represent cells of type "code" in colab): Get TensorBoard running in the

Google Colab: how to read data from my google drive?

自作多情 提交于 2019-11-26 06:15:51
问题 The problem is simple: I have some data on gDrive, for example at /projects/my_project/my_data* . Also I have a simple notebook in gColab. So, I would like to do something like: for file in glob.glob(\"/projects/my_project/my_data*\"): do_something(file) Unfortunately, all examples (like this - https://colab.research.google.com/notebook#fileId=/v2/external/notebooks/io.ipynb, for example) suggests to only mainly load all necessary data to notebook. But, if I have a lot of pieces of data, it