google-colaboratory

How to delete a locally uploaded file on google colab?

↘锁芯ラ 提交于 2020-05-10 04:11:36
问题 I'm trying to delete a file that I uploaded on Google colab using the following code: from google.colab import files uploaded = files.upload() How to delete the file now? e.g If the file's name is 'sample.jpg' . 回答1: Try this !rm sample.jpg Then check that it is gone with !ls -al Update (nov 2018) Now you can click to open left pane, browse the files tab, then right click to select and delete a file. 回答2: Answer from @Korakot works for a single file and in case, to delete entire folder or

Display / Render an HTML file inside Jupyter Notebook on Google Colab platform

安稳与你 提交于 2020-05-09 20:20:50
问题 I am using Google Colab to work create maps with Python 3.0 and I have done so using Basemaps. I am next trying to create similar maps using Google Maps. There are two python packages that I have located namely gmaps and gmplot. It seems as if gmaps requires a google API but gmplot does not hence I am using gmplot. With gmplot, I am able to create a file 'my_map.html' which if I download to my local desktop, I can open in a browser and see the map correctly. However I would like to see the

bug(?) with “Mount drive” web-button in colab. Accessing “shared with me” files from google colab (y2020, previous solutions seem to fail)

一笑奈何 提交于 2020-05-09 07:53:28
问题 [New Edit:] It became clear that problem below arises ONLY if mount the google drive to colab by via web interface button "Mount Drive" and does NOT appear if mount by command line way. So seems web way is bugged. See details in my own answer below. It is checked for "Chrome" browser. ================================================================== [Original question:] How to access "shared with me" from google colab ? (Interface seems changed now (2020) and previously described solutions

Read file from drive in google colab

假如想象 提交于 2020-05-09 05:09:34
问题 I Have read the notebook about how to open drive. I already did as instructed using: from google.colab import drive drive.mount('/content/drive') After this, I can use !ls to list the contents of my drive but I cannot read or open any file. I already tried: with open("/content/drive/My Drive/filename.ext", "r") as file: file = open("/content/drive/My Drive/filename.ext", "r") !cp "/content/drive/My Drive/filename.ext" "filename.ext" and also import pandas as pd file = pd.read_csv("/content

Is there a general way to run Web Applications on Google Colab?

我与影子孤独终老i 提交于 2020-05-08 13:50:08
问题 I would like to develop web apps in Google colab. The only issue is that you need a browser connected to local host to view the web app, but Google colab doesn't have a browser inside the notebook. But it seems that there are ways around this. For example run_with_ngrok is a library for running flaks apps in colab/jupyter notebooks https://github.com/gstaff/flask-ngrok#inside-jupyter--colab-notebooks When you use it, it gives a random address , "Running on http://.ngrok.io" And somehow the

Is there a general way to run Web Applications on Google Colab?

前提是你 提交于 2020-05-08 13:49:09
问题 I would like to develop web apps in Google colab. The only issue is that you need a browser connected to local host to view the web app, but Google colab doesn't have a browser inside the notebook. But it seems that there are ways around this. For example run_with_ngrok is a library for running flaks apps in colab/jupyter notebooks https://github.com/gstaff/flask-ngrok#inside-jupyter--colab-notebooks When you use it, it gives a random address , "Running on http://.ngrok.io" And somehow the

tf.data.Dataset: The `batch_size` argument must not be specified for the given input type

老子叫甜甜 提交于 2020-05-08 06:48:37
问题 I'm using Talos and Google colab TPU to run hyperparameter tuning of a Keras model. Note that I'm using Tensorflow 1.15.0 and Keras 2.2.4-tf. import os import tensorflow as tf import talos as ta from tensorflow.keras.models import Sequential from tensorflow.keras.layers import Dense from tensorflow.keras.optimizers import Adam from sklearn.model_selection import train_test_split def iris_model(x_train, y_train, x_val, y_val, params): # Specify a distributed strategy to use TPU resolver = tf

tf.data.Dataset: The `batch_size` argument must not be specified for the given input type

感情迁移 提交于 2020-05-08 06:47:58
问题 I'm using Talos and Google colab TPU to run hyperparameter tuning of a Keras model. Note that I'm using Tensorflow 1.15.0 and Keras 2.2.4-tf. import os import tensorflow as tf import talos as ta from tensorflow.keras.models import Sequential from tensorflow.keras.layers import Dense from tensorflow.keras.optimizers import Adam from sklearn.model_selection import train_test_split def iris_model(x_train, y_train, x_val, y_val, params): # Specify a distributed strategy to use TPU resolver = tf

How to install CUDA in Google Colab GPU's

こ雲淡風輕ζ 提交于 2020-04-27 21:10:16
问题 It seems that Google Colab GPU's doesn't come with CUDA Toolkit, how can I install CUDA in Google Colab GPU's. I am getting this error in installing mxnet in Google Colab. Installing collected packages: mxnet Successfully installed mxnet-1.2.0 ERROR: Incomplete installation for leveraging GPUs for computations. Please make sure you have CUDA installed and run the following line in your terminal and try again: pip uninstall -y mxnet && pip install mxnet-cu90==1.1.0 Adjust 'cu90' depending on

How to install CUDA in Google Colab GPU's

六眼飞鱼酱① 提交于 2020-04-27 21:09:10
问题 It seems that Google Colab GPU's doesn't come with CUDA Toolkit, how can I install CUDA in Google Colab GPU's. I am getting this error in installing mxnet in Google Colab. Installing collected packages: mxnet Successfully installed mxnet-1.2.0 ERROR: Incomplete installation for leveraging GPUs for computations. Please make sure you have CUDA installed and run the following line in your terminal and try again: pip uninstall -y mxnet && pip install mxnet-cu90==1.1.0 Adjust 'cu90' depending on