This file contains hidden or 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
| cp <FICHIER_SOURCE> <FICHIER_DESTINATION> | |
| # Exemple: cp dossier_source/fichier.txt dossier_destination/fichier.txt |
This file contains hidden or 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
| import torch | |
| max_tensor = torch.maximum(x1, x2) # où x1 et x2 sont deux tenseurs que vous avez définis au préalable. |
This file contains hidden or 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
| value = 7 / 3 | |
| print(f"{value:.2e}") | |
| >>> 4.29e-01 |
This file contains hidden or 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
| import plotly.io as pio | |
| # La ligne suivante assure que les sorties de plotly fonctionnent dans différents endroits. | |
| pio.renderers.default = "plotly_mimetype+notebook" |
This file contains hidden or 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
| # Importations. | |
| import matplotlib.pyplot as plt | |
| # Valeurs pour l'exemple. | |
| x = [4, 1, 3, 5, 6] | |
| y = [2, 7, 2, 9, 5] | |
| # Tracé. | |
| plt.scatter(x, y) |
This file contains hidden or 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
| # Importations. | |
| import matplotlib.pyplot as plt | |
| # Valeurs pour l'exemple. | |
| x = [3, 1, 4, 6, 7] | |
| y = [2, 4, 7, 5, 4] | |
| # Tracé. | |
| plt.scatter(x, y) | |
| plt.show() |
This file contains hidden or 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
| import os | |
| os.environ['CUDA_LAUNCH_BLOCKING'] = "1" | |
| import torch |
OlderNewer