From b6d773604d7eb7b3fd9641962ce28e5e8fad04c7 Mon Sep 17 00:00:00 2001 From: dafonse Date: Mon, 17 Mar 2025 15:23:19 -0300 Subject: [PATCH 1/5] Inicializa weather-cities-display --- weather-cities-display/__init__.py | 0 weather-cities-display/city.ico | Bin 0 -> 67646 bytes .../weather_cities_display.py | 53 ++++++++++++++++++ 3 files changed, 53 insertions(+) create mode 100644 weather-cities-display/__init__.py create mode 100644 weather-cities-display/city.ico create mode 100644 weather-cities-display/weather_cities_display.py diff --git a/weather-cities-display/__init__.py b/weather-cities-display/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/weather-cities-display/city.ico b/weather-cities-display/city.ico new file mode 100644 index 0000000000000000000000000000000000000000..a8b2f379dcef1cb9e689fd6998adf70b858abb94 GIT binary patch literal 67646 zcmeI5&ubM|6vv-bXcw+Tx^0*K34%y8(T##`Oc#bwkoc?aTNR;c|Ap>dR1nmKVEol! zOu-)z6jy=-NvXvc+^FEDSaEt!_2}d}=gl`gbI!YyxlgY5-81LcJ)e7L=DnA^^m=Q; zzsbp7`2XwP#xK_NzU=jS8$$~s68xxo=@%VFGES8^^hN_3HTa^z;PMW@cu_A3b_By0o;^NDKLl9yoAdd~9rN0%?2p z>=_>(9v&^Xg9i`pJAL}}1ky;iY`fCu+qP}nxoOj;^($d4=?3mwE?&I&JoJU8-MV$F zc>44y)JRtoi)^o4xl+u}&qMM0Ias-|e>1yMRjEp=F>t>6@ z6_p3}_q8m@-kU$gyng+*qeoS<(x2eA8C`ly|?qjU3ytV@GTG zhjYLii7P5^f<5^d#QtxBzxF)L_5<4g1CjqfV$G2cG^V7-=TU8+@Be(?|Kar`aYf}??rfj=Xa2k<>v~!% zyl%8TdY>oh)#ZvF&)5Ha{YTHa`TD>5_Wz9=H{g3Q(nZfJb$aNUlk~LbU$*c1^`AI} z&tz-Y0O`~*UCD8YD=KGx+CKB2DlT8XT-?2Tw|Ma2L1m+3q_Yyfb-E~LNl(k2?GGI~ z1kda6;lr!${;!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RCOT|57-+lLY!v*u*wpK|Xy zzb59tw6ye1sO729&h}|{tT@JgLk@TP5vsd)W&CdFKHPR&ktU&m?NbABmV2;-SJttX;x#pZ~DiCoG|QgmeFg$M3z~XCDUP$!Z_}+3S5?o^SE@SIdUUjo%C{&rclv E3s{$XLI3~& literal 0 HcmV?d00001 diff --git a/weather-cities-display/weather_cities_display.py b/weather-cities-display/weather_cities_display.py new file mode 100644 index 0000000..66faf80 --- /dev/null +++ b/weather-cities-display/weather_cities_display.py @@ -0,0 +1,53 @@ +import tkinter +from tkinter import * + +import requests + + +def weather(): + + city = city_listbox.get() + url = "https://openweathermap.org/data/2.5/weather?q={}&appid=b6907d289e10d714a6e88b30761fae22".format(city) + res = requests.get(url) + output = res.json() + + weather_status = output['weather'][0]['description'] + temperature = output['main']['temp'] + humidity = output['main']['humidity'] + wind_speed = output['wind']['speed'] + + weather_status_label.configure(text="Condição do Tempo: " + weather_status + ".") + temperature_label.configure(text="Temperatura: " + str(temperature) + "°.") + humidity_label.configure(text="Humidade: " + str(humidity) + "%.") + wind_speed_label.configure(text="Velocidade do Vento: " + str(wind_speed) + "m/s.") + + +window = Tk() +window.geometry('400x200+200+200') +window.title('Informação de Clima por Cidade') +window['bg'] = 'blue' + +city_name_list = ["Los Angeles", "delhi", "bangalore", "pune"] + +city_listbox = StringVar(window) +city_listbox.set("Selecione a Cidade") + +option = OptionMenu(window, city_listbox, *city_name_list) +option.grid(row=2, column=2, padx=150, pady=10) + +b1 = Button(window, text="Confirma", width=15, command=weather) +b1.grid(row=5, column=2, padx=150) + +weather_status_label = Label(window, font=("times", 10)) +weather_status_label.grid(row=10, column=2) + +temperature_label = Label(window, font=("times", 10, "bold")) +temperature_label.grid(row=12, column=2) + +humidity_label = Label(window, font=("times", 10, "bold")) +humidity_label.grid(row=14, column=2) + +wind_speed_label = Label(window, font=("times", 10, "bold")) +wind_speed_label.grid(row=16, column=2) + +window.mainloop() From 0c7da7fea1ca99a4c026f1d87af1e347d2ecb4e0 Mon Sep 17 00:00:00 2001 From: dafonse Date: Mon, 17 Mar 2025 15:28:17 -0300 Subject: [PATCH 2/5] Atualiza README.md --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 21d4289..c67a383 100644 --- a/README.md +++ b/README.md @@ -19,4 +19,7 @@ A simple python script that makes you guess what word is hidden by underscores i Código de teste da câmera OV56467 em uma Raspberry Pi 5 com Ubuntu 24 e biblioteca OpenCV. ### [Jogo da Cobra](/snake-game/) -A classic Snake game implementation using the Python curses library that runs in the terminal. \ No newline at end of file +A classic Snake game implementation using the Python curses library that runs in the terminal. + +### [Display Weather Info](/weather-cities-display/) +A simple Python GUI application that shows weather information using tkinter for the graphical interface and OpenWeatherMap API for weather data. \ No newline at end of file From 24d006bc81ad9a08bab780523f90fa5918adda1a Mon Sep 17 00:00:00 2001 From: dafonse Date: Mon, 17 Mar 2025 15:48:26 -0300 Subject: [PATCH 3/5] Atualiza README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 21d4289..5772a04 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ A simple Python script that draws a tree pattern using the turtle graphics libra A simple python script that makes you guess what word is hidden by underscores in a variable and shows the value according you input the rigth letter. ### [Raspberry Pi 5 Câmera OV5647](/rpi5-camera/) -Código de teste da câmera OV56467 em uma Raspberry Pi 5 com Ubuntu 24 e biblioteca OpenCV. +Código de teste da câmera OV56467 em uma Raspberry Pi 5 com Raspberry OS e biblioteca OpenCV. ### [Jogo da Cobra](/snake-game/) A classic Snake game implementation using the Python curses library that runs in the terminal. \ No newline at end of file From 37c7da1f9e848a75ff801a886cd16ac8ee2bda94 Mon Sep 17 00:00:00 2001 From: dafonse Date: Mon, 17 Mar 2025 18:23:33 -0300 Subject: [PATCH 4/5] Atualiza README.md --- README.md | 5 ----- 1 file changed, 5 deletions(-) diff --git a/README.md b/README.md index a4bad23..bf1c895 100644 --- a/README.md +++ b/README.md @@ -15,13 +15,8 @@ A simple Python script that draws a tree pattern using the turtle graphics libra ### [Jogo da Forca](/jogo-forca/) A simple python script that makes you guess what word is hidden by underscores in a variable and shows the value according you input the rigth letter. -<<<<<<< HEAD -### [Raspberry Pi 5 Câmera OV5647](/rpi5-camera/) -Código de teste da câmera OV56467 em uma Raspberry Pi 5 com Raspberry OS e biblioteca OpenCV. -======= ### [Raspberry Pi 5 with Câmera OV5647](/rpi5-camera/) Código de teste da câmera OV56467 em uma Raspberry Pi 5 com Ubuntu 24 e biblioteca OpenCV. ->>>>>>> raspberry ### [Jogo da Cobra](/snake-game/) A classic Snake game implementation using the Python curses library that runs in the terminal. From 3b4f19151f8074621fbd7122a56e2a65dd925c46 Mon Sep 17 00:00:00 2001 From: dafonse Date: Tue, 18 Mar 2025 08:34:59 -0300 Subject: [PATCH 5/5] Atualiza README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index bf1c895..deaacb0 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ A simple Python script that draws a tree pattern using the turtle graphics libra A simple python script that makes you guess what word is hidden by underscores in a variable and shows the value according you input the rigth letter. ### [Raspberry Pi 5 with Câmera OV5647](/rpi5-camera/) -Código de teste da câmera OV56467 em uma Raspberry Pi 5 com Ubuntu 24 e biblioteca OpenCV. +Código de teste da câmera OV56467 em uma Raspberry Pi 5 com Raspberry Pi OS e biblioteca OpenCV. ### [Jogo da Cobra](/snake-game/) A classic Snake game implementation using the Python curses library that runs in the terminal.