minor update
This commit is contained in:
parent
0fce80aac1
commit
f8e9a148f3
@ -1,3 +1,3 @@
|
||||
symbol,name,base,current,24hr change
|
||||
BTC,bitcoin,usd,36574,13.332115883704576
|
||||
ETH,ethereum,gbp,1838.29,6.811992501784067
|
||||
BTC,bitcoin,usd,36550,12.472300235837876
|
||||
ETH,ethereum,gbp,1838.88,5.808310892121005
|
||||
|
|
@ -1 +1 @@
|
||||
{"main_weather": "Clouds", "description": "scattered clouds", "temp": 27.76, "min_temp": 26.64, "max_temp": 28.87, "feels_like": 33, "humidity": 90, "clouds": 26, "wind_speed": 0.45, "wind_direction": 42, "visibility": 10000, "uv": 0, "rain_chance": 0.41}
|
||||
{"main_weather": "Clouds", "description": "scattered clouds", "temp": 27.71, "min_temp": 26.64, "max_temp": 28.51, "feels_like": 32.84, "humidity": 90, "clouds": 26, "wind_speed": 2.68, "wind_direction": 90, "visibility": 10000, "uv": 0, "rain_chance": 0.41}
|
@ -1 +1 @@
|
||||
[{"main_weather": "Rain", "description": "light rain", "min_temp": 27.38, "max_temp": 29.43}, {"main_weather": "Rain", "description": "light rain", "min_temp": 27.12, "max_temp": 29.24}, {"main_weather": "Rain", "description": "moderate rain", "min_temp": 27.26, "max_temp": 29.02}, {"main_weather": "Rain", "description": "moderate rain", "min_temp": 27.42, "max_temp": 28.3}, {"main_weather": "Rain", "description": "moderate rain", "min_temp": 27.69, "max_temp": 28.6}, {"main_weather": "Rain", "description": "moderate rain", "min_temp": 28.04, "max_temp": 29.2}, {"main_weather": "Rain", "description": "moderate rain", "min_temp": 27.96, "max_temp": 28.81}, {"main_weather": "Rain", "description": "moderate rain", "min_temp": 28.06, "max_temp": 30.03}]
|
||||
[{"main_weather": "Rain", "description": "light rain", "min_temp": 27.37, "max_temp": 29.43}, {"main_weather": "Rain", "description": "light rain", "min_temp": 27.12, "max_temp": 29.24}, {"main_weather": "Rain", "description": "moderate rain", "min_temp": 27.26, "max_temp": 29.02}, {"main_weather": "Rain", "description": "moderate rain", "min_temp": 27.42, "max_temp": 28.3}, {"main_weather": "Rain", "description": "moderate rain", "min_temp": 27.69, "max_temp": 28.6}, {"main_weather": "Rain", "description": "moderate rain", "min_temp": 28.04, "max_temp": 29.2}, {"main_weather": "Rain", "description": "moderate rain", "min_temp": 27.96, "max_temp": 28.81}, {"main_weather": "Rain", "description": "moderate rain", "min_temp": 28.06, "max_temp": 30.03}]
|
@ -1 +1 @@
|
||||
09/06/2021 14:00:57
|
||||
09/06/2021 14:12:15
|
||||
|
|
@ -1,4 +1,4 @@
|
||||
name,current,opening
|
||||
MSFT,254.87,253.81
|
||||
NFLX,490.31,494.5
|
||||
GOOG,2501.71,2499.5
|
||||
MSFT,254.81,253.81
|
||||
NFLX,490.17,494.5
|
||||
GOOG,2497.83,2499.5
|
||||
|
|
BIN
final1.ppm
BIN
final1.ppm
Binary file not shown.
@ -93,9 +93,10 @@ class StockTicker():
|
||||
# C functions can certainly be faster.
|
||||
img_width, img_height = image.size
|
||||
pixels = image.load()
|
||||
for x in range(max(0,-offset_x), min(img_width, self.matrix.width - offset_x)):
|
||||
for y in range(max(0, -offset_y), min(img_height, self.matrix.height - offset_y)):
|
||||
for x in range(max(0,-offset_x), min(img_width, self.matrix.width - offset_x)):
|
||||
|
||||
for y in range(max(0, -offset_y), min(img_height, self.matrix.height - offset_y)):
|
||||
|
||||
(r, g, b) = pixels[x, y]
|
||||
if min_x <= x + offset_x <= max_x and min_y <= y + offset_y <= max_y:
|
||||
self.matrix.SetPixel(x + offset_x, y + offset_y, r*self.brightness, g*self.brightness, b*self.brightness)
|
||||
@ -549,11 +550,11 @@ class StockTicker():
|
||||
change = 1/current - 1/yesterday
|
||||
print(change)
|
||||
current = 1/current
|
||||
current = '%.2f' % current
|
||||
current = '%.3f' % current
|
||||
|
||||
|
||||
arrow, change = self.getArrow(change)
|
||||
change = '%.5f' % change
|
||||
change = '%.6f' % change
|
||||
midFrame = self.textToImage(currency + '(' + base + ')', current, change, arrow) #IMAGE THE TEXT
|
||||
|
||||
|
||||
@ -1059,9 +1060,9 @@ if __name__ == '__main__':
|
||||
|
||||
|
||||
#stock_ticker.displayText()
|
||||
stock_ticker.getFullStockImage(1)
|
||||
stock_ticker.process_msg('f')
|
||||
stock_ticker.displayStocks()
|
||||
#stock_ticker.getFullStockImage(1)
|
||||
#stock_ticker.process_msg('f')
|
||||
#stock_ticker.displayStocks()
|
||||
#stock_ticker.displayStocks()
|
||||
|
||||
#stock_ticker.delay = 0.001
|
||||
|
Loading…
Reference in New Issue
Block a user