buug fixes

This commit is contained in:
Neythen 2021-07-28 19:55:55 +01:00
parent 3c0907baf6
commit 640d25dc0b
15 changed files with 66 additions and 59 deletions

View File

@ -1,4 +1,4 @@
symbol,name,base,current,24hr change symbol,name,base,current,24hr change
BTC,bitcoin,usd,37791,-3.5064161412834833 BTC,bitcoin,usd,40840,7.470469950373753
ETH,ethereum,gbp,1608.87,-5.529203500553435 ETH,ethereum,gbp,1688.85,4.84874662401072
DOGE,dogecoin,usd,0.199271,-10.734868356523817 DOGE,dogecoin,usd,0.210276,5.072216331731451

1 symbol name base current 24hr change
2 BTC bitcoin usd 37791 40840 -3.5064161412834833 7.470469950373753
3 ETH ethereum gbp 1608.87 1688.85 -5.529203500553435 4.84874662401072
4 DOGE dogecoin usd 0.199271 0.210276 -10.734868356523817 5.072216331731451

View File

@ -1 +1 @@
["USD", {"AUD": [1.3572, 1.3583], "CAD": [1.2565, 1.256], "CHF": [0.91499, 0.91847], "EUR": [0.84674, 0.84839], "GBP": [0.72399, 0.7251], "JPY": [110.06, 110.33], "NZD": [1.4357, 1.4328]}] ["USD", {"AUD": [1.362, 1.3572], "CAD": [1.2569, 1.2565], "CHF": [0.91488, 0.91499], "EUR": [0.84696, 0.84674], "GBP": [0.72072, 0.72399], "JPY": [110.08, 110.06], "NZD": [1.4409, 1.4357]}]

View File

@ -1 +1 @@
[{"main_weather": "Clouds", "description": "broken clouds", "temp": 29.92, "min_temp": 29.34, "max_temp": 30.71, "feels_like": 36.92, "humidity": 88, "clouds": 78, "wind_speed": 0.45, "wind_direction": 299, "visibility": 10000, "uv": 0, "rain_chance": 0.72}, {"main_weather": "Clouds", "description": "few clouds", "temp": 20.29, "min_temp": 16.54, "max_temp": 20.41, "feels_like": 20.33, "humidity": 75, "clouds": 20, "wind_speed": 0.45, "wind_direction": 278, "visibility": 10000, "uv": 0.23, "rain_chance": 0.84}] [{"main_weather": "Clouds", "description": "overcast clouds", "temp": 28.87, "min_temp": 27.96, "max_temp": 28.94, "feels_like": 35.87, "humidity": 87, "clouds": 100, "wind_speed": 0.45, "wind_direction": 315, "visibility": 10000, "uv": 0, "rain_chance": 1}, {"main_weather": "Clouds", "description": "scattered clouds", "temp": 16.25, "min_temp": 15, "max_temp": 20.22, "feels_like": 16.23, "humidity": 88, "clouds": 40, "wind_speed": 5.14, "wind_direction": 270, "visibility": 3600, "uv": 0.11, "rain_chance": 0.9}]

View File

