repo_name
stringlengths
6
91
ref
stringlengths
12
59
path
stringlengths
7
936
license
stringclasses
15 values
copies
stringlengths
1
3
content
stringlengths
61
714k
hash
stringlengths
32
32
line_mean
float64
4.88
60.8
line_max
int64
12
421
alpha_frac
float64
0.1
0.92
autogenerated
bool
1 class
config_or_test
bool
2 classes
has_no_keywords
bool
2 classes
has_few_assignments
bool
1 class
BasqueVoIPMafia/cordova-plugin-iosrtc
refs/heads/master
src/PluginRTCTypes.swift
mit
3
struct PluginRTCTypes { static let signalingStates = [ RTCSignalingState.stable.rawValue: "stable", RTCSignalingState.haveLocalOffer.rawValue: "have-local-offer", RTCSignalingState.haveLocalPrAnswer.rawValue: "have-local-pranswer", RTCSignalingState.haveRemoteOffer.rawValue: "have-remote-of...
16323e85605ce131b90d2f480c5c77a9
38.410256
72
0.738452
false
false
false
false
NinjaIshere/GKGraphKit
refs/heads/master
GKGraphKit/GKManagedEntity.swift
agpl-3.0
1
/** * Copyright (C) 2015 GraphKit, Inc. <http://graphkit.io> and other GraphKit contributors. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published * by the Free Software Foundation, either version 3 of the License, or * (at y...
03e7c058fbb800126a42b7d95a9a8200
32.162879
177
0.636052
false
false
false
false
apple/swift-nio-http2
refs/heads/main
IntegrationTests/tests_01_allocation_counters/test_01_resources/test_1k_requests.swift
apache-2.0
1
//===----------------------------------------------------------------------===// // // This source file is part of the SwiftNIO open source project // // Copyright (c) 2020-2021 Apple Inc. and the SwiftNIO project authors // Licensed under Apache License v2.0 // // See LICENSE.txt for license information // See CONTRIB...
4cfe4907f1383eaa75910ecc254f8073
34.296296
145
0.641396
false
false
false
false
rokuz/omim
refs/heads/master
iphone/Maps/Classes/CustomViews/NavigationDashboard/Views/RoutePreview/RoutePreviewStatus/BaseRoutePreviewStatus.swift
apache-2.0
1
@objc(MWMBaseRoutePreviewStatus) final class BaseRoutePreviewStatus: SolidTouchView { @IBOutlet private weak var errorBox: UIView! @IBOutlet private weak var resultsBox: UIView! @IBOutlet private weak var heightBox: UIView! @IBOutlet private weak var manageRouteBox: UIView! @IBOutlet weak var manageRouteBoxBa...
b73ad4e1affd0e3c72248abc2d62781a
32.848624
125
0.676514
false
false
false
false
shridharmalimca/LocationTracking
refs/heads/master
LocationTracking/LocationTracking/CoreDataService.swift
apache-2.0
3
import CoreData protocol CoreDataServiceProtocol:class { var errorHandler: (Error) -> Void {get set} var persistentContainer: NSPersistentContainer {get} var mainContext: NSManagedObjectContext {get} var backgroundContext: NSManagedObjectContext {get} func performBackgroundTask(_ block: @escaping (...
fe3e22d7dab996b75586f238bcebde98
33.262295
99
0.646411
false
false
false
false
haranicle/AlcatrazTour
refs/heads/master
AlcatrazTour/PluginTableViewController.swift
mit
1
// // PluginListMainViewController // AlcatrazTour // // Copyright (c) 2015年 haranicle. All rights reserved. // import UIKit import Realm let PluginCellReuseIdentifier = "Cell" enum Modes:Int { case Popularity = 0 case Stars = 1 case Update = 2 case New = 3 func toIcon() -> String { ...
56b7dc6d2209efe98e97fb2a763440fa
38.197917
245
0.670712
false
false
false
false
JonahStarling/GlanceiOS
refs/heads/master
Glance/Friend.swift
mit
1
// // Friend.swift // Glance // // Created by Jonah Starling on 4/14/16. // Copyright © 2016 In The Belly. All rights reserved. // import Foundation class Friend { var friendType: String var userName: String var userId: String var userHandle: String var userPic: String // Default Init...
034f4d01a8969358391f85c7abdfc87e
29
101
0.621775
false
false
false
false
dongdongSwift/guoke
refs/heads/master
gouke/果壳/Protocol.swift
mit
1
// // Protocol.swift // 果壳 // // Created by qianfeng on 2016/10/25. // Copyright © 2016年 张冬. All rights reserved. // import UIKit import MJRefresh enum BarButtonPosition { case left case right } protocol addRefreshProtocol:NSObjectProtocol { func addRefresh(header:(()->())?,footer:(()->())?) }...
a3e2790d40ea7ba4ce18d9817eefab74
34.328947
129
0.652142
false
false
false
false
zjjzmw1/SwiftCodeFragments
refs/heads/master
SwiftCodeFragments/AnimationResource/TransitionFirstPushViewController.swift
mit
1
// // TransitionFirstPushViewController.swift // SwiftCodeFragments // // Created by zhangmingwei on 2017/2/6. // Copyright © 2017年 SpeedX. All rights reserved. // 转场动画最简单的方法 第一页 push方式 import UIKit class TransitionFirstPushViewController: UIViewController,UIViewControllerTransitioningDelegate,UINavigationContr...
4bbfe4eadcddf9859eea0cc32f51650e
31.170213
246
0.640873
false
false
false
false
iamrajhans/SplashiOS
refs/heads/master
SplashDemo/SplashDemo/AppDelegate.swift
mit
1
// // AppDelegate.swift // SplashDemo // // Created by Nishu on 16/10/16. // Copyright © 2016 com.drone. All rights reserved. // import UIKit import CoreData @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? func application(application: UIApplication, did...
8e64ab9b422678df6b4f4789d8aba528
54.547826
291
0.722605
false
false
false
false
Vostro162/VaporTelegram
refs/heads/master
Sources/App/MethodsAble.swift
mit
1
import Foundation /* * * The Bot API supports basic formatting for messages. You can use bold and italic text, as well as inline links and pre-formatted code in your bots' messages. * Telegram clients will render them accordingly. You can use either markdown-style or HTML-style formatting. * */ public enum ParseM...
b6e9c2ebfc66b285bd0b800e07f32b0e
56.491935
242
0.687754
false
false
false
false
jdfergason/swift-toml
refs/heads/master
Sources/Toml/Grammar.swift
apache-2.0
1
/* * Copyright 2016-2018 JD Fergason * * 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 agree...
587f05c42255923f2a4576ba5bcdceda
43.74026
100
0.519884
false
false
false
false
onevcat/Rainbow
refs/heads/master
Sources/Color.swift
mit
1
// // Color.swift // Rainbow // // Created by Wei Wang on 15/12/22. // // Copyright (c) 2018 Wei Wang <onevcat@gmail.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 Software without ...
aa2dc05798ccae501d6f0524bfc564c7
31.474747
102
0.673717
false
false
false
false
fespinoza/linked-ideas-osx
refs/heads/master
Playground-macOS.playground/Pages/Hello World.xcplaygroundpage/Contents.swift
mit
1
import Cocoa NSImage.init(contentsOfFile: "tutorial-00.jpg") //NSImage.init(byReferencingFile: "tutorial-00") // images on macos let fileURL = Bundle.main.url(forResource: "tutorial-00", withExtension: "jpg") let image = NSImage.init(contentsOf: fileURL!) let imageView = NSImageView(frame: CGRect(x: 0, y: 0, width...
fd8d91d41bd7f6cd21803cf7fee2137f
24.111111
79
0.763274
false
false
false
false
OscarSwanros/swift
refs/heads/master
tools/SwiftSyntax/SourcePresence.swift
apache-2.0
10
//===---------------- SourcePresence.swift - Source Presence --------------===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See https://swift.org/L...
d92ce582dc3b12e03d82adab76d1f584
39.56
80
0.647929
false
false
false
false
kaishin/ImageScout
refs/heads/master
Tests/ImageScoutTests/ScoutTests.swift
mit
1
import XCTest import ImageScout private final class BundleToken {} private let expectationTimeOut: TimeInterval = 5 class ImageScoutTests: XCTestCase { override func setUp() { super.setUp() } override func tearDown() { super.tearDown() } func url(forResource name: String, extension ext: String) ...
391c645ef72e1f1e190aa9198c31329b
34.609756
94
0.694178
false
true
false
false
whitepixelstudios/Material
refs/heads/master
Sources/iOS/FABMenu.swift
bsd-3-clause
1
/* * Copyright (C) 2015 - 2017, Daniel Dahan and CosmicMind, Inc. <http://cosmicmind.com>. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * * Redistributions of source code must retain t...
7fa468d7336ee9ef44677cb53a0088a7
34.395833
304
0.630077
false
false
false
false
RxSwiftCommunity/RxAlamofire
refs/heads/main
Examples/RxAlamofireDemo-iOS/MasterViewController.swift
mit
1
import Alamofire import RxAlamofire import RxSwift import UIKit enum APIError: Error { case invalidInput case badResponse func toNSError() -> NSError { let domain = "com.github.rxswiftcommunity.rxalamofire" switch self { case .invalidInput: return NSError(domain: domain, code: -1, userInfo: [N...
97927e897bc26400f791963b1cd9f91f
30.783465
119
0.621578
false
false
false
false
madhusamuel/PlacesExplorer
refs/heads/master
PlacesExplorer/Networking/URLConstructor.swift
epl-1.0
1
// // URLConstructor.swift // PlacesExplorer // // Created by Madhu Samuel on 5/11/2015. // Copyright © 2015 Madhu. All rights reserved. // import Foundation class URLConstructor { var endPoint: String! var webservice: String! var clientId: String! var clientSecret: String! var dataURLStr...
a6956c01855afcaf0a32b67e9c63ecf1
27.723404
212
0.573017
false
false
false
false
zyuanming/EffectDesignerX
refs/heads/master
EffectDesignerX/Model/BindingModel.swift
mit
1
// // BindingEmitterCellModel.swift // EffectDesignerX // // Created by Zhang Yuanming on 11/30/16. // Copyright © 2016 Zhang Yuanming. All rights reserved. // import Foundation class BindingModel: NSObject { dynamic var emitterShape: String = "" dynamic var emitterMode: String = "" dynamic var rende...
f06d31d16590eae27765a0e6140e5934
36.954023
70
0.699576
false
false
false
false
ianyh/Highball
refs/heads/master
Highball/AccountsService.swift
mit
1
// // AccountsService.swift // Highball // // Created by Ian Ynda-Hummel on 12/16/14. // Copyright (c) 2014 ianynda. All rights reserved. // import OAuthSwift import RealmSwift import SwiftyJSON import TMTumblrSDK import UIKit public struct AccountsService { private static let lastAccountNameKey = "HILastAccount...
fc928ec2b14e915c261a53ae4af0c429
26.16185
148
0.709087
false
false
false
false
drmohundro/Quick
refs/heads/master
Quick/QuickTests/FunctionalTests.swift
mit
2
// // FunctionalTests.swift // QuickTests // // Created by Brian Ivan Gesiak on 6/5/14. // Copyright (c) 2014 Brian Ivan Gesiak. All rights reserved. // import Quick import Nimble var dinosaursExtinct = false var mankindExtinct = false class FunctionalSharedExamples: QuickSharedExampleGroups { override class...
a0ed80ab3389e5ed029a767f5f319df8
30.282443
96
0.487555
false
false
false
false
imex94/KCLTech-iOS-2015
refs/heads/master
session102/Challenge1.playground/Contents.swift
mit
1
//: Playground - noun: a place where people can play import UIKit var str = "Hello, playground" // Naive Prime function func naivePrime(number: Int) -> Bool { for i in 2...Int(sqrt(Double(number))) { if (number % i == 0) { return false } } return true } naivePrime(5) /...
e247360f4d9d33aaccd4803110c90af3
14.716418
52
0.510921
false
false
false
false
nekrich/GlobalMessageService-iOS
refs/heads/master
Source/Core/CoreData/GMSInboxAlphaName+Extension.swift
apache-2.0
1
// // GMSInboxAlphaName+Extension.swift // GlobalMessageService // // Created by Vitalii Budnik on 2/25/16. // Copyright © 2016 Global Message Services Worldwide. All rights reserved. // import Foundation import CoreData extension GMSInboxAlphaName: NSManagedObjectSearchable { // swiftlint:disable line_lengt...
bec1d82212dfd4b1ac332e19d9d9fc20
30.54717
131
0.73445
false
false
false
false
tardieu/swift
refs/heads/master
test/SILGen/witness_same_type.swift
apache-2.0
1
// RUN: %target-swift-frontend -Xllvm -new-mangling-for-tests -emit-silgen %s | %FileCheck %s // RUN: %target-swift-frontend -emit-ir %s protocol Fooable { associatedtype Bar func foo<T: Fooable where T.Bar == Self.Bar>(x x: T) -> Self.Bar } struct X {} // Ensure that the protocol witness for requirements with ...
a62a46412e1b830b322336862919aec8
39.823529
320
0.680836
false
false
false
false