Search results

  1. 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 #...
  2. 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...
  3. 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 #...
  4. 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 #...
  5. 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"...
  6. 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...
  7. fukurou

    [MEDIA]

  8. fukurou

    [MEDIA]

  9. 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...
  10. 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)...
  11. fukurou

    [MEDIA]

  12. fukurou

    [MEDIA]

  13. fukurou

    [MEDIA]

  14. fukurou

    👨‍💻 dev automata

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

    👨‍💻 dev automata

    from typing import Callable, Any operations: dict[int, Callable[..., Any]] = {}
  16. 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) }...
  17. 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
  18. 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()...
  19. fukurou

    [MEDIA]

  20. fukurou

    🐍 python once per hour

    from datetime import datetime class EveningGate: def __init__(self, hour=19): self.hour = hour self._triggered_today = False self._current_day = None def trigger(self): now = datetime.now() today = now.date() if...
Top