@ -1 +1 @@
[[{"main_weather": "Rain", "description": "light rain", "min_temp": 29.34, "max_temp": 30.71}, {"main_weather": "Rain", "description": "moderate rain", "min_temp": 28.88, "max_temp": 30.28}, {"main_weather": "Rain", "description": "moderate rain", "min_temp": 28.76, "max_temp": 30.43}, {"main_weather": "Rain", "description": "moderate rain", "min_temp": 27.46, "max_temp": 29.34}, {"main_weather": "Rain", "description": "moderate rain", "min_temp": 26.98, "max_temp": 28.05}, {"main_weather": "Rain", "description": "moderate rain", "min_temp": 27.66, "max_temp": 30.29}, {"main_weather": "Rain", "description": "light rain", "min_temp": 29.07, "max_temp": 31.98}, {"main_weather": "Rain", "description": "light rain", "min_temp": 29.71, "max_temp": 31.97}], [{"main_weather": "Rain", "description": "light rain", "min_temp": 16.54, "max_temp": 20.41}, {"main_weather": "Rain", "description": "light rain", "min_temp": 14.1, "max_temp": 20.41}, {"main_weather": "Clouds", "description": "scattered clouds", "min_temp": 12.28, "max_temp": 20.13}, {"main_weather": "Rain", "description": "light rain", "min_temp": 13.47, "max_temp": 15}, {"main_weather": "Rain", "description": "light rain", "min_temp": 13.98, "max_temp": 19.48}, {"main_weather": "Rain", "description": "light rain", "min_temp": 12.63, "max_temp": 21.45}, {"main_weather": "Clouds", "description": "few clouds", "min_temp": 13.76, "max_temp": 21.62}, {"main_weather": "Clouds", "description": "broken clouds", "min_temp": 15.08, "max_temp": 23.41}]] [[{"main_weather": "Rain", "description": "moderate rain", "min_temp": 27.96, "max_temp": 28.94}, {"main_weather": "Rain", "description": "moderate rain", "min_temp": 28.31, "max_temp": 30.17}, {"main_weather": "Rain", "description": "moderate rain", "min_temp": 28.75, "max_temp": 30.23}, {"main_weather": "Rain", "description": "moderate rain", "min_temp": 27.19, "max_temp": 29.81}, {"main_weather": "Rain", "description": "moderate rain", "min_temp": 27.92, "max_temp": 30.34}, {"main_weather": "Rain", "description": "moderate rain", "min_temp": 28.29, "max_temp": 32.23}, {"main_weather": "Rain", "description": "moderate rain", "min_temp": 28.76, "max_temp": 31.19}, {"main_weather": "Rain", "description": "moderate rain", "min_temp": 28.3, "max_temp": 30.35}], [{"main_weather": "Rain", "description": "light rain", "min_temp": 15, "max_temp": 20.22}, {"main_weather": "Clouds", "description": "scattered clouds", "min_temp": 12.48, "max_temp": 21.93}, {"main_weather": "Rain", "description": "light rain", "min_temp": 14.51, "max_temp": 18.16}, {"main_weather": "Rain", "description": "light rain", "min_temp": 13.8, "max_temp": 20.63}, {"main_weather": "Clouds", "description": "overcast clouds", "min_temp": 14.26, "max_temp": 21.27}, {"main_weather": "Rain", "description": "light rain", "min_temp": 14.12, "max_temp": 18.72}, {"main_weather": "Rain", "description": "light rain", "min_temp": 12.05, "max_temp": 20.55}, {"main_weather": "Clouds", "description": "overcast clouds", "min_temp": 13.71, "max_temp": 18.38}]]

View File

@ -1 +1 @@
{"stocks": "27/07/2021 13:30:45", "crypto": "27/07/2021 13:30:48", "news": "27/07/2021 13:30:50", "weather": "27/07/2021 13:30:49", "forex": "27/07/2021 19:30:53", "sports": "27/07/2021 13:30:50"} {"stocks": "28/07/2021 14:55:08", "crypto": "28/07/2021 14:55:14", "news": "28/07/2021 14:55:15", "weather": "28/07/2021 14:55:14", "forex": "28/07/2021 20:55:18", "sports": "28/07/2021 14:55:15"}

View File

@ -1,4 +1,8 @@
type,content,pause(secs) type,content,pause(secs)
text,hello world!,0 text,hello world!,3
image,/home/pi/Desktop/stock_ticker/logos/crypto/BTC.png,5 image,./logos/crypto/BTC.png,3
gif,/home/pi/Desktop/stock_ticker/gifs/close.gif,15 gif,./gifs/close.gif,3
text,hello world!,3
gif,./gifs/close.gif,3
image,./logos/crypto/BTC.png,3
gif,./gifs/close.gif,3

1 type content pause(secs)
2 text hello world! 0 3
3 image /home/pi/Desktop/stock_ticker/logos/crypto/BTC.png ./logos/crypto/BTC.png 5 3
4 gif /home/pi/Desktop/stock_ticker/gifs/close.gif ./gifs/close.gif 15 3
5 text hello world! 3
6 gif ./gifs/close.gif 3
7 image ./logos/crypto/BTC.png 3
8 gif ./gifs/close.gif 3

