Hejto.pl
Dodaj post

Wpisz coś do wyszukania (minimum 2 znaki)

Wpis użytkownika Analny_Banita w Hydepark

Mocarz

w Hydepark

151piorunów

Komentarze (6)

Gruba ryba6piorunów

Witam, jeśli dzieock, starcisz srebro. Serdecznie.

GURU15piorunów

Może się nie znam, ale nie powinno być tak?:
>import datetime
>import requests
>
>def get_sunrise_sunset():
>try:
>response = requests.get("https://www.timeanddate.com/sun/poland/?month=8")
>if response.status_code == 200:
>
>content = response.text
>sunrise_index = content.find("Sunrise Today:")
>sunset_index = content.find("Sunset Today:")
>sunrise_time = content[sunrise_index + 14 : sunrise_index + 19]
>sunset_time = content[sunset_index + 13 : sunset_index + 18]
>return sunrise_time, sunset_time
>else:
>return None, None
>except Exception as e:
>return None, None
>
>
>teraz = datetime.datetime.now()
>
>wschod, zachod = get_sunrise_sunset()
>
>if wschod and zachod:
>wschod = datetime.datetime.strptime(wschod, "%I:%M %p")
>zachod = datetime.datetime.strptime(zachod, "%I:%M %p")
>
>if x == "dziecko" and y > 36.6 and zachod < teraz < wschod:
>print("witam")
>else:
>return
>else:
>return

Sunrise and Sunset in PolandSunrise, sunset and moon phases in over 47 locations all across Poland today.Timeanddate
Tytan0piorunów

@entropy_ kod na takie 3+ bo działa ale nigdy bym tak tego nie napisał

Mocarz0piorunów

Komentarz usunięty

Autorytet7piorunów

section .data
   message db 'Witam', 0

section .text
   global _start

_start:
   mov ax, 366

cmp ax, 366     
   jle .end_if

mov rax, 1       
   mov rdi, 1      
   mov rsi, message
   mov rdx, 5       
   syscall

.end_if:
   mov rax, 60     
   xor rdi, rdi    
   syscall

Szach 😉