This file contains hidden or 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
import requests | |
from bs4 import BeautifulSoup | |
def scrape_webpage(page): | |
r = requests.get(f"https://web3.career/remote-jobs?page={page}") | |
webpage = BeautifulSoup(r.text, "html.parser") | |
table_section = webpage.find("tbody", {"class": "tbody"}) | |
jobs_data = "" |
This file contains hidden or 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
import json | |
import requests | |
if __name__ == "__main__": | |
r = requests.get( | |
"https://ledger-ecom-cdn-prod.s3-eu-west-1.amazonaws.com/website/assets/website_input.json") | |
stakable = set() | |
for coin in r.json(): | |
if coin["staking_live"] or coin["staking_ext"]: | |
stakable.add(coin["name"]) |
This file contains hidden or 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
import matplotlib.pyplot as plt | |
def spot_formula(x, y=100): | |
return (1 + (x / 100)) * y | |
def usdt_m_formula(x, y=100): | |
return (1 + (x / 50)) * y | |
def coin_m_formula(x, y=100): | |
return ((1 + (x / 100)) ** 2) * y |
This file contains hidden or 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
# validate email addresses | |
def validate_email(email): | |
pattern = r"(^(?!-|\.)([a-zA-Z0-9._%+-]+)@(?!-)[a-zA-Z0-9.-]+(?<=[a-zA-Z0-9])\.[a-zA-Z]{2,}$)" | |
if re.match(pattern, email): | |
return True | |
else: | |
return False | |
if __name__ == "__main__": |
OlderNewer