Search results

  1. fukurou

    port overlort python ->Swift assed edition!

    class AXContextCmd { var commands = UniqueItemSizeLimitedPriorityQueue(5) var contextCommands = UniqueItemSizeLimitedPriorityQueue(5) private var trgTolerance: Bool = false func engageCommand(_ s1: String) -> Bool { if s1.isEmpty { return false }...
  2. fukurou

    port overlort python ->Swift assed edition!

    class AXCmdBreaker { private var conjuration: String init(_ conjuration: String) { self.conjuration = conjuration } func extractCmdParam(_ s1: String) -> String { if s1.contains(conjuration) { return s1.replacingOccurrences(of: conjuration, with...
  3. fukurou

    port overlort python ->Swift assed edition!

    class TrgTolerance { private var _maxRepeats: Int private var _repeats: Int init(_ maxrepeats: Int) { self._maxRepeats = maxrepeats self._repeats = 0 } func setMaxRepeats(_ maxRepeats: Int) { self._maxRepeats = maxRepeats reset() }...
  4. fukurou

    port overlort python ->Swift assed edition!

    class AnnoyedQ { private var _q1: RefreshQ private var _q2: RefreshQ private var _stuffedQue: RefreshQ init(_ queLim: Int) { self._q1 = RefreshQ(queLim) self._q2 = RefreshQ(queLim) self._stuffedQue = RefreshQ(queLim) } func learn(_ ear: String) {...
  5. fukurou

    port overlort python ->Swift assed edition!

    class RefreshQ: UniqueItemSizeLimitedPriorityQueue { override init(_ limit: Int) { super.init(limit) } func removeItem(_ item: String) { if let index = queue.firstIndex(of: item) { queue.remove(at: index) } } override func insert(_ data...
  6. fukurou

    port overlort python ->Swift assed edition!

    class UniqueItemSizeLimitedPriorityQueue: UniqueItemsPriorityQue { private var _limit: Int init(_ limit: Int) { self._limit = limit super.init() } func getLimit() -> Int { return _limit } func setLimit(_ limit: Int) { self._limit = limit...
  7. fukurou

    port overlort python ->Swift assed edition!

    class UniqueItemsPriorityQue: LGFIFO { override func insert(_ data: String) { if !queue.contains(data) { queue.append(data) } } override func peak() -> String { return super.peak() ?? "" } func strContainsResponse(_ item: String) -> Bool...
  8. fukurou

    port overlort python ->Swift assed edition!

    class LGFIFO: CustomStringConvertible { internal var queue: [String] = [] var description: String { return queue.joined(separator: " ") } func isEmpty() -> Bool { return queue.isEmpty } func peak() -> String? { return isEmpty() ? nil ...
  9. fukurou

    port overlort python ->Swift assed edition!

    v2 time gate class TimeGate { private var pause: Int private var openedGate: Date private var checkPoint: Date init(_ minutes: Int) { self.pause = max(1, minutes) let now = Date() self.openedGate = now self.checkPoint = now...
  10. fukurou

    port overlort python ->Swift assed edition!

    class TimeGate{ //time boolean gate // gate goes open (pause minutes time)-> closed private var pause:Int = 5 private var openDate:Date = Date() private var checkPoint:Date = Date() init() { openGate() } init(pause:Int) { if pause < 0 || pause > 60...
  11. fukurou

    port overlort python ->Swift assed edition!

    class CodeParser { static func extract_code_number(_ s: String) -> Int { let pattern = #"^code (\d+)$"# if let regex = try? NSRegularExpression(pattern: pattern) { let range = NSRange(s.startIndex..., in: s) if let match = regex.firstMatch(in: s...
  12. fukurou

    port overlort python ->Swift assed edition!

    // ╔════════════════════════════════════════════════════════════════════════╗ // ║ TRIGGERS ║ // ╚════════════════════════════════════════════════════════════════════════╝
  13. fukurou

    port overlort python ->Swift assed edition!

    class CityMapWithPublicTransport { private var streets: [String: [String]] = [:] private var transportLines: [String: [String]] = [:] private var maxConnections: Int private var lastInp: String = "standby" init(_ n: Int) { self.maxConnections = n } func...
  14. fukurou

    port overlort python ->Swift assed edition!

    class CityMap { private var streets: [String: [String]] = [:] private var maxConnections: Int private var lastInp: String = "standby" init(_ n: Int) { self.maxConnections = n } func add_street(_ current_street: String, _ new_street: String) { guard...
  15. fukurou

    port overlort python ->Swift assed edition!

    new ver: class RegexUtil { static func extractRegex(_ theRegex: String, _ str2Check: String) -> String { if let match = str2Check.range(of: theRegex, options: .regularExpression) { return String(str2Check[match]).trimmingCharacters(in: .whitespaces) }...
  16. fukurou

    port overlort python ->Swift assed edition!

    class LGPointInt: CustomStringConvertible { private(set) var x: Int private(set) var y: Int init(_ x_init: Int, _ y_init: Int) { self.x = x_init self.y = y_init } func shift(_ x: Int, _ y: Int) { self.x += x self.y += y } func...
  17. fukurou

    port overlort python ->Swift assed edition!

    TimeUtils: see txt
  18. fukurou

    port overlort python ->Swift assed edition!

    class PhraseInflector { // Maps for pronoun and verb inflection ⚙️ static let inflectionMap: [String: String] = [ "i": "you", "me": "you", "my": "your", "mine": "yours", "you": "i", "your": "my", "yours": "mine", "am": "are", "are": "am", "was": "were", "were"...
  19. fukurou

    port overlort python ->Swift assed edition!

    class AXStringSplit { // May be used to prepare data before saving or after loading // The advantage is fewer data fields (e.g., {skills: s1_s2_s3}) ✨ private var _separator: String = "_" func setSeparator(_ separator: String) { self._separator = separator }...
  20. fukurou

    port overlort python ->Swift assed edition!

    class AXNeuroSama { // The higher the rate, the less likely to decorate outputs (◕‿◕✿) private let _rate: Int private let _nyaa: Responder private let _rnd: DrawRnd init(_ rate: Int) { self._rate = rate self._nyaa = Responder(" heart", " heart", " wink", "...
Top