Search results

  1. fukurou

    👨‍💻 dev F sharp port

    type Neuron() = let defcons = Dictionary<int, ResizeArray<Algorithm>>() do // Initialize the dictionary with priority levels for i in 1 .. 5 do defcons.Add(i, ResizeArray<Algorithm>()) member this.InsertAlg(priority: int, alg: Algorithm) = if priority >...
  2. fukurou

    👨‍💻 dev F sharp port

    // Define the Kokoro type type Kokoro(grimoireMemento: AbsDictionaryDB) = let mutable emot = "" let toHeart = Dictionary<string, string>() member this.Emot with get() = emot and set(value) = emot <- value member this.GrimoireMemento = grimoireMemento member...
  3. fukurou

    👨‍💻 dev F sharp port

    type Algorithm(algParts: IMutatable list) = member this.AlgParts = algParts member this.Size = List.length algParts // Create an instance of APVerbatim let mutatableInstance = APVerbatim(["Test Sentence"]) :> IMutatable // Now it can be passed to Algorithm let algInstance =...
  4. fukurou

    👨‍💻 dev F sharp port

    module LivinGrimorie open System.Collections.Generic // Define the AbsDictionaryDB class type AbsDictionaryDB() = member val Save: string -> string -> unit = fun _ _ -> printfn "Default Save method" with get, set member val Load: string -> string = fun _ -> "null" with get, set //...
  5. fukurou

    👨‍💻 dev F sharp port

    type MyClass(value: int) = member this.Value = value member this.ExecuteFunction(f: MyClass -> int) = f this // Calls the function with the current instance // Define a function that accesses the object's attribute let getValue (obj: MyClass) = obj.Value // Create an instance...
  6. fukurou

    👨‍💻 dev lambda skill experiment

    self.f1 = lambda ear, skin, eye: ""
  7. fukurou

    👨‍💻 dev lambda skill experiment

    def create_and_use_global(): global counter # Declare the variable as global if "counter" not in globals(): # Check if it exists first counter = 0 # Initialize only once print(f"Counter created: {counter}") else: counter += 1 # Modify the existing global...
  8. fukurou

    👨‍💻 dev lambda skill experiment

    class CustomBot: def __init__(self, action_func): self.action = action_func # Set function dynamically def perform_action(self, *args): return self.action(*args) # Call the function with arguments # Define a custom function def greet(name): return f"Hello...
  9. fukurou

    👨‍💻 dev lambda skill experiment

    class Robot: def greet(self): return "Hello, I am a robot." # Define a new function def new_greet(): return "Hi! I'm your waifubot!" # Change the method dynamically robot_instance = Robot() robot_instance.greet = new_greet print(robot_instance.greet()) # Output: "Hi! I'm...
  10. fukurou

    👨‍💻 dev lambda skill experiment

    def process_text(text): text = text.strip() # Remove whitespace text = text.upper() # Convert to uppercase return f"Processed: {text}" result = apply_function(process_text, " hello world ") print(result) # Output: "Processed: HELLO WORLD"
  11. fukurou

    👨‍💻 dev F sharp port

    module LivinGrimorie // Define the AbsDictionaryDB class type AbsDictionaryDB() = member val Save: string -> string -> unit = fun _ _ -> printfn "Default Save method" with get, set member val Load: string -> string = fun _ -> "null" with get, set // Declare an object outside the class...
  12. fukurou

    👨‍💻 dev F sharp port

    module AbsDictionaryDB // Define the AbsDictionaryDB class type AbsDictionaryDB() = member val Save: string -> string -> unit = fun _ _ -> printfn "Default Save method" with get, set member val Load: string -> string = fun _ -> "null" with get, set // Declare an object outside the...
  13. fukurou

    cts ports

    CTS Methods Ported from Java to Swift 1/5 - AddContinuousSkill func addContinuousSkill(skill: Skill) { if isThinking { return } skill.setKokoro(kokoro) ctsSkills.append(skill) } 2/5 - ClearContinuousSkills func clearContinuousSkills() { if isThinking { return }...
  14. fukurou

    cts ports

    CTS Methods Ported from Java to JavaScript 1/5 - AddContinuousSkill function addContinuousSkill(skill) { if (this.isThinking) return; skill.setKokoro(this.kokoro); this.cts_skills.push(skill); } 2/5 - ClearContinuousSkills function clearContinuousSkills() { if (this.isThinking)...
  15. fukurou

    cts ports

    CTS Methods Ported from Java to C# 1/5 - AddContinuousSkill public void AddContinuousSkill(Skill skill) { if (this.IsThinking) return; skill.SetKokoro(this.Kokoro); this.CtsSkills.Add(skill); } 2/5 - ClearContinuousSkills public void ClearContinuousSkills() { if...
  16. fukurou

    cts ports

    CTS Methods Ported from Java to VB.NET 1/5 - AddContinuousSkill Public Sub AddContinuousSkill(skill As Skill) If Me.IsThinking Then Return skill.SetKokoro(Me.Kokoro) Me.CtsSkills.Add(skill) End Sub 2/5 - ClearContinuousSkills Public Sub ClearContinuousSkills() If Me.IsThinking...
  17. fukurou

    cts ports

    1/5 def add_continuous_skill(self, skill): if self.is_thinking: return skill.set_kokoro(self.kokoro) self.cts_skills.append(skill) 2/5 def clear_continuous_skills(self): if self.is_thinking: return self.cts_skills.clear() 3/5 def...
  18. fukurou

    cts ports

    public void addContinuousSkill(Skill skill) { if (this.isThinking) { return; } skill.setKokoro(this.kokoro); this.cts_skills.add(skill); } public void clearContinuousSkills() { if (this.isThinking) { return; } this.cts_skills.clear(); } public void...
  19. fukurou

    new STT code

    premode: import whisper import pyaudio import numpy as np import re import atexit from threading import Event from LivinGrimoire23 import Brain, Skill """ cmd winget install ffmpeg check if it installed ok: ffmpeg -version in python terminal: pip install openai-whisper pyaudio numpy wave """...
  20. fukurou

    new STT code

Top