Search results

  1. fukurou

    🐍 python aeye reborn

    import threading import time from typing import List, Tuple, Optional import cv2 import numpy as np # ----------------------------------------- # RECTANGLE CLASS (IMAGE COORDS) # ----------------------------------------- class Rectangle: def __init__(self, x1: int, y1: int, x2: int, y2...
  2. fukurou

    image recog

    updated Python version with per‑object movement (each bounding box tracked individually), using parallel lists import threading import time import torch from torchvision import models, transforms from PIL import Image import cv2 from ultralytics import YOLO from typing import List #...
  3. fukurou

    image recog

    with directions import threading import time import torch from torchvision import models, transforms from PIL import Image import cv2 from ultralytics import YOLO from typing import List, Optional # ----------------------------------------- # RECTANGLE CLASS #...
  4. fukurou

    image recog

    full shit in the ass mode with list of recognitions, detections: import threading import time import torch from torchvision import models, transforms from PIL import Image import cv2 from ultralytics import YOLO from typing import List # ----------------------------------------- # RECTANGLE...
  5. fukurou

    image recog

    with image detection: import threading import time import torch from torchvision import models, transforms from PIL import Image import cv2 from ultralytics import YOLO from typing import List # ----------------------------------------- # RECTANGLE CLASS #...
  6. fukurou

    image recog

    pip install torch torchvision pillow Create a new file Create image_recog_threaded.py. import threading import time import torch from torchvision import models, transforms from PIL import Image import cv2 # ----------------------------- # GLOBAL STATIC RESULT VARIABLE #...
  7. fukurou

    railpunk skill

    class DiRailPunk(Skill): # this skill swaps between two sets of contradicting skills def __init__(self): super().__init__() self.set_skill_type(3) # backgroundable skill self.trg: TrgHP = TrgHP() self.lim = 2 self.r1: Responder = Responder("wink"...
  8. fukurou

    🐍 python sarcophagus

    class Sarcophagus: def __init__(self): """Initialize the sarcophagus with an empty set of shielded items.""" self._shielded_items: set[str] = set() @property def shielded_items(self) -> set[str]: """Return a copy of the shielded items set (read-only access).""" return...
  9. fukurou

    [MEDIA]

  10. fukurou

    [MEDIA]

  11. fukurou

    🐍 python hp convo trigger

    class TrgHP: def __init__(self, low: int=-10, high: int=10, regen: int=5): self.hp = 4 self.low = low self.high = high self.regen: TrgEveryNMinutes = TrgEveryNMinutes(regen) self.hit: set[str] = {"shut up", "quiet", "be quiet", "silence"} def...
  12. fukurou

    👨‍💻 dev hawk tuah skill

    fruits = ["apple", "banana", "orange", "grape", "mango"] vegetables = ["carrot", "tomato", "cucumber", "onion", "pepper"] def contains_fruit_and_vegi(text: str) -> bool: text = text.lower() has_fruit = any(f in text for f in fruits) has_vegi = any(v in text for v in vegetables)...
  13. fukurou

    [MEDIA]

  14. fukurou

    [MEDIA]

  15. fukurou

    [MEDIA]

  16. fukurou

    👨‍💻 dev automata

    operations: dict[int, Callable[..., Any]]
  17. fukurou

    👨‍💻 dev automata

    from typing import Callable, Any operations: dict[int, Callable[..., Any]] = {}
  18. fukurou

    👨‍💻 dev automata

    from functools import partial class Calculator: def add(self, a, b): return a + b def sub(self, a, b): return a - b calc = Calculator() operations = { 1: partial(calc.add, 10, 3), # add(10, 3) 2: partial(calc.sub, 10, 3), # sub(10, 3) }...
  19. fukurou

    👨‍💻 dev automata

    class Calculator: def add(self, a, b): return a + b def sub(self, a, b): return a - b calc = Calculator() operations = { 1: calc.add, 2: calc.sub, } print(operations[1](10, 3)) # 13 print(operations[2](10, 3)) # 7
  20. fukurou

    👨‍💻 dev automata

    def greet(): print("Hello!") def farewell(): print("Goodbye!") def add(a, b): print(a + b) # Dictionary mapping int → function actions = { 1: greet, 2: farewell, 3: lambda: add(5, 7), # using a lambda wrapper } # Using the dictionary actions[1]() # calls greet()...
Top