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
import math | |
import matplotlib.pyplot as plt | |
X = 50 | |
X0 = 30 | |
L = 30000 | |
K = 0.5 | |
#X indique le temps, supposons qu'il commence au jour 0 et s'arrête après 50 jours. | |
#X0 indique le moment où la croissance exponentielle s'arrête, disons après 30 jours. |
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
def calcule(a, b, c) : | |
return (a+b) *c | |
a = calcule(1,2,3) | |
b = calcule ('pommes ', 'et oranges, ', 3) | |
print(a) | |
print(b) | |
# Les entiers et les str n'ont pas de lien entre eux, pourtant la fonction calcule() ne provoque pas d'erreurs |
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
#include <stdio.h> | |
int pgcd(int a, int b) { | |
while(b != 0) { | |
int tmp = b; | |
b = a % b; | |
a = tmp; | |
} | |
return a; |
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
Function my_convert(ch As String) As String | |
Dim dict As New Scripting.Dictionary 'Nécessite d'importer Microsoft Scripting Runtime | |
dict.Add Key:="A", Item:=10 | |
dict.Add Key:="B", Item:=11 | |
dict.Add Key:="C", Item:=12 | |
dict.Add Key:="D", Item:=13 | |
dict.Add Key:="E", Item:=14 | |
dict.Add Key:="F", Item:=15 |
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
import yagmail | |
import random | |
from datetime import datetime | |
yag = yagmail.SMTP("email_envoyeur@gmail.com","mot_de_passe") | |
quote = "" | |
date = datetime.today().strftime('%d-%m-%Y') |
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
#!/usr/bin/env python | |
# coding: utf-8 | |
# # Imports & Params | |
import numpy as np | |
import pandas as pd | |
import matplotlib.pyplot as plt | |
from sklearn import linear_model | |
import seaborn as sns | |
from sklearn.model_selection import train_test_split |
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
#!/usr/bin/env python | |
# coding: utf-8 | |
# Code partiel, l'originial étant fait sur Jupyter | |
## Imports & Param's | |
import numpy as np | |
import matplotlib.pyplot as plt | |
from sklearn.datasets import fetch_openml | |
from sklearn.model_selection import train_test_split | |
from sklearn import neighbors |
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
## Imports & Params | |
import numpy as np | |
import pandas as pd | |
import matplotlib.pyplot as plt | |
from sklearn import linear_model | |
# On charge le dataset |
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
''' | |
n = nombre de fois où l'aiguille est lancée | |
nbEssais = nombre de fois où l'expérience est répetée | |
a = longueur de l'aiguille | |
b = distance entre 2 lattes | |
theta = l'angle formée par l'aiguille et la latte | |
xcenter = les cordonnées x de l'aiguille sur le sol | |
On limite les valeurs theta et du centre comme suit : |
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
import numpy as np | |
import math | |
### Parameters ### | |
sigma = 0.3 | |
T = 200 | |
dt = 1/2000 | |
q = 0. #dividendes rate |