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
@tailwind base; | |
@tailwind components; | |
@tailwind utilities; | |
@layer base { | |
html { | |
font-family: 'Rubik', system-ui, sans-serif; | |
} | |
} |
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
//here load libraries (html2gif and gif.js) | |
async startRecording() { //record the gif and export it | |
const hiddenCanvas = document.getElementById('hiddenCanvas'); | |
const ctx = hiddenCanvas.getContext('2d'); | |
const yourDiv = document.getElementById('capture'); | |
hiddenCanvas.width = 480 | |
hiddenCanvas.height = 480 |
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
# Online Python - IDE, Editor, Compiler, Interpreter | |
import random | |
loteries = [(15, 20, 65), | |
(10, 20, 70), | |
(25, 15, 60)] | |
current_lot_nb = random.randint(1,len(loteries)) #tu tires un nombre aléatoire entre 1 et ton nombre max de loterie |
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
#On utilise ce fichier comme wd | |
setwd(dirname(rstudioapi::getSourceEditorContext()$path)) | |
#On importe le tidyverse et les utilitaires | |
library("tidyverse") | |
#Package pour la visualisation et tests statistiques : | |
library("ggpubr") | |
library("stargazer") | |
library("summarytools") | |
library("wesanderson") #echelle de couleurs | |
library("sandwich") #pour l'hétérogénité des 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
def animalYears (firtYear, secondYear, afterThirdYear, animalYears) | |
HumanYears = 0 | |
res = animalYears - firtYear | |
if res <= 0 | |
HumanYears = 1 | |
return HumanYears | |
res = res - secondYear | |
if res <= 0 | |
HumanYears = 2 | |
return HumanYears |
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
library("caret") | |
library("mice") | |
library("kknn") | |
data = read.csv2("~/Desktop/data.csv", sep = ";", dec = ",") | |
data = data[, c(-1, -3)] | |
data[, 1] = as.factor(data[, 1]) | |
class(data[,1]) |
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
#On install la librairie tidyquant qui nous aide à récupérer les données financiéres | |
install.packages("tidyquant") | |
#On charge la librairie pour pouvoir l'utiliser | |
library("tidyquant") | |
#On crée un vecteur qui contient nos tickers (REMARQUE : il s'agit des nom de tickers exacts de YAHOO finance) | |
tickers = c("CABK.MC","BBVA.MC") | |
#Date de départ à partir de laquelle récupérer les prix | |
date_start = as.Date("2015-01-01") | |
#Date de fin |
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
# Loading libraries | |
library("tidyverse") | |
library("jsonlite") | |
library("shiny") | |
library("ggplot2") | |
library("tidyquant") | |
library("PortfolioAnalytics") | |
library("scales") |
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
body { | |
background-color: #00FFAB; | |
} | |
#container { | |
margin: auto; | |
width: 600px; | |
} | |
#myCanvas { |
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
#Importation et installation des librairires utiles | |
# 0.1 Instalation et chargement des packages | |
install.packages("tidyquant") #Permet la construction de portefeuille et la manipulation des données financiéres | |
install.packages("PortfolioAnalytics") #Permet le calcul des rendements et mesures de risques | |
#Puis on les charges | |
library("tidyquant") | |
library("PortfolioAnalytics") | |
# REMARQUE | |
# On assume que il existe une variable xts du nom de portfolio_returns qui contient les retours MENSUELS du portefeuille à tester |