Skip to content

Instantly share code, notes, and snippets.

View amosboldor's full-sized avatar

Amos Boldor amosboldor

View GitHub Profile
# 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
def add_us(numbers, integer):
total = ''
for num in numbers:
total += str(num)
return list(str(int(total) + integer))
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