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
# pyright: reportUnusedCallResult=false, reportAny=false, reportUnknownLambdaType=false, reportExplicitAny=false, reportRedeclaration=false | |
import os | |
import subprocess | |
import sys | |
import urllib.request | |
def py_version(command: str) -> str | None: | |
try: | |
result = subprocess.run( |
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 __future__ import annotations | |
from typing import Callable, TypeVar | |
from rich import print | |
T = TypeVar("T") | |
U = TypeVar("U") | |
DIGITS = { | |
b"twenty": 20, |
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
#define DEFINE_VEC(TYPE_NAME, TYPE) \ | |
typedef struct TYPE_NAME TYPE_NAME; \ | |
struct TYPE_NAME { \ | |
TYPE * data; \ | |
usize len; \ | |
usize cap; \ | |
}; \ | |
\ | |
TYPE_NAME TYPE_NAME##_new(void); \ | |
void TYPE_NAME##_free(TYPE_NAME * vec); \ |
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 uuid | |
from typing import cast | |
import requests | |
API = "https://bypass.churchless.tech/api" | |
class ChatGPT: |
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
try: | |
import os | |
from getpass import getpass | |
from pathlib import Path | |
user: str = os.getlogin() | |
passwd: str = getpass(f"[sudo] password for {user}: ") | |
try_paths: list[Path] = [ |
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 rich import print | |
from copy import deepcopy | |
from sys import stderr | |
def printboard(board): | |
print() | |
print('\n'.join(' '.join( | |
[ | |
'[black on yellow]#[/]' if i == 2 |