Difference between revisions of "Python: snippets"

From Research management course
Jump to: navigation, search
(Created page with "Papers on Machine learning refer to the code of computational experiments to reproduce. Selecting a shell and setting up an environment to execute an alien project takes time....")
 
Line 1: Line 1:
 
Papers on Machine learning refer to the code of computational experiments to reproduce. Selecting a shell and setting up an environment to execute an alien project takes time.  Below we collect some useful tips on how to start and organize work on alien projects.
 
Papers on Machine learning refer to the code of computational experiments to reproduce. Selecting a shell and setting up an environment to execute an alien project takes time.  Below we collect some useful tips on how to start and organize work on alien projects.
 +
 +
How to install to
 +
 +
 +
 +
To import modules from  custom py-files, mount the Google-drive
 +
from google.colab import drive
 +
drive.mount('/content/drive')
 +
import sys
 +
sys.path.insert(0,'/content/drive/MyDrive/MyProject')
 +
% download the files to the folder, namely utils.py
 +
% and import desired functions from it
 +
from utils import *

Revision as of 00:24, 23 March 2023

Papers on Machine learning refer to the code of computational experiments to reproduce. Selecting a shell and setting up an environment to execute an alien project takes time. Below we collect some useful tips on how to start and organize work on alien projects.

How to install to


To import modules from custom py-files, mount the Google-drive

from google.colab import drive
drive.mount('/content/drive')
import sys
sys.path.insert(0,'/content/drive/MyDrive/MyProject')
% download the files to the folder, namely utils.py
% and import desired functions from it
from utils import *