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
''' | |
Display full screen slide show using all images from the specified directory. | |
''' | |
import pygame | |
import os | |
import time | |
EACH_FRAME_TIME = 10 # each frame 10 seconds | |
IMAGES_DIR = '/home/backend/images' |
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
def late_interest_to_yearly_net_interest(total_money, monthly_payment, number_installement, lr=1e-3, max_error=0.01, cc=True): | |
""" | |
I am going to buy a product. They offer 3 installements with delay interest of 8 USD. | |
If I buy without any installements, I will pay 235 USD. | |
Considering the first installement always the same as singel installement, how much interest do I pay monthly and yearly (compound corrected)? | |
Algorithm: Simple gradient descent | |
Args: | |
total_money: total money to be paid when there is a single installement |