Skip to content

Instantly share code, notes, and snippets.

@look416
look416 / vendingMachine.py
Last active February 21, 2022 05:28
VendingMachine
def calculateChange(balance, amount):
if balance < amount:
raise Exception("Insufficient funds")
denominator = [100,50,20,10,5,1]
result = []
change = balance - amount
for deno in denominator:
num = change // deno
@look416
look416 / GF-2K
Last active January 19, 2021 16:08
spy-hourly
date,open-2k,high-2k,low-2k,close-2k,volume-2k
30/04/2004,567.25,570.27,558.57,559.8,0
03/05/2004,559.8,568.38,559.8,565.48,0
04/05/2004,565.48,575.39,565.18,569.64,0
05/05/2004,569.63,573.28,568.92,570.06,0
06/05/2004,570.06,570.06,556.97,563.09,0
07/05/2004,563.09,566.28,548.56,548.56,0
10/05/2004,548.56,548.56,533.51,537.86,0
11/05/2004,537.86,548.69,537.86,548.67,0
12/05/2004,548.63,549.28,534.41,548.99,0