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 |
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
Le modèle Black-Scholes ou modèle Black-Scholes-Merton qui est un modèle mathématique du marché pour une action, | |
dans lequel le prix de l'action est un processus stochastique en temps continu; par opposition au | |
"modèle Cox Ross-Rubinstein" qui suit un processus stochastique en temps discret. | |
######################################## | |
Les inputs : | |
S: spot price | |
K: strike price | |
T: time to maturity |
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 as m | |
### Les différents input ### | |
S = 100 | |
k = 100 | |
r = .05 #le taux sans risque | |
v = .3 | |
T = 20/36 |
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
#!/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
#!/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
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
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
#include <stdio.h> | |
int pgcd(int a, int b) { | |
while(b != 0) { | |
int tmp = b; | |
b = a % b; | |
a = tmp; | |
} | |
return a; |
OlderNewer