๐
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 threading | |
| import time | |
| import signal | |
| class ControlledExecution: | |
| def __init__(self): | |
| self.lock = threading.Lock() | |
| self.condition = threading.Condition(self.lock) | |
| self.shutdown = False |
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 threading | |
| import time | |
| class ControlledExecution: | |
| def __init__(self): | |
| self.lock = threading.Lock() | |
| self.condition = threading.Condition(self.lock) | |
| self.shutdown = False | |
| def worker(self): |
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 threading | |
| import time | |
| import signal | |
| class ControlledExecution: | |
| def __init__(self): | |
| self.lock = threading.Lock() | |
| self.condition = threading.Condition(self.lock) | |
| self.shutdown = False |
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 threading | |
| import time | |
| class ControlledExecution: | |
| def __init__(self): | |
| self.lock = threading.Lock() | |
| self.condition = threading.Condition(self.lock) | |
| self.shutdown = False | |
| def worker(self): |
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 time | |
| from io import BytesIO | |
| import cv2 | |
| import numpy as np | |
| import pytesseract | |
| import requests | |
| from selenium import webdriver | |
| from selenium.common.exceptions import TimeoutException | |
| from selenium.webdriver.common.by import By | |
| from selenium.webdriver.support.ui import WebDriverWait |
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 sys | |
| import platform | |
| import time | |
| from selenium.webdriver.common.by import By | |
| from selenium.webdriver.support.ui import WebDriverWait | |
| from selenium.webdriver.support import expected_conditions as EC | |
| import undetected_chromedriver as uc | |
| from selenium.webdriver.common.keys import Keys | |
| import pyperclip | |
| from bs4 import BeautifulSoup |
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 sys | |
| import platform | |
| import time | |
| from selenium.webdriver.common.by import By | |
| from selenium.webdriver.support.ui import WebDriverWait | |
| from selenium.webdriver.support import expected_conditions as EC | |
| import undetected_chromedriver as uc | |
| from selenium.webdriver.common.keys import Keys | |
| import pyperclip | |
| from bs4 import BeautifulSoup |
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 numpy as np | |
| def hungarian_algorithm(cost_matrix): | |
| N = len(cost_matrix) | |
| max_cost = np.max(cost_matrix) | |
| cost_matrix = max_cost - cost_matrix # Convert to a profit matrix | |
| # Step 1: Subtract the row minimum from each row | |
| for i in range(N): | |
| cost_matrix[i] -= np.min(cost_matrix[i]) |
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 tkinter as tk | |
| from tkinter import scrolledtext | |
| import requests | |
| import random | |
| import re | |
| def fetch_text(url): | |
| try: | |
| response = requests.get(url) | |
| response.raise_for_status() |
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 time | |
| class Sudoku: | |
| def __init__(self, board): | |
| if not self.is_valid_input(board): | |
| raise ValueError("Board must be a 9x9 grid of integers from 0 to 9.") | |
| self.board = board | |
| self.steps = 0 | |
| def is_valid_input(self, board): |