hexsha
stringlengths
40
40
size
int64
3
1.03M
content
stringlengths
3
1.03M
avg_line_length
float64
1.33
100
max_line_length
int64
2
1k
alphanum_fraction
float64
0.25
0.99
f9d25104b00bbbe9bb5dee801a02a1f92b115736
1,656
// // RouteComposer // SquareViewController.swift // https://github.com/ekazaev/route-composer // // Created by Eugene Kazaev in 2018-2022. // Distributed under the MIT license. // import RouteComposer import UIKit class SquareViewController: UIViewController, ExampleAnalyticsSupport { let screenType = ExampleSc...
28.067797
130
0.696256
266030bdef4ebfff59decbba8ae4f74cbe6b2736
205
// // Note.swift // Watch-Notes WatchKit Extension // // Created by jigar dave on 14/06/21. // import Foundation struct Note: Identifiable , Codable{ let id: UUID let text: String }
12.8125
38
0.629268
262ce0484e925bfc6e8a4d7196c1edc7cffe9010
10,777
// RUN: %target-typecheck-verify-swift // Leaf expression patterns are matched to corresponding pieces of a switch // subject (TODO: or ~= expression) using ~= overload resolution. switch (1, 2.5, "three") { case (1, _, _): () // Double is ExpressibleByIntegerLiteral case (_, 2, _), (_, 2.5, _), (_, _, "th...
24.71789
208
0.639324
f863f19e2ae1abbda16c42588ee75bde48a35ad6
2,326
// // UIImageViewExtension.swift // SwiftDemo // // Created by weixb on 2018/3/7. // Copyright © 2018年 weixb. All rights reserved. // import UIKit // MARK: - Methods public extension UIImageView { /// SwifterSwift: Set image from a URL. /// /// - Parameters: /// - url: URL of image. ///...
33.228571
109
0.598452
72acad688412e8c6c7ef08e518f4878b12335cf0
405
// // ReactNativeBridgeDelegate.swift // ReactNativeMultipleRCTRootView // // Created by Fabrizio Duroni on 08.12.17. // import Foundation import React class ReactNativeBridgeDelegate: NSObject, RCTBridgeDelegate { func sourceURL(for bridge: RCTBridge!) -> URL! { return RCTBundleURLProvider.shared...
23.823529
118
0.74321
fb0d17fde64930d760729180fcd4c520794d1997
2,475
import Foundation import RobinHood protocol SubscanOperationFactoryProtocol { func fetchPriceOperation(_ url: URL, time: Int64) -> BaseOperation<PriceData> func fetchHistoryOperation(_ url: URL, info: HistoryInfo) -> BaseOperation<SubscanHistoryData> } final class SubscanOperationFactory: SubscanOperationFact...
39.919355
102
0.642828
167633540d9af922a1d41a517e4cbd33c847bd97
4,126
import UIKit import tmdb_swift typealias TableDataSource = UITableViewDataSource & UITableViewDelegate struct Pages { var current: Int let total: Int var nextPage: Int? { if current + 1 <= total { return current + 1 } return nil } } protocol DataRetrievable { v...
28.455172
159
0.636209
224d60942d84f44d93068c4a0ed2119a8797c853
766
// // QueueConversationVideoEventTopicAfterCallWork.swift // // Generated by swagger-codegen // https://github.com/swagger-api/swagger-codegen // import Foundation public class QueueConversationVideoEventTopicAfterCallWork: Codable { public enum State: String, Codable { case unknown = "UNKNOWN" ...
20.157895
69
0.631854
1da281711f3ad1ba65eb2adae009a7fe244ab50f
2,353
// // BRESelectTrackPushTransition.swift // BeaconRangingExample // // Created by Sam Piggott on 09/04/2017. // Copyright © 2017 Sam Piggott. All rights reserved. // import UIKit class BRESelectTrackPushTransition: NSObject, UIViewControllerAnimatedTransitioning { private let transitionDuration:TimeInter...
34.602941
207
0.638334
62eb7870aadaef66448ac0b132bd897ebfacb07c
1,469
// // CodeSystems.swift // HealthRecords // // Generated from FHIR 4.5.0-a621ed4bdc // Copyright 2020 Apple Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www...
34.97619
77
0.753574
5bd6ada628381b93fe9b5a525e9cb49dc37b2f1c
1,091
class Bank { static var coinsInBank = 10_000 static func distribute(coins numberOfCoinsRequested: Int) -> Int { let numberOfCoinsToVend = min(numberOfCoinsRequested, coinsInBank) coinsInBank -= numberOfCoinsToVend return numberOfCoinsToVend } static func receive(coins: Int) { ...
32.088235
79
0.687443
9be8d3349e2a358c2230694b2d7e06024a64c4e9
461
// // ComicsWireframe.swift // Example // // Created by Davide Mendolia on 03/12/15. // Copyright © 2015 GoKarumi S.L. All rights reserved. // import Foundation class SeriesWireframe: ExampleWireframe { func presentSeriesDetailViewController(_ seriesName: String) { let viewController = serviceLocator...
25.611111
89
0.750542
28b78638db2bfd2f5e6b860c0fc24f2080c750ed
4,843
// // EventsCell.swift // Tuned // // Created by Ravikiran Pathade on 4/16/18. // Copyright © 2018 Ravikiran Pathade. All rights reserved. // import Foundation import UIKit import EventKit class EventsCell:UITableViewCell{ @IBOutlet weak var calendarButton: UIButton! @IBOutlet weak var eventNameLabel...
41.042373
136
0.562255
294019ae091ae1c5580dedab2ca74d03b3802143
294
// // GCDBlackbox.swift // On The Map // // Created by Christopher Weaver on 8/5/16. // Copyright © 2016 Christopher Weaver. All rights reserved. // import Foundation func performUIUpdatesOnMain(_ updates: @escaping () -> Void) { DispatchQueue.main.async { updates() } }
17.294118
62
0.659864
234328ae49a89a6680ae027fbe9d3a5899ef72f6
1,052
// // CurrencyListResponse.swift // CurrencyConverter // // Created by Abdullah Bayraktar on 02/12/2018. // Copyright © 2018 AB. All rights reserved. // import Foundation struct CurrencyListResponse: Decodable { private enum CodingKeys: String, CodingKey { case baseCurrency = "base" case dat...
26.3
95
0.668251
f4902a7f2b3a5a5823f4dd0c1bf0f2a49cf1f9c4
2,446
// // CoinManager.swift // ByteCoin // // Created by Angela Yu on 11/09/2019. // Copyright © 2019 The App Brewery. All rights reserved. // import Foundation import CoreLocation protocol CoinManagerDelegate { func didUpdateCoin(price: String, currency: String) func didFailWithError(error: Error) } struct ...
30.197531
152
0.524939
7a76c2bf313c98708d58794f994039f055b28571
621
// // CategoryListInteractor.swift // DemoViper // // Created by Crstian T. on 1/22/19. // Copyright © 2021 Cristian T. All rights reserved. // import Foundation // MARK: - CategoryListInteractorProtocol protocol CategoryListInteractorProtocol { var entity: CategoryEntityProtocol? { get set } func getAll...
23.884615
68
0.748792
f8380bccd58ad1908ac9632e97f9099938cb38ca
773
// // Musics.swift // BaiduMusic_swift // // Created by jason on 15/6/30. // Copyright (c) 2015年 JasoneIo. All rights reserved. // import UIKit class Musics: NSObject { /**歌曲名 */ var name:String! /**歌曲大图 */ var icon:String! /**歌曲文件名 */ var fileName:String! /**歌...
17.177778
54
0.527814
f71eeb16afc5b9b95576c952552e46688f00b3fb
17,767
// Generated by the protocol buffer compiler. DO NOT EDIT! // Source file delete_post.proto import Foundation public extension Services.Post.Actions{ public struct DeletePost { }} public func == (lhs: Services.Post.Actions.DeletePost.RequestV1, rhs: Services.Post.Actions.DeletePost.RequestV1) -> Bool { if (lhs ==...
44.866162
198
0.708505
1c09351c36e44142c2bd790f09636923bba82098
4,239
// // ViewController.swift // KBAdjust // // Created by Don Mag on 10/26/18. // Copyright © 2018 DonMag. All rights reserved. // import UIKit // scrollToBottomRow UITableView extension from // John Rogers // https://stackoverflow.com/a/51940222/6257435 extension UITableView { func scrollToBottomRow() { Dispatc...
30.941606
112
0.71715
e23826c5df20a013270d72386f26f4d72b99ac7d
2,022
// // AriadneTests-macOS.swift // Tests // // Created by Denys Telezhkin on 2/7/19. // Copyright © 2019 Denys Telezhkin. All rights reserved. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the ...
36.763636
111
0.718595
f8d2fe1423a676a5dd03fb1c7b835ca76edde759
72,337
#!/usr/bin/env xcrun -sdk macosx swift import Foundation /* Required for setlocale(3) */ #if os(OSX) import Darwin #elseif os(Linux) import Glibc #endif let ShortOptionPrefix = "-" let LongOptionPrefix = "--" /* Stop parsing arguments when an ArgumentStopper (--) is detected. This is a GNU getopt * conven...
37.248713
554
0.572985
e5796f736b80b55b6fc8b7e264fff5e8f3be69ec
138
// // File.swift // // // Created by Oleksii Moisieienko on 16.04.2021. // import Foundation public protocol CoordinatorAction { }
10.615385
49
0.673913
ff632dfab308e7bc81be7cbbaf937973f0fe305e
8,111
// // CustomUIPickerView.swift // LybiaApp // // Created by MedBeji on 25/02/2018. // Copyright © 2018 unfpa. All rights reserved. // import UIKit import Tweener public typealias PickedAction = (Int)->Void class CustomUIPickerView: UIPickerView,UIPickerViewDataSource, UIPickerViewDelegate { // var mo...
34.662393
148
0.548391
fb371b8d5aed8fcbe87e84ff64ee8f0f1bf83c24
2,990
// // Constants.swift // TTBaseModel // // Created by Remzi YILDIRIM on 17.02.2020. // Copyright © 2020 Turkish Technic. All rights reserved. // import Foundation class Constants { static var lang = "tr-TR" static let applicationScheme = "ttasistan" static let applicationDisplayName = Bundle.main.info...
33.595506
150
0.627425
8a99898fa81dcabf207ec5010241212be1d54682
502
// // UserDetailsViewController.swift // POC // // Created by Chris Nevin on 09/03/2019. // Copyright © 2019 Chris Nevin. All rights reserved. // import UIKit class UserDetailsViewController: ViewController { override func viewDidLoad() { super.viewDidLoad() view.backgroundColor = .white }...
20.916667
62
0.629482
1a469ccf414a49c604f18ce84da9026e09f9be62
557
// // Zap // // Created by Otto Suess on 23.05.18. // Copyright © 2018 Zap. All rights reserved. // import Foundation enum Environment { static var allowFakeMnemonicConfirmation: Bool { return ProcessInfo.processInfo.environment["FAKE_MNEMONIC_CONF"] == "1" } static var skipPinFlow: Bool {...
24.217391
90
0.680431
b97714a24ff0937c97a3db848ffbb80223d18243
1,226
// // LocalViewTestHelpers.swift // localview // // Created by Zach Freeman on 1/24/16. // Copyright © 2016 sparkwing. All rights reserved. // import Foundation import SwiftyJSON open class LocalViewTestsHelpers { static func bundleFileContentsAsData(_ filename: String, filetype: String) -> Data { let...
33.135135
90
0.632953
11b0ff81ad5a3aaf6b66716f6a76135cba82c71c
622
// // MovieCell.swift // flix // // Created by Stephanie Angulo on 6/15/16. // Copyright © 2016 Stephanie Angulo. All rights reserved. // import UIKit class MovieCell: UITableViewCell { @IBOutlet weak var overviewLabel: UILabel! @IBOutlet weak var titleLabel: UILabel! @IBOutlet weak var posterView: U...
21.448276
63
0.672026
14b57889ee44114c36c37922275148f651905ff0
456
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // // Code generated by Microsoft (R) AutoRest Code Generator. import Foundation // StorageAccountListKeysResultProtocol is the response from the ListKeys ope...
45.6
96
0.774123
c196ef665777373d9c03db4132cddff8a05b2d04
2,295
// The MIT License (MIT) // Copyright © 2022 Ivan Vorobei (hello@ivanvorobei.by) // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the ri...
38.898305
106
0.671895
5b4436f5aed93c6cb54cc0a7ecc2b35593f1030b
1,215
// // WeSplit_Tests.swift // WeSplit-Tests // // Created by Shreemit on 27/01/22. // import XCTest @testable import WeSplit_ class WeSplit_Tests: XCTestCase { override func setUpWithError() throws { // Put setup code here. This method is called before the invocation of each test method in the class. ...
32.837838
130
0.682305
28d9ca6bd551a9288521ac09b8395fd4bebd2468
2,894
//===----------------------------------------------------------------------===// // // This source file is part of the SwiftNIO open source project // // Copyright (c) 2017-2018 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information // See CONTRIB...
49.896552
103
0.663442
294ef0aa9b855a707dc47f87dad76c90d9aa4f29
546
// // DurationTableViewCell.swift // MetabolicCompass // // Created by Artem Usachov on 6/6/16. // Copyright © 2016 Yanif Ahmad, Tom Woolf. All rights reserved. // import UIKit class DurationTableViewCell: BaseAddEventTableViewCell { @IBOutlet weak var durationLabel: UILabel! override func awakeFromN...
21.84
65
0.690476
14929679cc2901142bbf6f81e09fd4247da17ecf
3,591
// Copyright (c) 2015-2016. Bartosz Rachwal. The National Institute of Advanced Industrial Science and Technology, Japan. All rights reserved. import Foundation import UIKit @objc internal protocol Context: NSCoding { var entries : [ContextEntry] { get set } var name: String { get set } var devices : [D...
24.765517
143
0.544138
fe1ab8f026be58fb63bc731405cbe33ab6c64c01
2,201
// // AppDelegate.swift // TestExample // // Created by felipe.valio@movile.com on 08/21/2018. // Copyright (c) 2018 felipe.valio@movile.com. All rights reserved. // import UIKit @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? func application(_ applicat...
46.829787
285
0.755111
d5b287ea969cfe990534057276571f504f2205a4
9,355
// // ParamsEmbedTableViewController.swift // EZPlayerExample // // Created by yangjun zhu on 2016/12/28. // Copyright © 2016年 yangjun zhu. All rights reserved. // import UIKit import EZPlayer import AVFoundation class ParamsEmbedTableViewController: UITableViewController { weak var paramsViewController: Par...
34.142336
227
0.683271
260bd17ca8a34889f605b56e2cd4a4901b855459
476
// // IsOne.swift // Quelbo // // Created by Chris Sessions on 4/9/22. // import Foundation extension Factories { /// A symbol factory for the Zil /// [isOne](https://docs.google.com/document/d/11Kz3tknK05hb0Cw41HmaHHkgR9eh0qNLAbE9TzZe--c/edit#heading=h.4gjguf0) /// function. class IsOne: IsZero { ...
19.833333
119
0.586134
4803c3de5fa24d46968b2a4c4275d4e7009727cf
121
import XCTest import SlackKitTests var tests = [XCTestCaseEntry]() tests += SlackKitTests.__allTests() XCTMain(tests)
13.444444
35
0.77686
0834dfefeb3dd471e6536f00657eac9cae4898b0
1,509
// // VoidErrorResult.swift // SwiftySimpleKeychain // // Copyright (c) 2022 Ezequiel (Kimi) Aceto (https://eaceto.dev). Based on Auth0's SimpleKeychain // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // ...
44.382353
97
0.764745
e9eee8aa31be64ead34fc8954f46fd6a81220853
3,043
// // ViewController.swift // YJMiracleView // // Created by Zyj163 on 08/23/2017. // Copyright (c) 2017 Zyj163. All rights reserved. // import UIKit import YJMiracleView class ViewController: UIViewController { lazy var miracleView: YJMiracleView = YJMiracleView(CGRect(x: 0, y: self.view.bounds.height - 30, wi...
28.707547
164
0.62767
0a26e81e995319ea66260deead0d87dc74424870
9,201
// Copyright 2018, Oath Inc. // Licensed under the terms of the MIT License. See LICENSE.md file in project root for terms. public enum VideoKind { case ad, content } public struct Rate { public let contentRate: Value public let adRate: Value public let isAttachedToViewPort: Bool public let currentK...
48.172775
95
0.560157
1448a43bd019cfc6edb74e90acfe3fb06e1694cf
7,928
// // Anagrams.swift // MineBleeper // // Created by Wikipedia Brown on 12/12/19. // Copyright © 2019 IamGoodBad. All rights reserved. // import Foundation class WordTracker { let charactersRecord: [Character: Int] let characterCount: Int var checkCount = 0 var exhausted: Bool { checkCou...
28.724638
115
0.496973
5dd6e348d5efcfe36993cf0df574971b1fe40c35
351
class Solution { func checkIfExist(_ arr: [Int]) -> Bool { var table : Set<Int> = [] for ele in arr { if table.contains(ele) { return true } if ele % 2 == 0 { table.insert(ele/2) } table.insert(ele*2) ...
23.4
45
0.401709
d64e6557e7652b5d82ceb407e8b65439c36cdf93
175
import Foundation public enum HTTPRequestError: Error { case badRequest(String) case unauthorized(String) case serverError(String) case invalidPath(String) }
19.444444
37
0.748571
d7c6c18c13b90413318eea3b1065ce5465a59843
1,371
// // TranscriptAdapter.swift // WWDC // // Created by Guilherme Rambo on 07/06/16. // Copyright © 2016 Guilherme Rambo. All rights reserved. // import Foundation import SwiftyJSON class TranscriptLineAdapter: JSONAdapter { typealias ModelType = TranscriptLine static func adapt(json: JSON) -> Mo...
28.5625
211
0.609774
6720aee1e66695a1c16605b2dd9a32b914b8c168
2,502
/*: # H-Index II https://leetcode.com/explore/challenge/card/june-leetcoding-challenge/541/week-3-june-15th-june-21st/3364/ --- ### Problem Statement: Given an array of citations sorted in ascending order (each citation is a non-negative integer) of a researcher, write a function to compute the researcher's h-in...
28.11236
199
0.585132
f7420069f9a4586507a1b4a7bc8c65666c65c9cf
13,297
// // TaskViewController.swift // Star // // Created by 杜进新 on 2018/7/4. // Copyright © 2018年 dujinxin. All rights reserved. // import UIKit private let reuseIdentifier = "reuseIdentifier" private let reuseIndentifierHeader = "reuseIndentifierHeader" private let headViewHeight : CGFloat = 278 class TaskViewCont...
45.851724
202
0.571557
e98419fa0d4d620e0c4febfe6abc252a078198db
7,468
// // NXWebViewController.swift // NXKit // // Created by niegaotao on 2020/5/30. // Copyright © 2020年 TIMESCAPE. All rights reserved. // import UIKit import WebKit open class NXBackbarWrappedView: NXLCRView<NXButton, UIView, NXButton> { open var isAutoable = true override open func setupSubviews() { ...
38.694301
156
0.601901
1ac94753a5dcc13f7d5ec84af305526ae3a2c8a5
237
// Distributed under the terms of the MIT license // Test case submitted to project by https://github.com/practicalswift (practicalswift) // Test case found by fuzzing extension A { class A { func a { enum b { protocol P { class case ,
18.230769
87
0.738397
61fc08d7b4746bc5a370b27341fb754815e02623
1,457
/* * Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0. * This product includes software developed at Datadog (https://www.datadoghq.com/). * Copyright 2020-2021 Datadog, Inc. */ import Foundation internal struct InternalError: Error, CustomStringCon...
29.734694
117
0.618394
03bcbd22332830061800a3769e634baa8c422a7e
816
import XCTest class day4_1_tests: XCTestCase { func test_parse_input() { let input = [ "bkwzkqsxq-tovvilokx-nozvyiwoxd-172[fstek]", "wifilzof-wbiwifuny-yhachyylcha-526[qrazx]", ] let expected = [ Room(enc_name: "bkwzkqsxqtovvilokxnozvyiwoxd", sector: 172, checksum: "fstek"), Room(enc_name: "wifilzof...
35.478261
92
0.724265
ed6e070b9cbf769fd28594c2eddc2473fc4debc2
203
import Debugging import Vapor public struct JWTProviderError: Debuggable, AbortError, Error { public let identifier: String public let reason: String public let status: HTTPResponseStatus }
22.555556
63
0.778325
22cba1928da5d1b982176131b01d349f6e9678a9
3,098
// Copyright (c) 2019 Razeware LLC // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, ...
36.023256
82
0.717883
d75e43816f2d34fc56d462f5e603b12d0fb47a9a
2,752
// // PaletteChooser.swift // EmojiArt // // Created by Manuel Lorenzo (@noloman) on 02/07/2021. // import SwiftUI struct PaletteChooser: View { var emojiFontSize: CGFloat = 40 var emojiFont: Font { .system(size: emojiFontSize) } @EnvironmentObject var store: PaletteStore @State private...
29.913043
81
0.568314
79bbb877de0283137d8d77ac9f4c4ff96421151c
408
/* * Copyright 2021 IceRock MAG Inc. Use of this source code is governed by the Apache 2.0 license. */ import UIKit @UIApplicationMain class AppDelegate: NSObject, UIApplicationDelegate { var window: UIWindow? func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptio...
25.5
151
0.72549
fcba0ecbe85273526a803bca548a07d3b794b92b
1,580
// // AppDelegate.swift // todo // // Created by Guillaume LAURES on 10/04/2020. // Copyright © 2020 Baguette Soft. All rights reserved. // import UIKit @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { func application(_ application: UIApplication, didFinishLaunchingWithOptions la...
35.111111
179
0.740506
036b60f867b1d435d875318b2d5dd60988b45b8a
6,505
import UIKit // UICollection View Classes public class KeyCollectionViewCell: UICollectionViewCell { // MARK:- Properties var clearBlurEffectView: UIVisualEffectView? var greenBlurEffectView: UIVisualEffectView? //MARK:- Cell separation override public func draw(_ rect: CGRect) { ...
31.731707
93
0.643966
2f4c525b44844ee7b4df7e569562cd5a7e66a0e3
692
// // HomeViewController.swift // demo_Git // // Created by Srinivas on 10/12/18. // Copyright © 2018 Srinivas. All rights reserved. // import UIKit class HomeViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the vie...
22.322581
106
0.663295
1a4fd70c083d63478a0d081442681dc991558449
870
// swift-tools-version:5.2 // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription let package = Package( name: "remove-unused-fluent-icons", platforms: [ .macOS(.v10_13), ], products: [ .executable(name: "remove-unused-fluent-icons", ...
24.857143
96
0.633333
1ed9f36be0d95e4cb07109796c6e9f20bef7e87b
339
// // TimerRepositoryType.swift // SwiftUiCleanArchitecture // // Created by Nikolay Fiantsev on 16.12.2020. // import Foundation import Combine protocol TimerRepositoryType: class { func startTimer() -> AnyPublisher<TimeInterval, Never> } protocol TimerRepositoryHolderType { var timerRepository: TimerReposi...
18.833333
56
0.764012
e0d5466bb345036f46c905db75520468daf23788
7,405
// // AddAccountControllerTests.swift // TempBoxTests // // Created by Waseem Akram on 22/09/21. // import Foundation import XCTest import MailTMSwift @testable import TempBox class AddAccountViewControllerTests: XCTestCase { var peristenceManager: TestPersistenceManager! var mtAccountService: FakeMTAccou...
33.506787
125
0.6474
202638114552f1c80dd515196651040789c4a761
4,549
// // DiscoverCreditCardFormatTests.swift // CreditCardFormatterTests // // Created by barbarity on 14/12/2019. // Copyright (c) 2019 Barbarity Apps // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal /...
31.157534
99
0.655309
23b974ee4c6ce5fd3afc4e74c2a02277c9dcdd3c
2,413
// // ClientHander.swift // GameServer // // Created by Nguyen Dung on 9/30/16. // // import Dispatch import Foundation import Socks class ClientHander: NSObject { private var client : TCPClient! private var close : Bool = false private var ClientMessage : Array<Array<UInt8>>! var uuid : String! ...
28.388235
162
0.479486
bf89f57f6d3bea81410625ed47c38151fe692322
8,833
// // RxAppState_ExampleTests.swift // RxAppState_ExampleTests // // Created by Jörn Schoppe on 19.03.16. // Copyright © 2016 CocoaPods. All rights reserved. // import XCTest import RxSwift import RxCocoa @testable import RxAppState_Example @testable import RxAppState class RxAppStateTests: XCTestCase { ...
32.12
113
0.610891
cc87c296b09d346ee31a71a6b8f0f35c8699a09a
1,358
// // RecommendController.swift // DemoDirectory // // Created by Vladislav Fitc on 24/03/2022. // Copyright © 2022 Algolia. All rights reserved. // import Foundation import UIKit import AlgoliaSearchClient class RecommendController { let recommendClient: RecommendClient init(recommendClient: RecommendC...
33.121951
120
0.715758
75f585a036c7ba81af8296d616912f00e5860c97
10,578
// // Copyright 2018-2020 Amazon.com, // Inc. or its affiliates. All Rights Reserved. // // SPDX-License-Identifier: Apache-2.0 // import XCTest @testable import Amplify @testable import AmplifyTestCommon @testable import AWSPluginsCore class GraphQLRequestAnyModelWithSyncTests: XCTestCase { override func setUp(...
38.05036
116
0.594063
abecba301c458fb4bbc77ef86ee6d87f6468aa69
11,819
// // AppleSpeechRecognizer.swift // Spokestack // // Created by Cory D. Wiles on 1/10/19. // Copyright © 2020 Spokestack, Inc. All rights reserved. // import Foundation import Speech /** This pipeline component uses the Apple `SFSpeech` API to stream audio samples for speech recognition. Once speech pipeline...
52.29646
466
0.627295
efee5adc92ce5ca944dbcaf4834b83f7b4c49843
3,305
// // YourAccountTableView.swift // YC // // Created by VeveCorp on 7/13/16. // Copyright © 2016 VeveCorp. All rights reserved. // import UIKit import IBAnimatable import DropDown class PostHaverest : UITableViewCell { @IBOutlet weak var question: AnimatableLabel! @IBOutlet weak var food_drop_down_menu: A...
28.008475
81
0.465053
f5704da64e089bb147545f79ceb2e48ff4fcfa87
1,365
import XCTest import class Foundation.Bundle final class hiTests: XCTestCase { func testExample() throws { // This is an example of a functional test case. // Use XCTAssert and related functions to verify your tests produce the correct // results. // Some of the APIs that we use be...
28.4375
87
0.632234
61a628358939da9649b156d5cd1c93c4338accea
1,406
// // OP_TUCK.swift // // Copyright © 2018 BitcoinKit developers // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to...
42.606061
89
0.745377
9b24e5ec07e9278873846a2e0c7136f24f491b64
811
// // AnchorViewModel.swift // Live // // Created by lieon on 2017/7/11. // Copyright © 2017年 ChengDuHuanLeHui. All rights reserved. // swiftlint:disable variable_name import Foundation import PromiseKit class AnchorViewModel { lazy var anchorInfo: AnchorDetail = AnchorDetail() /// 主播信息 func req...
28.964286
132
0.639951
64335cd56176410ce47fcbef090ac87f27914709
16,757
// // Copyright Amazon.com Inc. or its affiliates. // All Rights Reserved. // // SPDX-License-Identifier: Apache-2.0 // import XCTest import SQLite import Combine @testable import Amplify @testable import AmplifyTestCommon @testable import AWSPluginsCore @testable import AWSDataStoreCategoryPlugin class OutgoingMuta...
42.209068
112
0.640628
0958090faaf26dd67608e64918cb55b3f23c884c
195
import XCTest @testable import SwiftyMatrix final class SwiftyMatrixTests: XCTestCase { func testExample() { } static var allTests = [ ("testExample", testExample), ] }
16.25
43
0.661538
4a40bfd1e920aa2ba9569d39bfc3276c819233ac
2,345
// // OmetriaDefaults.swift // Ometria // // Created by Cata on 7/24/20. // Copyright © 2020 Cata. All rights reserved. // import Foundation @propertyWrapper struct UserDefault<T> { let key: String let defaultValue: T var wrappedValue: T { get { let value = UserDefaults.standard.object(forKey...
35.530303
108
0.704051
913c5ce68f74bec4c4a1bc22042bc4fd6bcfbbb3
11,630
// // MNBannerView.swift // MonoFake // // Created by tommy on 2017/12/21. // Copyright © 2017年 TommyStudio. All rights reserved. // import UIKit import SnapKit import Kingfisher import AVFoundation import ObjectMapper public protocol EvaBannerViewDelegate: NSObjectProtocol { func clickedBannerView(item: EvaB...
37.882736
197
0.629579
14e59812aa1c3268b95b17586ab0aa472476901f
12,470
// // QuickTableViewDelegateSpec.swift // QuickTableViewControllerTests // // Created by Ben on 31/12/2017. // Copyright © 2017 bcylin. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Sof...
41.705686
125
0.608741
217a3bfeacb4b63e2513042458ab49330720c69e
524
// // BuyerDetails.swift // Chat Bot // // Created by Adarsh on 05/01/19. // Copyright © 2019 Pallav Trivedi. All rights reserved. // import Foundation class CustomerDetails: NSObject { var name:String? var location:String? var vehicleModel:String? var ownership:String? var targetPrice:Int? ...
16.903226
57
0.64313
48de3eed686394cdf1716b2366809c86edf6b81f
5,140
// // UserProfileController.swift // Movinder // // Created by Max on 09.03.21. // import UIKit protocol UserProfileControllerDelegate: class { func userProfileController(_ controller: UserProfileController, didLikeMovie user: User) func userProfileController(_ controller: UserProfileController, didDislikeM...
35.205479
152
0.650973
5bae3cfd5bf0efd51918d35ece58c50b8eeba13b
4,073
// // ViewController.swift // Calculator // // Created by Marcin Obolewicz on 24/11/2021. // import UIKit import Combine import SwiftUI final class CalculatorViewController: UIViewController { @IBOutlet private weak var firstValueTitleLabel: UILabel! @IBOutlet private weak var firstValueStepper: UISte...
34.516949
97
0.628529
561a25db6eec5ff41cd2569d36e84012ee2e6f8a
1,578
// // MainTabBarViewController.swift // Weather // // Created by Erid Bardhaj on 5/3/15. // Copyright (c) 2015 STRV. All rights reserved. // import UIKit class MainTabBarViewController: UITabBarController { required init(coder aDecoder: NSCoder) { super.init(coder: aDecoder) self.changeTab...
26.745763
106
0.640051
dba023e75cd917faf25ddc48ceff3dcbf3643f0d
3,733
// // File.swift // WiproWeather // // Created by Iain Frame on 11/02/2019. // Copyright © 2019 PointPixel. All rights reserved. // import Foundation ///Forecast fraction /// - Represents a 3h view of one days weather struct ForecastFraction: Decodable { struct Main: Decodable { let temperature: ...
33.330357
100
0.601661
505a5cc9ea6d76c0929c6fe73c68756210f10e9b
830
// // TextFieldFactory.swift // ExchangeApp // // Created by Юрий Нориков on 08.12.2019. // Copyright © 2019 norikoff. All rights reserved. // import UIKit class TextFieldFactory { static func createTextField(title: String) -> UITextField { let textField = UITextField() textField...
26.774194
114
0.685542
18ec8d1597cfaa444980db479cd4f1cc6eb6e6fa
493
// // ViewController.swift // FooApp // // Created by Tran Duc on 12/4/19. // Copyright © 2019 David. All rights reserved. // import UIKit import S1 import D1 class ViewController: UIViewController { @IBOutlet weak var titleLabel: UILabel! override func viewDidLoad() { super.viewDidLoad() print("S...
15.903226
85
0.649087
e90383c98cce0584b7eab4b0bb02887b8f412367
2,716
// // TableViewController.swift // PhoneFit 3-4 // // Created by Matthew Pileggi on 12/5/16. // Copyright © 2016 Matthew Pileggi. All rights reserved. // import UIKit class FileTableViewController: UITableViewController { var model: FileModel! @IBAction func close(_ sender: UIBarButtonItem) { ...
29.521739
136
0.649853
2822e6281aaec9fd5fdecdfa6fb4707aff0be84d
1,854
// // NativeLocationService.swift // OnTheMap // // Created by Luke Van In on 2017/01/16. // Copyright © 2017 Luke Van In. All rights reserved. // // Location service providing reverse geocoding using the native OS CoreLocation framework. // import Foundation import CoreLocation enum LocationError: Swift.Error {...
28.523077
147
0.635383
d54369f19e5adb92f10188e62b3a13b52077b4e7
944
// Copyright 2019 Hotspring Ventures Ltd. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or...
41.043478
139
0.728814
d60758cb42155926dc8552bde0f89b6a1dcdb2f0
453
// // Defaults.swift // XXTouchApp // // Created by mcy on 16/7/5. // Copyright © 2016年 mcy. All rights reserved. // import Foundation class Defaults { class func configure() { if let defaultsPath = NSBundle.mainBundle().pathForResource("Defaults", ofType: "plist") { let defaults = NSDictionary(conten...
23.842105
94
0.695364
ff9fece8b27074b3ad3ffd335b9b6b705e9fc448
1,676
import XCTest @testable import SHLModelEvaluation class PreprocessingTests: DataTest { /// Test that the preprocessors were ported correctly. func testPreprocessors() throws { guard let datasets = datasets else { XCTFail(); return } let sensorPreprocessors = Dictionary(uniqueKeysWithValues: t...
37.244444
134
0.552506
0a2005323df60f60c1646f2c56fb322cf66769af
1,240
// // UserMock.swift // FluxCapacitorSample // // Created by marty-suzuki on 2017/08/22. // Copyright © 2017年 marty-suzuki. All rights reserved. // import Foundation @testable import FluxCapacitorSample import GithubKit extension User { static func mock(id: String = "abcdef", avatarUrl: ...
30.243902
84
0.53871
03209d7131050f297a7c0ec63cd3b600e1e792cb
4,329
/* Copyright (C) 2016 Apple Inc. All Rights Reserved. See LICENSE.txt for this sample’s licensing information Abstract: This file contains the FilterUtilities class. FilterUtilities objects contain functions and data that is used by both the SimpleTunnel UI and the SimpleTunnel content filter providers. */ impor...
30.921429
185
0.724879
f968387087ce70a2152cce938b5577f9d719defc
1,178
// // This source file is part of the Web3Swift.io open source project // Copyright 2019 The Web3Swift Authors // Licensed under Apache License v2.0 // // NormalizedDecimalFromHexTests.swift // // Created by Vadim Koleoshkin on 10/05/2019 // import Nimble import Quick @testable import Web3Swift class NormalizedDecima...
28.731707
115
0.567063
0acfc744473620c14e01caf1980d71ccb660e196
1,097
// // ResponseLoggingInterceptor.swift // Github-Profile // // Created by Marcos González on 2021. // // import Apollo final class ResponseLoggingInterceptor: ApolloInterceptor { enum ResponseLoggingError: Error { case notYetReceived } func interceptAsync<Operation: GraphQLOperation>( chain: RequestChain, ...
21.096154
88
0.715588
bb6c741303cd18c3119f49712fd9b8ff76eb5643
10,172
// // MacToggle.swift // RichAppz // // Copyright © 2016-2017 RichAppz Limited. All rights reserved. // richappz.com - (rich@richappz.com) // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the ...
34.364865
107
0.581695
1d9433153a8a0ad3343806d6e9dbf9e22375a4ea
4,045
import Foundation import CoinKit import RxSwift import RxRelay import EthereumKit import BigInt class SendEvmService { let sendCoin: Coin private let adapter: ISendEthereumAdapter private let stateRelay = PublishRelay<State>() private(set) var state: State = .notReady { didSet { st...
22.103825
120
0.593572
564579f5549090682847ab21f7cbf63f86d239bf
1,784
// // ModuleVersionTests.swift // VCoreTests // // Created by Vakhtang Kontridze on 17.06.22. // import XCTest @testable import VCore // MARK: - Tests final class ModuleVersionTests: XCTestCase { // MARK: Test Data private let version1: ModuleVersion = .init(string: "1")! private let version2: ModuleVe...
28.31746
65
0.566143
2228720bd0ba99ea7a8815af26441fdb3fcda292
1,560
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // // Code generated by Microsoft (R) AutoRest Code Generator. import Foundation import azureSwiftRuntime internal struct SourceControlUpdateParametersData :...
39
130
0.735256
d5e2a5d9501b7f40166d3163421eb4f6678d1f23
333
// // SelectBasalProfileMessageBody.swift // MinimedKit // // Copyright © 2017 Pete Schwamb. All rights reserved. // import Foundation public class SelectBasalProfileMessageBody: CarelinkLongMessageBody { public convenience init(newProfile: BasalProfile) { self.init(rxData: Data([1, newProfile.rawValue...
22.2
69
0.732733
e4a69fe90968de7866223cec80778e04fce7375b
3,712
// // Extensions.swift // JSON2SWIFT // // Created by Conrado Mateu Gisbert on 02/03/2018. // Copyright © 2018 conradomateu. All rights reserved. // extension String { var isNumeric: Bool { guard self.count > 0 else { return false } let nums: Set<Character> = ["0", "1", "2", "3", "4", "5", "6",...
30.933333
95
0.576239
9c690b121d42bc928c8ccc3976c8d1e1ae210ff2
3,910
// // Forecast.swift // RainyShinyCloudy // // Created by David Sternheim on 8/5/17. // Copyright © 2017 David Sternheim. All rights reserved. // import UIKit import Alamofire class Forecast{ var _date: String! var _weatherType: String! var _highTemp: String! var _lowTemp: String! var forecast...
25.89404
88
0.459335