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 requests | |
import time | |
import decimal | |
lastPrice = decimal.Decimal("0") | |
while True: | |
ret = requests.get("https://coinbase.com/api/v1/prices/spot_rate").json() | |
price = decimal.Decimal(ret['amount']) | |
diff = price - lastPrice | |
if diff > 0: |
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 os | |
import time | |
expander = {"n":"\n", "s": " ", "q": "~~~~~~"} | |
os.system(['clear','cls'][os.name == 'nt']) | |
animation = [] | |
animation.append("""nnnnnnqqq""") | |
animation.append("""n/nnnnnqqq""") | |
animation.append("""n /n/nnnnqqq""") |
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 sys | |
def getContents(inFile): | |
return sorted(list(set(inFile.read().split("\n"))), key=lambda k: k.lower()) | |
lFileName = raw_input("Enter the first file name: ") if len(sys.argv) < 2 else sys.argv[1] | |
with open(lFileName, "r") as left: | |
leftLines = getContents(left) | |
rFileName = raw_input("Enter the second file name: ") if len(sys.argv) < 3 else sys.argv[2] |
NewerOlder