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
<script> | |
// https://stackoverflow.com/questions/64689086/infinite-counter-with-increment-at-two-decimals | |
function Incro(increment, interval, execFunc){ | |
let iv; | |
this.increment = increment; this.interval = interval; this.execFunc = execFunc; this.sum = 0; | |
this.start = ()=>{ | |
iv = setInterval(()=>{ | |
this.sum += this.increment; this.execFunc(); | |
}, this.interval); | |
return this; |
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 calculate_delivery_estimate(todays_date, current_weekday): | |
'''Calculates a delivery estimate based on today's date and day of week''' | |
# average time in minutes that it took for a transfer complete | |
# when it was created on that day of the week | |
# this data only represents Payment Type A in a single currency_corridor. | |
# it also already has total transfer time delivery outliers removed. | |
weekday_delivery_avg_minutes = { | |
'Fri': 5677.73, | |
'Mon': 2918.34, |
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
<HTML> | |
<body> | |
{{table}} | |
</body> | |
</HTML> |
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
from sqlalchemy import create_engine | |
engine = create_engine('mysql://username:password@hostname:port/database_name') | |
dataframe.to_sql('table_name', con=engine, flavor='mysql', if_exists='append', index=False) |