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
version: '3' | |
services: | |
nginx: | |
image: nginx:1.15-alpine | |
ports: | |
- "80:80" | |
- "443:443" | |
volumes: | |
- ./nginx:/etc/nginx/conf.d |
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
## install homebrew | |
echo "Installing Homebrew.." | |
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
echo "Homebrew successfully installed" | |
## install brew cask | |
echo "Installing brew cask.." | |
brew tap homebrew/cask | |
echo "Homebrew cask successfully installed" |
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
# -*- coding: utf-8 -*- | |
from datetime import datetime, timedelta | |
from airflow import DAG | |
from airflow.operators import GoogleApiToS3Transfer | |
default_args = { | |
'owner': 'airflow', | |
'start_date': datetime(2019, 6, 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
import pandas as pd | |
# in the end, I went for a recursive function because tags can be arbitrarily nested | |
def extract_from_dict(var, key): | |
if isinstance(var, dict): | |
for k, v in var.items(): | |
if k == key: | |
yield v | |
if isinstance(v, (dict, list)): | |
yield from gen_dict_extract(v, key) |
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 | |
from matplotlib import pyplot as plt | |
%matplotlib inline | |
n = range(1, 100) | |
phi = (3 - np.sqrt(5)) * np.pi | |
for a in [0.98, 0.985, 0.99, 0.995, 1, 1.005, 1.01, 1.015, 1.02]: | |
fig = plt.figure() | |
r = np.sqrt(n) |
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
# Fomule du pret pour obtenir la mensualite | |
def pmt(C, n, t): | |
if t: | |
return (C * t/12)/(1-(1 + t/12)**-n) | |
else: | |
return C/n | |
# Formule pour obtenir la part d'interets de la mensualite | |
def impt(period, C, n, t): | |
t_per = t/12 |
NewerOlder