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
| #!/usr/bin/env python | |
| import ctypes | |
| import os | |
| import sys | |
| import json | |
| from pathlib import Path | |
| from typing import Final | |
| from sksurgerynditracker.nditracker import NDITracker | |
| # from pypylon import pylon # optional real camera |
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 | |
| import re | |
| import urllib.request | |
| import urllib.parse | |
| import os.path | |
| def get_html(url): | |
| try: | |
| response = requests.get(url) | |
| response.raise_for_status() # Raise an exception if status code is not 2xx |
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
| from telegram.ext import (Updater, CommandHandler, MessageHandler, Filters, CallbackQueryHandler) | |
| from telegram import ParseMode | |
| import random | |
| import re | |
| import requests | |
| import os | |
| import youtube_dl | |
| updater = Updater(token=os.getenv('UNPAIDINTERN_TOKEN'), use_context=True) # Bot token (environment variable) | |
| dispatcher = updater.dispatcher |