View File

@ -1,21 +1,21 @@
headline,source,date,time headline,source,date,time
Tokyo 2020 Olympics: Osaka story ended by Vondrousova^ and Bencic ousts Krejcikova - The Sport Review,The Sport Review,2021-07-27,16:34:00Z Cornea test can help identify if patients are suffering from long Covid^ claims new study - Hindustan Times,Hindustan Times,2021-07-28,16:38:50Z
1st alarm raised as Marikina River water level breaches 15 meters - ABS-CBN News,Abs-cbn.com,2021-07-27,16:23:00Z NYC to Offer $100 Incentive for Vaccination Starting Friday - NBC New York,NBC New York,2021-07-28,16:34:31Z
Aaron Rodgers back to work as icy Packers relationship appears to thaw - Fox News,Fox News,2021-07-27,16:09:19Z El-Zakzaky: Kaduna court free leader of Islamic Movement Sheikh Ibrahim El-Zakzaky and im wife Zeenat - BBC News,BBC News,2021-07-28,16:31:20Z
Lake Tahoe plane crash: Twin-engine jet accident kills all passengers^ FAA says - Fox News,Fox News,2021-07-27,16:08:40Z India vs Sri Lanka Live Cricket Score^ 2nd T20I^ Todays Match: Chahar Stunner Ends Fernandos Stay as SL L - News18,News18,2021-07-28,16:24:58Z
Alex Telles: Manchester United left-back out until September with injury^ says Ole Gunnar Solskjaer - Sky Sports,Sky Sports,2021-07-27,16:07:30Z Light behind black hole seen by scientists for the first time - The Irish News,The Irish News,2021-07-28,16:20:47Z
Disney's Jungle Cruise Review - IGN,IGN,2021-07-27,16:00:34Z Lacson to run under Reporma - The Manila Times,The Manila Times,2021-07-28,16:19:20Z
BOP deficit widens to $312 million in June - Philstar.com,Philippine Star,2021-07-27,16:00:00Z 130 new locally transmitted COVID-19 cases in Singapore; 5 new clusters - CNA,CNA,2021-07-28,16:18:45Z
Vista Land optimistic on growth prospects - Philstar.com,Philippine Star,2021-07-27,16:00:00Z Iowa Gov. Kim Reynolds blames unvaccinated migrants for recent Covid spike - NBC News,NBC News,2021-07-28,16:13:12Z
Phoenix Petroleum settles P3 billion commercial papers - Philstar.com,Philippine Star,2021-07-27,16:00:00Z Canada not among countries exempt from quarantine for travel into England - CBC.ca,CBC News,2021-07-28,16:09:03Z
Facebook assembles expert team to build 'metaverse' - Taipei Times,Taipei Times,2021-07-27,16:00:00Z Co Kerry mains rupture leaves 50^000 people without water - The Irish Times,The Irish Times,2021-07-28,15:56:15Z
Emily Blunt and the Rock Drip With Charismatic Chemistry in Disney's Jungle Cruise - Gizmodo,Gizmodo.com,2021-07-27,16:00:00Z Brother in 'disbelief' after remains found 22 years after N.S. woman disappeared - CBC.ca,CBC News,2021-07-28,15:49:40Z
Exclusive: Rakesh Asthana appointed Delhi Police Commissioner - Hindustan Times,Hindustan Times,2021-07-27,15:54:36Z 10 of the best deals in PlayStation's summer sale - JOE.ie,Www.joe.ie,2021-07-28,15:47:31Z
Simone Biles says mental health issues behind Tokyo Olympics withdrawal as she admits: 'I just didn't want to go on' - Sky News,Sky.com,2021-07-27,15:52:08Z New York State Workers Must Get Vaccine or Weekly Tests^ Cuomo Says - The New York Times,New York Times,2021-07-28,15:44:41Z
Mamata Banerjee meets PM Modi^ calls for all-party meeting to discuss Pegasus issue - The Indian Express,The Indian Express,2021-07-27,15:51:49Z Want a Vaccine Reservation in South Korea? Try Waiting 111 Hours. - The New York Times,New York Times,2021-07-28,15:44:41Z
Trump could be forced to testify over Capitol riot^ says Liz Cheney: This is not a game - The Independent,Independent,2021-07-27,15:51:28Z Bipartisan infrastructure deal could advance within hours^ Schumer says - POLITICO,Politico,2021-07-28,15:38:56Z
A First Look At The Fitbit Charge 5? - Forbes,Forbes,2021-07-27,15:47:38Z Feds^ N.L. government announce Muskrat Falls deal^ with few details - CBC.ca,CBC News,2021-07-28,15:37:04Z
Facebook upgrades Oculus Quest 2 storage and recalls foam face masks - The Verge,The Verge,2021-07-27,15:41:36Z Hubble discovers water vapour around Jupiter`s Ganymede^ largest moon in our solar system - WION,WION,2021-07-28,15:35:36Z
Boris Johnson says stop and search policy kind and loving way to get weapons off streets - The Independent,Independent,2021-07-27,15:41:05Z Naira sees biggest plunge ever after CBN forex ban - Premium Times,Premium Times,2021-07-28,15:35:20Z
Sinema meets with Biden as bipartisan talks teeter - POLITICO,Politico,2021-07-27,15:41:02Z Bob Odenkirk Co-Stars Bryan Cranston^ Aaron Paul^ David Cross & Michael McKean Among Better Call Saul Stars Hollywood Well-Wishers - Deadline,Deadline,2021-07-28,15:33:00Z
Nova Scotia man identified as Ottawa homicide victim - CBC.ca,CBC News,2021-07-27,15:40:40Z Animals Emerged 350 Million Years Earlier Than Previously Thought^ Fossil Discovery Suggests - Gizmodo Australia,Gizmodo Australia,2021-07-28,15:31:00Z

1 headline source date time
2 Tokyo 2020 Olympics: Osaka story ended by Vondrousova^ and Bencic ousts Krejcikova - The Sport Review Cornea test can help identify if patients are suffering from long Covid^ claims new study - Hindustan Times The Sport Review Hindustan Times 2021-07-27 2021-07-28 16:34:00Z 16:38:50Z
3 1st alarm raised as Marikina River water level breaches 15 meters - ABS-CBN News NYC to Offer $100 Incentive for Vaccination Starting Friday - NBC New York Abs-cbn.com NBC New York 2021-07-27 2021-07-28 16:23:00Z 16:34:31Z
4 Aaron Rodgers back to work as icy Packers relationship appears to thaw - Fox News El-Zakzaky: Kaduna court free leader of Islamic Movement Sheikh Ibrahim El-Zakzaky and im wife Zeenat - BBC News Fox News BBC News 2021-07-27 2021-07-28 16:09:19Z 16:31:20Z
5 Lake Tahoe plane crash: Twin-engine jet accident kills all passengers^ FAA says - Fox News India vs Sri Lanka Live Cricket Score^ 2nd T20I^ Today’s Match: Chahar Stunner Ends Fernando’s Stay as SL L - News18 Fox News News18 2021-07-27 2021-07-28 16:08:40Z 16:24:58Z
6 Alex Telles: Manchester United left-back out until September with injury^ says Ole Gunnar Solskjaer - Sky Sports Light behind black hole seen by scientists for the first time - The Irish News Sky Sports The Irish News 2021-07-27 2021-07-28 16:07:30Z 16:20:47Z
7 Disney's Jungle Cruise Review - IGN Lacson to run under Reporma - The Manila Times IGN The Manila Times 2021-07-27 2021-07-28 16:00:34Z 16:19:20Z
8 BOP deficit widens to $312 million in June - Philstar.com 130 new locally transmitted COVID-19 cases in Singapore; 5 new clusters - CNA Philippine Star CNA 2021-07-27 2021-07-28 16:00:00Z 16:18:45Z
9 Vista Land optimistic on growth prospects - Philstar.com Iowa Gov. Kim Reynolds blames unvaccinated migrants for recent Covid spike - NBC News Philippine Star NBC News 2021-07-27 2021-07-28 16:00:00Z 16:13:12Z
10 Phoenix Petroleum settles P3 billion commercial papers - Philstar.com Canada not among countries exempt from quarantine for travel into England - CBC.ca Philippine Star CBC News 2021-07-27 2021-07-28 16:00:00Z 16:09:03Z
11 Facebook assembles expert team to build 'metaverse' - Taipei Times Co Kerry mains rupture leaves 50^000 people without water - The Irish Times Taipei Times The Irish Times 2021-07-27 2021-07-28 16:00:00Z 15:56:15Z
12 Emily Blunt and the Rock Drip With Charismatic Chemistry in Disney's Jungle Cruise - Gizmodo Brother in 'disbelief' after remains found 22 years after N.S. woman disappeared - CBC.ca Gizmodo.com CBC News 2021-07-27 2021-07-28 16:00:00Z 15:49:40Z
13 Exclusive: Rakesh Asthana appointed Delhi Police Commissioner - Hindustan Times 10 of the best deals in PlayStation's summer sale - JOE.ie Hindustan Times Www.joe.ie 2021-07-27 2021-07-28 15:54:36Z 15:47:31Z
14 Simone Biles says mental health issues behind Tokyo Olympics withdrawal as she admits: 'I just didn't want to go on' - Sky News New York State Workers Must Get Vaccine or Weekly Tests^ Cuomo Says - The New York Times Sky.com New York Times 2021-07-27 2021-07-28 15:52:08Z 15:44:41Z
15 Mamata Banerjee meets PM Modi^ calls for all-party meeting to discuss Pegasus issue - The Indian Express Want a Vaccine Reservation in South Korea? Try Waiting 111 Hours. - The New York Times The Indian Express New York Times 2021-07-27 2021-07-28 15:51:49Z 15:44:41Z
16 Trump could be forced to testify over Capitol riot^ says Liz Cheney: ‘This is not a game’ - The Independent Bipartisan infrastructure deal could advance within hours^ Schumer says - POLITICO Independent Politico 2021-07-27 2021-07-28 15:51:28Z 15:38:56Z
17 A First Look At The Fitbit Charge 5? - Forbes Feds^ N.L. government announce Muskrat Falls deal^ with few details - CBC.ca Forbes CBC News 2021-07-27 2021-07-28 15:47:38Z 15:37:04Z
18 Facebook upgrades Oculus Quest 2 storage and recalls foam face masks - The Verge Hubble discovers water vapour around Jupiter`s Ganymede^ largest moon in our solar system - WION The Verge WION 2021-07-27 2021-07-28 15:41:36Z 15:35:36Z
19 Boris Johnson says stop and search policy ‘kind and loving’ way to get weapons off streets - The Independent Naira sees biggest plunge ever after CBN forex ban - Premium Times Independent Premium Times 2021-07-27 2021-07-28 15:41:05Z 15:35:20Z
20 Sinema meets with Biden as bipartisan talks teeter - POLITICO Bob Odenkirk Co-Stars Bryan Cranston^ Aaron Paul^ David Cross & Michael McKean Among ‘Better Call Saul’ Star’s Hollywood Well-Wishers - Deadline Politico Deadline 2021-07-27 2021-07-28 15:41:02Z 15:33:00Z
21 Nova Scotia man identified as Ottawa homicide victim - CBC.ca Animals Emerged 350 Million Years Earlier Than Previously Thought^ Fossil Discovery Suggests - Gizmodo Australia CBC News Gizmodo Australia 2021-07-27 2021-07-28 15:40:40Z 15:31:00Z

