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
from tree_sitter import Language, Parser, Tree, Node | |
import tree_sitter_c | |
from typing import Generator | |
C_LANGUAGE = Language(tree_sitter_c.language(), "c") | |
parser = Parser() | |
parser.set_language(C_LANGUAGE) | |
c_code = """ |
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 sys | |
import termios | |
import tty | |
def get_text_area_size(): | |
# Save the terminal's original settings | |
fd = sys.stdin.fileno() | |
original_attributes = termios.tcgetattr(fd) | |
try: |
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 curses | |
def get_terminal_size(): | |
try: | |
# Initialize curses | |
stdscr = curses.initscr() | |
# Turn off echoing of keys, and enter cbreak mode, | |
# where no buffering is performed on keyboard input | |
curses.noecho() |
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 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 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 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 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 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 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 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 |
NewerOlder