This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# pip install requests beautifulsoup4 progress tabulate | |
import requests | |
from bs4 import BeautifulSoup | |
from progress.bar import Bar | |
from tabulate import tabulate | |
# Define the DistroWatch search URL that lists all active Linux distributions for servers | |
dws = ( | |
"https://distrowatch.com/search.php?" | |
"ostype=Linux&" # OS Type: Linux |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def add_us(numbers, integer): | |
total = '' | |
for num in numbers: | |
total += str(num) | |
return list(str(int(total) + integer)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def find_the_ball(pos, swaps): | |
for swap in swaps: | |
if swap[0] == pos: | |
pos = swap[1] | |
elif swap[1] == pos: | |
pos = swap[0] | |
return pos |