Search results

  1. fukurou

    πŸ‘¨β€πŸ’» dev core diet

    public void algPartsFusion(int priority, Mutatable... algParts) { this.outAlg = new Algorithm(algParts); this.outpAlgPriority = priority; // 1->5, 1 is the highest algorithm priority }
  2. fukurou

    πŸ‘¨β€πŸ’» dev core diet

    class Skill: def __init__(self) -> None: # Initialize protected attributes self.kokoro: Optional['Kokoro'] = None # Shallow reference for interskill communication self.outAlg: Optional['Algorithm'] = None # Skill's output self.outpAlgPriority: int = -1 #...
  3. fukurou

    πŸ‘¨β€πŸ’» dev core diet

    skill original class Skill: def __init__(self): # The variables start with an underscore (_) because they are protected self._kokoro = None # consciousness, shallow ref class to enable interskill communications self._outAlg: Algorithm # skills output...
  4. fukurou

    πŸ‘¨β€πŸ’» dev core diet

    class Algorithm: def __init__(self, algParts: list[Mutatable]) -> None: super().__init__() self.algParts: list[Mutatable] = algParts @classmethod def from_varargs(cls, *algParts: Mutatable) -> 'Algorithm': # Create an instance from varargs return...
  5. fukurou

    πŸ‘¨β€πŸ’» dev core diet

    class Algorithm: def __init__(self, *args: Mutatable) -> None: super().__init__() if len(args) == 1 and isinstance(args[0], list): # Check if input is a list self.algParts: list[Mutatable] = args[0] # Assign the list directly else: # Handle varargs case...
  6. fukurou

    πŸ‘¨β€πŸ’» dev core diet

    prechange py: class Algorithm: def __init__(self, algParts: list[Mutatable]): # list of Mutatable super().__init__() self.algParts: list[Mutatable] = algParts # *constract with string and goal @property def getAlgParts(self) -> list[Mutatable]: return...
  7. fukurou

    πŸ‘¨β€πŸ’» dev core diet

    class Algorithm: def __init__(self, *algParts): # Handle both a list input and variable arguments if len(algParts) == 1 and isinstance(algParts[0], list): self.algParts = list(algParts[0]) # Initialize with the given list else: self.algParts =...
  8. fukurou

    πŸ‘¨β€πŸ’» dev core diet

    class Algorithm: def __init__(self, *algParts): # Handle both a list input and variable arguments if len(algParts) == 1 and isinstance(algParts[0], list): self.algParts = list(algParts[0]) # Initialize with the given list else: self.algParts =...
  9. fukurou

    πŸ‘¨β€πŸ’» dev core diet

    class Algorithm: def __init__(self, *algParts): # Check if a single argument is a list, otherwise use variable arguments if len(algParts) == 1 and isinstance(algParts[0], list): self.algParts = list(algParts[0]) # Initialize with the given list else...
  10. fukurou

    πŸ‘¨β€πŸ’» dev core diet

    class APVerbatim: def __init__(self, *sentences): # Initialize with either a list of sentences or a variable number of arguments if len(sentences) == 1 and isinstance(sentences[0], list): self.sentences = list(sentences[0]) # Initialize with a copy of the list...
  11. fukurou

    πŸ‘¨β€πŸ’» dev core diet

    class Skill { constructor() { this.kokoro = null; // Consciousness, shallow ref class for interskill communications this.outAlg = null; // Skill's output this.outpAlgPriority = -1; // DEFCON levels 1->5 } // Skill triggers and algorithmic logic input(ear...
  12. fukurou

    πŸ‘¨β€πŸ’» dev core diet

    class Algorithm { constructor(algParts) { // Handle both Array input and variable arguments (rest parameters) this.algParts = Array.isArray(algParts) ? [...algParts] : [...arguments]; } getAlgParts() { return this.algParts; } getSize() {...
  13. fukurou

    πŸ‘¨β€πŸ’» dev core diet

    class APVerbatim extends Mutatable { constructor(...sentences) { super(); this.sentences = Array.isArray(sentences[0]) ? [...sentences[0]] : [...sentences]; } action(ear, skin, eye) { // Return the next sentence and remove it from the list if...
  14. fukurou

    πŸ‘¨β€πŸ’» dev core diet

    public class Skill { protected Kokoro kokoro = null; // consciousness, shallow ref class to enable interskill communications protected Algorithm outAlg = null; // skill's output protected int outpAlgPriority = -1; // defcon 1->5 public Skill() { base(); //...
  15. fukurou

    πŸ‘¨β€πŸ’» dev core diet

    Public Class Skill Protected kokoro As Kokoro = Nothing ' consciousness, shallow ref class to enable interskill communications Protected outAlg As Algorithm = Nothing ' skills output Protected outpAlgPriority As Integer = -1 ' defcon 1->5 Public Sub New()...
  16. fukurou

    πŸ‘¨β€πŸ’» dev core diet

    Public Class Skill ' Protected fields Protected kokoro As Kokoro = Nothing ' Consciousness, shallow ref class for interskill communications Protected outAlg As Algorithm = Nothing ' Skills output Protected outpAlgPriority As Integer = -1 ' DEFCON levels 1->5 ' Default...
  17. fukurou

    πŸ‘¨β€πŸ’» dev core diet

    vb.net Public Class APVerbatim Inherits Mutatable Private sentences As New List(Of String)() ' Constructor accepting variable arguments Public Sub New(ParamArray sentences() As String) Me.sentences.AddRange(sentences) End Sub ' Constructor accepting a List(Of...
Top