How to run Python online
-
Using Github + MyBinder You first upload your Python script and a Jupyter notebook to a publish Github repository . Copy the link of that repository and past it to MyBinder and
launch
it. Now you may run the script via the notebook by typing% run 'name_script.py'
-
Using Github + Colab. You first upload your Python script and a Jupyter notebook to a publish Github repository. You go to this Colab notebook and type
!git clone 'https://github.com/name/name_repository' %cd 'name_repository' !pwd % run 'name_script.py'
To run a private repository, we use need token.
!git clone 'https://name:token@github.com/name/name_repository' %cd 'name_repository' !pwd % run 'name_script.py'
-
Using Drive + Colab. You first upload your Python script to your Drive. Then go to this Colab notebook and type
from google.colab import drive drive.mount('/content/drive') %cd 'drive/MyDrive/link_to_script' !pwd %run 'name_script.py'
-
Using R Studio Cloud. It is actually a powerful cloud free-platform for R (a programming language for statisticians), but it is still possible to run Python on it. Here is the website of R Studio Cloud.
-
Using Jupyter Go to Jupyter's website and choose, for example, Jupyter Lab and then you can run python on the notebook. It is based on MyBinder project, thus allows only 1GB RAM is available. But it provide an amazing working environment. Jupyter Lab.
-
Using Brython. Brython is a Pythonique syntax and based on Javascript. It can be run on browser. The newest version is Brython 3.9.1 and it is still unstable, but probably it will be the trend in the comming years.Brython.
-
Using Repl.it. Repl.it is a free platform providing most of programming languages nowaday. It has 1.5GB RAM free and all project will be publish with free-account. Repl.it.
-
Using Glot.io. Glot.io also provide an environment for writing many programming languages, except R. You don't need to register to run the code, it is amazing! glot.io.