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 hashlib | |
import os | |
import sys | |
def calculate_file_hash(file_path): | |
"""Calculate the SHA-256 hash of a file.""" | |
hash_algo = hashlib.sha256() | |
with open(file_path, "rb") as file: | |
while chunk := file.read(8192): |
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
# Install aiohttp before running: pip install aiohttp | |
import asyncio | |
import os | |
import aiohttp | |
# Define the base URL and headers | |
base_url = "https://photoai.com/" | |
hash_string = "00112233445566778899aabbccddeeff" # Taken from inital email or use devtools to find |
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 Data.Char (isDigit) | |
------------------------- RPN Calculator | |
data Expr = Num Int | Add | Neg | Div | Mult | Dupl | Kill | Swap | Thrd | |
deriving (Show, Eq) | |
type Expression = [Expr] |
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 collections.abc import Mapping, Sequence | |
from typing import Literal | |
class DFA[S, A]: | |
""" | |
Represents a Deterministic Finite Automaton (DFA). |