View File

@ -1,4 +1,4 @@
name,current,opening name,current,opening
MSFT,283.47,289.34 MSFT,286.21,288.915
NFLX,515.31,518.95 NFLX,519.94,522.08
GOOG,2706.565,2801.15 GOOG,2738.62,2771.88

1 name current opening
2 MSFT 283.47 286.21 289.34 288.915
3 NFLX 515.31 519.94 518.95 522.08
4 GOOG 2706.565 2738.62 2801.15 2771.88

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

0
display_images/user_gif.ppm Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 821 B

After

Width:  |  Height:  |  Size: 821 B

View File

@ -112,6 +112,28 @@ class StockTicker():
img_width, img_height = image.size img_width, img_height = image.size
kill = False kill = False
while offset_x > -(img_width+1): while offset_x > -(img_width+1):
if offset_x == 0:
while pause_frames > 0:
if pause_frames%frame_skip == 0:
self.incrementGIF(image)
pause_frames -=1
if gif:
self.double_buffer.SetImage(image.convert('RGB'), offset_x, offset_y)
else:
self.double_buffer.SetImage(image, offset_x, offset_y)
for y in range(self.matrix.height):
self.matrix.SetPixel(offset_x + img_width +1 , y , 0,0,0)
self.matrix.SetPixel(offset_x + img_width , y , 0,0,0)
self.double_buffer = self.matrix.SwapOnVSync(self.double_buffer)
time.sleep(self.delay)
kill = self.checkKilled()
if kill: break
# for animation in gifs # for animation in gifs
if offset_x%frame_skip == 0: if offset_x%frame_skip == 0:
@ -139,28 +161,7 @@ class StockTicker():
time.sleep(self.delay) time.sleep(self.delay)
kill = self.checkKilled() kill = self.checkKilled()
if offset_x == 0:
while pause_frames > 0:
if pause_frames%frame_skip == 0:
self.incrementGIF(image)
pause_frames -=1
if gif:
self.double_buffer.SetImage(image.convert('RGB'), offset_x, offset_y)
else:
self.double_buffer.SetImage(image, offset_x, offset_y)
for y in range(self.matrix.height):
self.matrix.SetPixel(offset_x + img_width +1 , y , 0,0,0)
self.matrix.SetPixel(offset_x + img_width , y , 0,0,0)
self.double_buffer = self.matrix.SwapOnVSync(self.double_buffer)
time.sleep(self.delay)
kill = self.checkKilled()
if kill: break
if kill: break if kill: break
@ -281,11 +282,13 @@ class StockTicker():
if animation == 'up': if animation == 'up':
offset_y = 33 offset_y = 33
direction = -1 direction = -1
self.scrollImageY(image, direction = direction, offset_x = offset_x, offset_y = offset_y, frame_skip = frame_skip, gif = options[i % len(options)] == 'display_gif')
elif animation == 'down': elif animation == 'down':
direction = 1 direction = 1
offset_y = -33 offset_y = -33
self.scrollImageY(image, direction = direction, offset_x = offset_x, offset_y = offset_y, frame_skip = frame_skip, gif = options[i % len(options)] == 'display_gif')
self.scrollImageY(image, direction = direction, offset_x = offset_x, offset_y = offset_y, frame_skip = frame_skip, gif = options[i % len(options)] == 'display_gif')
offset_y = 0 offset_y = 0
@ -378,15 +381,15 @@ class StockTicker():
if animation == 'up': if animation == 'up':
offset_y = 33 offset_y = 33
direction = -1 direction = -1
self.scrollImageY(image, direction = direction, offset_x = offset_x, offset_y = offset_y, frame_skip = frame_skip, gif = kind=='gif')
elif animation == 'down': elif animation == 'down':
direction = 1 direction = 1
offset_y = -33 offset_y = -33
self.scrollImageY(image, direction = direction, offset_x = offset_x, offset_y = offset_y, frame_skip = frame_skip, gif = kind=='gif')
self.scrollImageY(image, direction = direction, offset_x = offset_x, offset_y = offset_y, frame_skip = frame_skip, gif = kind=='gif')
offset_y = 0 offset_y = 0
kill = self.scrollImage(image, offset_x = offset_x, offset_y = offset_y, frame_skip = frame_skip, gif = kind=='gif', pause_frames = pause_frames) kill = self.scrollImage(image, offset_x = offset_x, offset_y = offset_y, frame_skip = frame_skip, gif = kind=='gif', pause_frames = pause_frames)
if kill: break if kill: break