Форум сайта python.su
#NAME Iptv_408.m3u #SERVICE 1:0:1:1:0:0:0:0:0:0:http%3a//127.0.0.1%3a88/hls%3a//http%3a//109.248.236.41%3a4433/udp/238.1.1.76%3a1234 #DESCRIPTION Матч Премьер #SERVICE 1:0:1:1:0:0:0:0:0:0:http%3a//127.0.0.1%3a88/hls%3a//http%3a//rmtvlive-lh.akamaihd.net/i/rmtv_1@154306/index_1000_av-b.m3u8?sd=10&rebase=on #DESCRIPTION Real Madrid HD #SERVICE 1:0:1:1:0:0:0:0:0:0:http%3a//127.0.0.1%3a88/hls%3a//http%3a//cdn-01.bonus-tv.ru%3a8080/vmesterf/tracks-v1a1/index.m3u8 #DESCRIPTION Вместе РФ HD
#NAME IPTV #SERVICE 4097:0:1:2:0:0:0:0:0:0:http%3a//109.248.236.41%3a4433/udp/238.1.1.76%3a1234:Матч Премьер #DESCRIPTION Матч Премьер #SERVICE 4097:0:1:4:0:0:0:0:0:0:http%3a//rmtvlive-lh.akamaihd.net/i/rmtv_1@154306/index_1000_av-b.m3u8?sd=10&rebase=on:Real Madrid HD #DESCRIPTION Real Madrid HD #SERVICE 4097:0:1:6:0:0:0:0:0:0:http%3a//cdn-01.bonus-tv.ru%3a8080/vmesterf/tracks-v1a1/index.m3u8:Вместе РФ HD #DESCRIPTION Вместе РФ HD
import cfscrape from bs4 import BeautifulSoup uri = "https://nvuti.one" scraper = cfscrape.create_scraper() html_content = scraper.get(uri).content soup = BeautifulSoup(html_content,"html.parser") htmlstr = soup.find("h4",{"class":"card-title"}).text print(htmlstr)
import heapq class heap_storage(list): def assign(self, array): super().extend(-v for v in array) heapq.heapify(self) def heappop(self): heapq.heappop(self) def heappush(self, v): heapq.heappush(self, -v) def get_max(self): return -self[0] _ = input() b = heap_storage() b.assign(map(int, input().split())) k = int(input()) z = 0 while b: r = 0 while b: v = b.get_max() r += v if r > k: break b.heappop() if v > 1: b.heappush(v >> 1) z += 1 print(z)
import heapq class heap_storage(list): def assign(self, array): super().extend(-v for v in array) heapq.heapify(self) def heappop(self): heapq.heappop(self) def heappush(self, v): heapq.heappush(self, -v) def get_max(self): return -self[0] _ = input() b = heap_storage() b.assign(map(int, input().split())) k = int(input()) z = 0 while b: r = 0 a = [] while b: v = b.get_max() r += v if r > k: break b.heappop() if v > 1: a.append(v >> 1) z += 1 for v in a: b.heappush(v) print(z)
df.groupby('item_name')['item_price1','quantity'].agg(['max','count']).sort_values(by=['max','count'], ascending=False).head(10)
key = 3 def wub(): def choice(): choice = input("Do you wish to Encrypt of Decrypt?") choice = choice.lower() if choice == "e" or "encrypt": return choice elif choice == "d" or "decrypt": return choice else: print("Invalid response, please try again.") choice() def message(): user = input("Enter your message: ") return user def waffle(choice, message, key): translated = "" if choice == "e" or "encrypt": for character in message: num = ord(character) num += key translated += chr(num) derek = open('Encrypted.txt', 'w') derek.write(translated) derek.close() return translated else: for character in message: num = ord(character) num -= key translated += chr(num) return translated choice = choice() #Runs function for encrypt/decrypt selection. Saves choice made. message = message() #Run function for user to enter message. Saves message. final = waffle(choice, message, key) #Runs function to translate message, using the choice, message and key variables) print("\n Operation complete~ print(final) wub()
import random def num_checker(guess_num,answer): guess_num=list(str(guess_num)) ans=list(str(answer)) cow=0 bull=0 for a in range(0,4): if guess_num[a]==ans[a]: bull+=1 ans[a]=10 guess_num[a]=20 for a in range(0,4): for b in range (0,4): if guess_num[a]==ans[b]: cow+=1 ans[b]=30 break final=[bull,cow] return final #.................................................. ans=random.randrange(1000,10000) print("this is the program to gues a four digit number") while True: print("just for reference answer is:",ans) num_typed=int(input("please guess a four digit the number?\n ")) reply=num_checker(num_typed,ans) if reply==[4,0]: print("correct") print(reply[0],"bull",reply[1],"cows and the ans is",ans) break else: print(reply[0],"bulls",reply[1],"cows")
import random def num_checker(guess, answer): bulls = sum(guess[i] == answer[i] for i in range(len(answer))) cows = sum(guess[i] in answer and guess[i] != answer[i] for i in range(len(answer))) return bulls, cows def get_valid_random(size): digits = "" while len(digits) < size: digit = random.choice("0123456789") if not digit in digits: digits += digit return digits answer = get_valid_random(4) while True: guess = input("Enter number with four different digits: ") bulls, cows = num_checker(guess, answer) if bulls == 4: print("Correct") break else: print(f"You got {bulls} bulls and {cows} cows")