Search results

  1. fukurou

    port overlort python ->Swift assed edition!

    class AXPassword { private var _isOpen: Bool = false private var _maxAttempts: Int = 3 private var _loginAttempts: Int = 3 private var _code: Int = 0 func codeUpdate(_ ear: String) -> Bool { guard _isOpen else { return false } if ear.contains("code") {...
  2. fukurou

    port overlort python ->Swift assed edition!

    class DrawRnd { private var strings = LGFIFO() private var _stringsSource: [String] = [] init(_ values: String...) { for value in values { strings.insert(value) _stringsSource.append(value) } } func addElement(_ element: String) {...
  3. fukurou

    port overlort python ->Swift assed edition!

    class LGTypeConverter { static func convertToInt(_ v1: String) -> Int { let temp = RegexUtil.extractEnumRegex(.integer, v1) return temp.isEmpty ? 0 : Int(temp) ?? 0 } static func convertToDouble(_ v1: String) -> Double { let temp =...
  4. fukurou

    port overlort python ->Swift assed edition!

    class AXInputWaiter { private var _trgTolerance: TrgTolerance init(_ tolerance: Int) { self._trgTolerance = TrgTolerance(tolerance) self._trgTolerance.reset() } func reset() { _trgTolerance.reset() } func wait(_ s1: String) -> Bool { //...
  5. 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 }...
  6. 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...
  7. 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() }...
  8. 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) {...
  9. 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...
  10. 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...
  11. 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...
  12. 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 ...
  13. 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...
  14. 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...
  15. 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...
  16. fukurou

    port overlort python ->Swift assed edition!

    // ╔════════════════════════════════════════════════════════════════════════╗ // ║ TRIGGERS ║ // ╚════════════════════════════════════════════════════════════════════════╝
  17. 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...
  18. 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...
  19. 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) }...
  20. 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...
Top