Search results

  1. 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...
  2. 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 =...
  3. 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 =...
  4. 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...
  5. 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...
  6. 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...
  7. 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() {...
  8. 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...
  9. 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(); //...
  10. 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()...
  11. 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...
  12. 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...
  13. fukurou

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

    this is the key! we overload the alg c'tor shitindiass!!! class MyClass: def __init__(self, *args): # Constructor for variable arguments self.values = args @classmethod def from_list(cls, input_list): # Constructor for a list return cls(*input_list)...
  14. fukurou

    πŸ‘¨β€πŸ’» dev cpp port

    .h #ifndef APVERBATIM_H #define APVERBATIM_H #include "Mutatable.h" #include <vector> #include <string> class APVerbatim : public Mutatable { private: std::vector<std::string> sentences; int at = 0; public: APVerbatim(const std::vector<std::string>& list1); APVerbatim(const...
  15. fukurou

    πŸ‘¨β€πŸ’» dev cpp port

    .h class Mutatable { public: bool algKillSwitch = false; string action(const string& ear, const string& skin, const string& eye); bool completed(); string myName(); }; .cpp string Mutatable::action(const string& ear, const string& skin, const string& eye) { return ""; }...
  16. fukurou

    πŸ‘¨β€πŸ’» dev cpp port

    public class Mutatable { public Boolean algKillSwitch = false; public String action(String ear, String skin, String eye) { return ""; } public Boolean completed() { return true; } public String myName() { return this.getClass().getSimpleName()...
  17. fukurou

    πŸ‘¨β€πŸ’» dev cpp port

    .h #ifndef ABSDICTIONARYDB_H #define ABSDICTIONARYDB_H #include <string> class AbsDictionaryDB { public: void save(const std::string& key, const std::string& value); std::string load(const std::string& key); }; #endif // ABSDICTIONARYDB_H .cpp: #include "AbsDictionaryDB.h" void...
Top