buug fixes
This commit is contained in:
parent
3c0907baf6
commit
640d25dc0b
@ -1,4 +1,4 @@
|
||||
symbol,name,base,current,24hr change
|
||||
BTC,bitcoin,usd,37791,-3.5064161412834833
|
||||
ETH,ethereum,gbp,1608.87,-5.529203500553435
|
||||
DOGE,dogecoin,usd,0.199271,-10.734868356523817
|
||||
BTC,bitcoin,usd,40840,7.470469950373753
|
||||
ETH,ethereum,gbp,1688.85,4.84874662401072
|
||||
DOGE,dogecoin,usd,0.210276,5.072216331731451
|
||||
|
|
@ -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]}]
|
@ -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}]
|
@ -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}]]
|
@ -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"}
|
@ -1,4 +1,8 @@
|
||||
type,content,pause(secs)
|
||||
text,hello world!,0
|
||||
image,/home/pi/Desktop/stock_ticker/logos/crypto/BTC.png,5
|
||||
gif,/home/pi/Desktop/stock_ticker/gifs/close.gif,15
|
||||
text,hello world!,3
|
||||
image,./logos/crypto/BTC.png,3
|
||||
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
|
||||
|
|
40
csv/news.csv
40
csv/news.csv
@ -1,21 +1,21 @@
|
||||
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
|
||||
1st alarm raised as Marikina River water level breaches 15 meters - ABS-CBN News,Abs-cbn.com,2021-07-27,16:23:00Z
|
||||
Aaron Rodgers back to work as icy Packers relationship appears to thaw - Fox News,Fox News,2021-07-27,16:09:19Z
|
||||
Lake Tahoe plane crash: Twin-engine jet accident kills all passengers^ FAA says - Fox News,Fox News,2021-07-27,16:08:40Z
|
||||
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
|
||||
Disney's Jungle Cruise Review - IGN,IGN,2021-07-27,16:00:34Z
|
||||
BOP deficit widens to $312 million in June - Philstar.com,Philippine Star,2021-07-27,16:00:00Z
|
||||
Vista Land optimistic on growth prospects - Philstar.com,Philippine Star,2021-07-27,16:00:00Z
|
||||
Phoenix Petroleum settles P3 billion commercial papers - Philstar.com,Philippine Star,2021-07-27,16:00:00Z
|
||||
Facebook assembles expert team to build 'metaverse' - Taipei Times,Taipei Times,2021-07-27,16:00:00Z
|
||||
Emily Blunt and the Rock Drip With Charismatic Chemistry in Disney's Jungle Cruise - Gizmodo,Gizmodo.com,2021-07-27,16:00:00Z
|
||||
Exclusive: Rakesh Asthana appointed Delhi Police Commissioner - Hindustan Times,Hindustan Times,2021-07-27,15:54:36Z
|
||||
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
|
||||
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
|
||||
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
|
||||
A First Look At The Fitbit Charge 5? - Forbes,Forbes,2021-07-27,15:47:38Z
|
||||
Facebook upgrades Oculus Quest 2 storage and recalls foam face masks - The Verge,The Verge,2021-07-27,15:41: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
|
||||
Sinema meets with Biden as bipartisan talks teeter - POLITICO,Politico,2021-07-27,15:41:02Z
|
||||
Nova Scotia man identified as Ottawa homicide victim - CBC.ca,CBC News,2021-07-27,15:40:40Z
|
||||
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
|
||||
NYC to Offer $100 Incentive for Vaccination Starting Friday - NBC New York,NBC New York,2021-07-28,16:34:31Z
|
||||
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
|
||||
India vs Sri Lanka Live Cricket Score^ 2nd T20I^ Today’s Match: Chahar Stunner Ends Fernando’s Stay as SL L - News18,News18,2021-07-28,16:24:58Z
|
||||
Light behind black hole seen by scientists for the first time - The Irish News,The Irish News,2021-07-28,16:20:47Z
|
||||
Lacson to run under Reporma - The Manila Times,The Manila Times,2021-07-28,16:19:20Z
|
||||
130 new locally transmitted COVID-19 cases in Singapore; 5 new clusters - CNA,CNA,2021-07-28,16:18:45Z
|
||||
Iowa Gov. Kim Reynolds blames unvaccinated migrants for recent Covid spike - NBC News,NBC News,2021-07-28,16:13:12Z
|
||||
Canada not among countries exempt from quarantine for travel into England - CBC.ca,CBC News,2021-07-28,16:09:03Z
|
||||
Co Kerry mains rupture leaves 50^000 people without water - The Irish Times,The Irish Times,2021-07-28,15:56:15Z
|
||||
Brother in 'disbelief' after remains found 22 years after N.S. woman disappeared - CBC.ca,CBC News,2021-07-28,15:49:40Z
|
||||
10 of the best deals in PlayStation's summer sale - JOE.ie,Www.joe.ie,2021-07-28,15:47:31Z
|
||||
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
|
||||
Want a Vaccine Reservation in South Korea? Try Waiting 111 Hours. - The New York Times,New York Times,2021-07-28,15:44:41Z
|
||||
Bipartisan infrastructure deal could advance within hours^ Schumer says - POLITICO,Politico,2021-07-28,15:38:56Z
|
||||
Feds^ N.L. government announce Muskrat Falls deal^ with few details - CBC.ca,CBC News,2021-07-28,15:37:04Z
|
||||
Hubble discovers water vapour around Jupiter`s Ganymede^ largest moon in our solar system - WION,WION,2021-07-28,15:35:36Z
|
||||
Naira sees biggest plunge ever after CBN forex ban - Premium Times,Premium Times,2021-07-28,15:35:20Z
|
||||
Bob Odenkirk Co-Stars Bryan Cranston^ Aaron Paul^ David Cross & Michael McKean Among ‘Better Call Saul’ Star’s Hollywood Well-Wishers - Deadline,Deadline,2021-07-28,15:33:00Z
|
||||
Animals Emerged 350 Million Years Earlier Than Previously Thought^ Fossil Discovery Suggests - Gizmodo Australia,Gizmodo Australia,2021-07-28,15:31:00Z
|
||||
|
|
@ -1,4 +1,4 @@
|
||||
name,current,opening
|
||||
MSFT,283.47,289.34
|
||||
NFLX,515.31,518.95
|
||||
GOOG,2706.565,2801.15
|
||||
MSFT,286.21,288.915
|
||||
NFLX,519.94,522.08
|
||||
GOOG,2738.62,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
0
display_images/user_gif.ppm
Normal file → Executable file
Before Width: | Height: | Size: 821 B After Width: | Height: | Size: 821 B |
@ -112,6 +112,28 @@ class StockTicker():
|
||||
img_width, img_height = image.size
|
||||
kill = False
|
||||
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
|
||||
if offset_x%frame_skip == 0:
|
||||
@ -139,28 +161,7 @@ class StockTicker():
|
||||
time.sleep(self.delay)
|
||||
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
|
||||
|
||||
@ -281,11 +282,13 @@ class StockTicker():
|
||||
if animation == 'up':
|
||||
offset_y = 33
|
||||
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':
|
||||
direction = 1
|
||||
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')
|
||||
|
||||
|
||||
offset_y = 0
|
||||
|
||||
|
||||
@ -378,15 +381,15 @@ class StockTicker():
|
||||
if animation == 'up':
|
||||
offset_y = 33
|
||||
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':
|
||||
direction = 1
|
||||
offset_y = -33
|
||||
|
||||
self.scrollImageY(image, direction = direction, offset_x = offset_x, offset_y = offset_y, frame_skip = frame_skip, gif = kind=='gif')
|
||||
|
||||
|
||||
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)
|
||||
|
||||
if kill: break
|
||||
|
Loading…
Reference in New Issue
Block a user