google-colaboratory

Changing the System Time in Google Colaboratory

岁酱吖の 提交于 2019-12-11 01:03:48
问题 I would like to use my local time as the System Time in Google Colab, but I believe by default it is set to UTC time as indicated here: Current Date Format How am I able to change the system time to my local time? 回答1: Here's how to do it. For me, I live in Asia/Bangkok !rm /etc/localtime !ln -s /usr/share/zoneinfo/Asia/Bangkok /etc/localtime !date Now I get Tue Apr 30 20:12:30 +07 2019 . You can see the list of timezones by !ls -al /usr/share/zoneinfo And go into sub-directories for each

UserWarning: MovieWriter ffmpeg unavailable

左心房为你撑大大i 提交于 2019-12-11 00:08:17
问题 trying to make animation on google colab. getting this warning: UserWarning: MovieWriter ffmpeg unavailable warnings.warn("MovieWriter %s unavailable" % writer) did pip install ffmpeg-normalize but no use. How to deal with this? 来源: https://stackoverflow.com/questions/49095392/userwarning-moviewriter-ffmpeg-unavailable

How to directly upload a Jupyter notebook from Local Machine onto Google Collab? Is there a way to do this?

扶醉桌前 提交于 2019-12-10 22:00:59
问题 Currently I have the Jupyter notebook on my local machine. It will be helpful if I could directly export it to Google Collab rather than copy pasting it? 回答1: For me, I go to https://drive.google.com Then upload the notebook file to folder 'Colab Notebooks', then open it from there. Another, simpler way, is the go to the menu in Colab File > Upload notebook... Select the notebook file to upload Now (nov 2018) another simpler way is to click open the left pane. Click File tab, then click

How to fix google colab cutting of plots of confusion matrices

╄→гoц情女王★ 提交于 2019-12-10 21:14:26
问题 I'm trying to create a confusion matrix on google colab but once I plot it and try to save it the top and the bottom of the plot get cut off. Is there any way to fix this? %matplotlib inline import seaborn as sn import pandas as pd import matplotlib.pyplot as plt from google.colab import files array = [[1, 0, 0], [0, 1, 0.0101], [0, 0, 0.9898]] df_cm = pd.DataFrame(array, index = ["REM", "Wake", "NREM"], columns = ["REM", "Wake", "NREM"],) plt.figure(figsize = (10,7)) sn.heatmap(df_cm, annot

pandas.read_clipboard from cloud-hosted jupyter?

孤街浪徒 提交于 2019-12-10 15:38:41
问题 I am running a Data8 instance of JupyterHub running JupyterLab on a server, and pd.read_clipboard() does not seem to work. I see the same problem in google colab. import pandas as pd pd.read_clipboard() errors out like so: --------------------------------------------------------------------------- PyperclipException Traceback (most recent call last) <ipython-input-2-8cbad928c47b> in <module>() ----> 1 pd.read_clipboard() /opt/conda/lib/python3.6/site-packages/pandas/io/clipboards.py in read

I trained a keras model on google colab. Now not able to load it locally on my system.

。_饼干妹妹 提交于 2019-12-10 14:36:30
问题 with open('2model.json','r') as f: json = f.read() model = model_from_json(json) model.load_weights("color_tensorflow_real_mode.h5") I trained a keras model on google colab. Now not able to load it locally on my system. Getting this error: ValueError: Unknown initializer: GlorotUniform How to solve this?? Every time I make a model on colab and try loading it locally I am unable to do so. Getting this error message: ---------------------------------------------------------------------------

Google Colab not updating package?

这一生的挚爱 提交于 2019-12-10 13:50:03
问题 I am trying to use seaborn==0.8.1 in an ipynb on Google colab. Here is my code: """General import statements and settings config.""" !pip install seaborn==0.8.1 import pandas as pd import numpy as np import matplotlib.pyplot as plt import seaborn as sns %matplotlib inline pd.set_option('max_columns', 10) color = sns.color_palette()[0] print (sns.__version__) However, this outputs the following: Requirement already satisfied: seaborn==0.8.1 in /usr/local/lib/python3.6/dist-packages (0.8.1) 0.7

resetting colaboratory to factory settings

主宰稳场 提交于 2019-12-10 13:43:29
问题 I stupidly (?) pip-installed tensorflow-gpu, and now import tensorflow as tf fails with an error (it can't find some shared libraries). Is there a way to reset the environment to "factory settings"? 回答1: To drop your current backend and start fresh with a new one, select the command 'Reset all runtimes...' from the Runtime menu. 来源: https://stackoverflow.com/questions/49961289/resetting-colaboratory-to-factory-settings

How to read files inside a folder in Drive inside a notebook

a 夏天 提交于 2019-12-10 11:59:02
问题 I want to read the dataset from drive inside Google Colab Notbook. how can I do that? I did something like this but it's not working. train_data_dir = "data/train/" validation_data_dir = "data/validation/" The data folder is like this: data/ train/ dogs/ dog001.jpg dog002.jpg ... cats/ cat001.jpg cat002.jpg ... validation/ dogs/ dog001.jpg dog002.jpg ... cats/ cat001.jpg cat002.jpg ... 回答1: I found a solution using the Drive FUSE wrapper you have to install the drive fuse wrapper then make a

How to access files on Google Colab notebook

心已入冬 提交于 2019-12-10 11:48:05
问题 How can I access the files on the left bar of Google Colab? By default sample data is given, when I run !ls sample_data command it lists the files as it should: anscombe.json mnist_test.csv california_housing_test.csv mnist_train_small.csv california_housing_train.csv README.md But when I run following code: import pandas as pd data = pd.read_csv('content/sample_data/mnist_test.csv') print(data.head()) I get an error: FileNotFoundError 回答1: using upload will place the files under / if you