Search results

  1. fukurou

    task : ChobitsV2

    translate these 2 classes from java to python note the timegate class is a bit different than the one you've already translated package LG_Core; import java.util.Calendar; import java.util.Date; public class TimeGate { // a gate that only opens x minutes after it has been set private...
  2. fukurou

    Permitter process

    ''' PERMISSION CLASS ''' class Permission: ''' * uses two names as lv1,2 permission levels * requires password to change password or said names ''' singleton: Permission = None def __init__(self, password: str, lv1Name: str, lv2Name: str): if...
  3. fukurou

    lego technics

  4. fukurou

    🐍 python example singleton software design pattern

    class PersonSingleton: __instance = None @staticmethod def getInstance(name: str, age: int): """ Static access method. """ if PersonSingleton.__instance == None: PersonSingleton(name, age) return PersonSingleton.__instance def __init__(self...
  5. fukurou

    Permission and DPermitter

    translate from java to python package LG_Core; public class Permission { /* * uses two names as lv1,2 permission levels * requires password to change password or said names */ private static Permission singleton; private String password, lv1Name, lv2Name; private...
  6. fukurou

    active task: translate personality class from java to python

    Personality //the chobit class uses the personality class to load up all the skills package LG_Core; import java.util.ArrayList; import java.util.Hashtable; public class Personality { /*this class is used in the ChobitV2 c'tor. it enables loading a complete skill set (a sub class of the...
  7. fukurou

    err fusion

    dictionary = {"string" : 5} neuron = Neuron() fusion = Fusion(dictionary) ds:DISkillUtils = DISkillUtils() alg1:Algorithm = ds.simpleVerbatimAlgorithm("test","hello") neuron.algParts.append(alg1) danger_alg:Algorithm = ds.simpleVerbatimAlgorithm("danger_test","hadoken")...
  8. fukurou

    anime 2022

  9. fukurou

    stirling engine

  10. fukurou

    task : fusion classes

    translate from java to python : Fusion class : package LG_Core; import java.util.HashSet; import java.util.Hashtable; import java.util.Iterator; import java.util.PriorityQueue; public class Fusion { /* * fuses algorithms and sends needed algorithm to a designated cerabellum *...
  11. fukurou

    🧵 3d poppy humanoid robot

    https://cults3d.com/en/3d-model/gadget/poppy-humanoid
  12. fukurou

    ⚡ arduino PID formula

    PID = P + I + D err = setpoint-processValue P = K(err) reset = reset + k/tau_i*err I = reset //once err changes direction or zero reset =0 D = K/tau_i*(error-lastError); lastErr = err; K : gain : this is twicked K/tau_i : can also be twicled for optimal performance tau_i : second per repeat...
  13. fukurou

    zerotimegate add explicit vars

    ''' --------------- ZEROTIMEGATE --------------- ''' import time import datetime from datetime import timedelta ''' ZEROTIMEGATE CLASS ''' class ZeroTimeGate: # a gate that only opens x minutes after it has been set def __init__(self, minutes) -> None: self.pause = 1...
  14. fukurou

    oh this ?

    public void open(int minutes) { Date now = new Date(); openedGate = addMinutesToJavaUtilDate(now, minutes); } in java it is an inferred this actually so the program reads it as public void open(int minutes) { Date now = new Date(); this.openedGate =...
  15. fukurou

    current state regexutil

    ''' ----------------- REGEXUTIL ---------------- ''' import re from typing import Match, Pattern from collections import Counter from math import sqrt class Point: def __init__(self, x_init, y_init): self.x = x_init self.y = y_init def shift(self, x, y): self.x...
  16. fukurou

    numberRegex fixed

    def numberRegex(self, str2Check: str) -> str: theRegex = r"[-+]?[0-9]*[.,][0-9]*" list1: list[str] = [] regexMatcher = re.search(theRegex, str2Check) if (regexMatcher != None): return regexMatcher.group(0).strip() return ""
  17. fukurou

    addressing issues

    continue work from this code as many errors were modified : use explicit variables see line 226 numberRegex("hello-789.998world")) # err : doesn't return decimal value (should be -789.998) print("The regexChecker2 method should return ?: ", regex.regexChecker2(r"[-+]?[0-9]{1,13}"...
  18. fukurou

    test

  19. fukurou

    RegexUtil pointRegex example

    import re from math import sqrt class Point: def __init__(self, x_init, y_init): self.x = x_init self.y = y_init def shift(self, x, y): self.x += x self.y += y def __repr__(self): return "".join(["Point(", str(self.x), ",", str(self.y)...
  20. fukurou

    hmm

    import re from math import sqrt class Point: def __init__(self,x_init,y_init): self.x = x_init self.y = y_init def shift(self, x, y): self.x += x self.y += y def __repr__(self): return "".join(["Point(", str(self.x), ",", str(self.y)...
Top