Using VSCode(codeserver) on Google Colab

colabcode is an awesome python package since it allows us to use VSCode(codeserver) on Google Colab/Kaggle with only 3 lines.

3lines

!pip install colabcode
from colabcode import ColabCode
ColabCode(port=10000)

Install PyPI package

As I mentioned, we need to install colabcode to use VSCode on Google Colab. The first line is to install the package.
Pretty straight forward.

!pip install colabcode

Run VSCode via colabcode

If you know python a little bit, these 2 lines are pretty easy to understand. from xxx import yyy is for importing a package. Then, the second is to create an instance. Done lol.

from colabcode import ColabCode
ColabCode(port=10000)
optional arguments:
--password PASSWORD password to protect your code-server from unauthorized access
--mount_drive if you use --mount_drive, your google drive will be mounted

How to Use

python

Image for post
Image for post
Image for post
Image for post

nodejs

As you know, Google Colab is for python. However, with VSCode you can use nodejs. The version of nodejs is out of date, v8.11.3. But if you want to do something quickly with nodejs, this may be useful.

Written by

#CreativeCoding #Art #PhysicalComputing #IoT #MachineLearning #python #creativetech

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store