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
import requests | |
from bs4 import BeautifulSoup | |
url = 'https://wallex.ir/calculator/usdt-tmn' | |
response = requests.get(url) | |
response.raise_for_status() | |
html = response.text |
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
import pathlib | |
import sqlite3 | |
import logging | |
PATH = pathlib.Path(__file__).parent.resolve() | |
class Database: | |
def __init__(self) -> None: |
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
# Python code | |
# api endpoint -> https://api.openai.com/dashboard/billing/credit_grants | |
import requests | |
api_key = 'Your-Token' | |
response = requests.get( | |
'https://api.openai.com/dashboard/billing/credit_grants' | |
,headers={ | |
"Authorization": f"Bearer {api_key}" |