Created
April 23, 2023 21:46
-
-
Save FredyRosero/52bf58a7a169f686648bd880b1027594 to your computer and use it in GitHub Desktop.
Importar python en Jupyter desde URL de Google Drive
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#@title Importar archivo python | |
# Obtener archivo python desde la URL | |
import gdown | |
fileID='1XON75rGGJIILlUBMJ-De2Bjy0YGaFQXc' | |
url = f'https://drive.google.com/uc?id={fileID}' | |
nombreModulo= 'solucionadorPLDosVariables' | |
nombreArchivo = f'{nombreModulo}.py' | |
%store nombreArchivo | |
output = f'/content/{nombreArchivo}' | |
gdown.download(url, output, quiet=False) | |
# Import | |
import importlib | |
modulo = importlib.import_module(nombreModulo) | |
globals()['solver'] = modulo | |
print(solver) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment