Dataset Viewer
Auto-converted to Parquet Duplicate
repo_name
stringlengths
7
91
path
stringlengths
8
658
copies
stringclasses
125 values
size
stringlengths
3
6
content
stringlengths
118
674k
license
stringclasses
15 values
hash
stringlengths
32
32
line_mean
float64
6.09
99.2
line_max
int64
17
995
alpha_frac
float64
0.3
0.9
ratio
float64
2
9.18
autogenerated
bool
1 class
config_or_test
bool
2 classes
has_no_keywords
bool
2 classes
has_few_assignments
bool
1 class
wangyaqing/LeetCode-swift
Solutions/19. Remove Nth Node From End of List.playground/Contents.swift
1
937
import UIKit public class ListNode { public var val: Int public var next: ListNode? public init(_ val: Int) { self.val = val self.next = nil } } class Solution { func removeNthFromEnd(_ head: ListNode?, _ n: Int) -> ListNode? { let pre:ListNode? = ListNode(0) pre?.n...
mit
765873f9aa1dcff75ccdafc90d89077c
18.93617
69
0.510139
3.808943
false
false
false
false
malcommac/Hydra
Sources/Hydra/Promise+Timeout.swift
1
2776
/* * Hydra * Fullfeatured lightweight Promise & Await Library for Swift * * Created by: Daniele Margutti * Email: hello@danielemargutti.com * Web: http://www.danielemargutti.com * Twitter: @danielemargutti * * Copyright © 2017 Daniele Margutti * * * Permission is hereby granted, free of charge, to any person obtain...
mit
8970be790dd6a734dbcbbb430deff56e
38.084507
107
0.736577
4.051095
false
false
false
false
rajmuhar/iosbridge-rottentomatoes
RottenTomatoesSwift/RottenTomatoesSwift/Downloader.swift
7
1604
// // Downloader.swift // RottenTomatoesSwift // // Created by Jeffrey Bergier on 9/12/15. // Copyright © 2015 MobileBridge. All rights reserved. // import Foundation protocol DownloaderDelegate: class { func downloadFinishedForURL(finishedURL: NSURL) } class Downloader { weak var delegate: Download...
mit
00add93a3b347e4a0b27f0d6c32831b7
31.06
111
0.623206
5.307947
false
true
false
false
barteljan/VISPER
Example/VISPER-Wireframe-Tests/Mocks/MockRoutingHandlerContainer.swift
1
2505
// // MockRoutingHandlerContainer.swift // VISPER-Wireframe_Example // // Created by bartel on 02.12.17. // Copyright © 2017 CocoaPods. All rights reserved. // import Foundation import VISPER_Wireframe import VISPER_Core class MockRoutingHandlerContainer: NSObject, RoutingHandlerContainer { var invokedAdd = ...
mit
92d301d4820c6a69c5a80541b6780821
40.733333
128
0.748003
5.260504
false
false
false
false
dflax/Anagrams
Anagrams/TileView.swift
1
2895
// // TileView.swift // Anagrams // // Created by Daniel Flax on 4/29/15. // Copyright (c) 2015 Caroline. All rights reserved. // import UIKit // Delegate protocol to inform Game Controller that tile has dropped. protocol TileDragDelegateProtocol { func tileView(tileView: TileView, didDragToPoint: CGPoint) } //...
mit
e6739246768cc4a621701902e615a743
26.056075
101
0.720898
3.560886
false
false
false
false
xu6148152/binea_project_for_ios
ListerforAppleWatchiOSandOSX/Swift/ListerOSX/AppDelegate.swift
1
2899
/* Copyright (C) 2015 Apple Inc. All Rights Reserved. See LICENSE.txt for this sample’s licensing information Abstract: The application delegate. */ import Cocoa import ListerKit @NSApplicationMain class AppDelegate: NSObject, NSApplicationDelegate { // MARK: Properties @IBOutlet wea...
mit
bbfb45544f2c692de87a86f4619f5d03
35.670886
193
0.645841
5.852525
false
true
false
false
SuPair/firefox-ios
Client/Frontend/Browser/PrintHelper.swift
16
968
/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ import Foundation import Shared import WebKit class PrintHelper: TabContentScript { fileprivate weak var tab:...
mpl-2.0
80699f12c188962494ada6ec2205d4f5
30.225806
132
0.683884
4.792079
false
false
false
false
codergaolf/DouYuTV
DouYuTV/DouYuTV/Classes/Tools/Extension/UIBarButtonItem-Extension.swift
1
1357
// // UIBarButtonItem-Extension.swift // DouYuTV // // Created by 高立发 on 2016/11/12. // Copyright © 2016年 GG. All rights reserved. // import UIKit extension UIBarButtonItem { /* class func creatItem(imgName : String, highLighted : String, size : CGSize) -> UIBarButtonItem { let btn = UIButton() ...
mit
f71783229e1b1930a55944b99bb123e3
26.478261
100
0.56962
3.95
false
false
false
false
Vadim-Yelagin/ImageLoading
ImageLoading/FadeInImageLoadingView.swift
1
868
// // FadeInImageLoadingView.swift // // Created by Vadim Yelagin on 20/06/15. // Copyright (c) 2015 Fueled. All rights reserved. // import Foundation import UIKit open class FadeInImageLoadingView: ImageLoadingView { open override func transition( from oldState: Task.State, ofTask oldTask: Task?, to newSta...
mit
4e2b93f5c0469775b47eb6d88e2e8507
20.170732
83
0.669355
3.214815
false
false
false
false
jm-schaeffer/JMWebImageView
JMWebImageView/JMWebImageView.swift
1
5598
// // JMWebImageView.swift // JMWebImageView // // Copyright (c) 2016 J.M. Schaeffer // // 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 limitat...
mit
e9473c2dc3a28834d7c2b6589b386f80
33.343558
198
0.605395
5.084469
false
false
false
false
RobotPajamas/ble113-ota-ios
ble113-ota/BaseBluetoothPeripheral.swift
1
6238
// // BaseBluetoothPeripheral.swift // ble113-ota // // Created by Suresh Joshi on 2016-06-13. // Copyright © 2016 Robot Pajamas. All rights reserved. // import LGBluetooth class BaseBluetoothPeripheral { enum StandardServices { static let deviceInformation: String = "180A"; } enum StandardC...
mit
4f1886b57a347e726bc27720b4464f6f
34.844828
171
0.65865
4.946075
false
false
false
false
justindaigle/grogapp-ios
GroGApp/GroGApp/DetailViewController.swift
1
4637
// // DetailViewController.swift // GroGApp // // Created by Justin Daigle on 3/26/15. // Copyright (c) 2015 Justin Daigle (.com). All rights reserved. // import UIKit class DetailViewController: UIViewController { @IBOutlet var displayNameLabel:UILabel! @IBOutlet var userNameLabel:UILabel! @IBOu...
mit
ac2ef46ad82f28a6d4fc01ced50f1074
34.669231
106
0.634246
5.135105
false
false
false
false
BlurredSoftware/BSWInterfaceKit
Sources/BSWInterfaceKit/ViewControllers/Presentations/CardPresentation.swift
1
11509
// // Copyright © 2018 TheLeftBit SL. All rights reserved. // Created by Pierluigi Cifani. // #if canImport(UIKit) import UIKit /** This abstraction will create the appropiate `UIViewControllerAnimatedTransitioning` instance for a card-like modal animation. - Attention: To use it: ``` extension FooVC: UIViewC...
mit
443b6acef827e0e7cc57d4fbfaed0eb2
41.780669
328
0.686044
5.944215
false
false
false
false
KailinLi/LeetCode-Solutions
328. Odd Even Linked List/solution.swift
1
1033
/** * Definition for singly-linked list. * public class ListNode { * public var val: Int * public var next: ListNode? * public init(_ val: Int) { * self.val = val * self.next = nil * } * } */ class Solution { func oddEvenList(_ head: ListNode?) -> ListNode? { if hea...
mit
79cf38957e57960f548b51189e096efe
23.046512
54
0.418199
4.322176
false
false
false
false
mdmsua/Ausgaben.iOS
Ausgaben/Ausgaben/AppDelegate.swift
1
4847
// // AppDelegate.swift // Ausgaben // // Created by Dmytro Morozov on 11.01.16. // Copyright © 2016 Dmytro Morozov. All rights reserved. // import UIKit import CoreData import Fabric import Crashlytics @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? var c...
mit
ea78e0e6867dfbc0d54d3da1d06d3e2b
48.958763
291
0.705324
5.748517
false
false
false
false
francisykl/PagingMenuController
Example/PagingMenuControllerDemo/GistsViewController.swift
4
2018
// // GistsViewController.swift // PagingMenuControllerDemo // // Created by Yusuke Kita on 5/10/15. // Copyright (c) 2015 kitasuke. All rights reserved. // import UIKit class GistsViewController: UITableViewController { var gists = [[String: AnyObject]]() class func instantiateFromStoryboard() -> Gi...
mit
75cef7213f8331c5c3f5b2b1904de5c1
32.633333
123
0.643707
5.09596
false
false
false
false
verloop/verloop_ios
VerloopSDK/Verloop/VerloopChatViewController.swift
1
2175
// // VerloopChatViewController.swift // VerloopSDK // // Created by Prashanta Kumar Nayak on 24/05/17. // Copyright © 2017 Verloop. All rights reserved. // import Foundation import UIKit class VerloopChatViewController: UIViewController { var urlString:String? var webView:UIWebView? var cancelButto...
mit
a0215da87be7f47cf11a7032edf71bac
34.639344
199
0.674793
4.596195
false
false
false
false
P0ed/SWLABR
SWLABR/Model/Components/InputComponent.swift
1
731
import Foundation final class InputComponent: ControlComponent { let inputController: InputController var thrusters = 0.0 init(_ inputController: InputController) { self.inputController = inputController } func update(node: EntityNode, inEngine engine: GameEngine) { let input = inputController.currentInput...
mit
53737b2a8c28ff43847408a9f84a4fcb
21.84375
63
0.708618
3.020661
false
false
false
false
sufangliang/LiangDYZB
LiangDYZB/Classes/Main/View/PageContentView.swift
1
5811
// // PageContentView.swift // LiangDYZB // // Created by qu on 2017/1/12. // Copyright © 2017年 qu. All rights reserved. // import UIKit protocol PageContentViewDelegate : class { func pageContentView(_ contentView : PageContentView, progress : CGFloat, sourceIndex : Int, targetIndex : Int) } private let i...
mit
aa8bc3d2e8dc53fb3a25f452b3cb2636
31.17341
121
0.636903
5.182495
false
false
false
false
alisidd/iOS-WeJ
WeJ/Play Tracks/HubViewController.swift
1
7424
// // LyricsViewController.swift // WeJ // // Created by Mohammad Ali Siddiqui on 3/15/17. // Copyright © 2017 Mohammad Ali Siddiqui. All rights reserved. // import UIKit class HubViewController: UIViewController, UITableViewDelegate, UITableViewDataSource { weak var delegate: PartyViewControllerInfoDele...
gpl-3.0
63816e9c1f1d3dba41eed7cbd114351a
33.207373
144
0.624411
5.351839
false
false
false
false
vmanot/swift-package-manager
Sources/Utility/BuildFlags.swift
1
1156
/* 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 http://swift.org/LICENSE.txt for license information See http://swift.org/CONTRIBUTORS.txt for Swift project au...
apache-2.0
1f50eab5bcc2452596a397bb1cff7530
27.9
77
0.654844
4.173285
false
false
false
false
nodekit-io/nodekit-darwin
src/samples/sample-nodekit/platform-darwin/SamplePlugin.swift
1
2602
/* * nodekit.io * * Copyright (c) 2016 OffGrid Networks. All Rights Reserved. * * 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 re...
apache-2.0
c4cad24f2800a92a0f43038052d28a84
32.358974
196
0.694466
4.525217
false
false
false
false
sarvex/SwiftRecepies
Concurrency/Playing Audio in the Background/Playing Audio in the Background/AppDelegate.swift
1
3763
// // AppDelegate.swift // Playing Audio in the Background // // Created by Vandad Nahavandipoor on 7/7/14. // Copyright (c) 2014 Pixolity Ltd. All rights reserved. // // These example codes are written for O'Reilly's iOS 8 Swift Programming Cookbook // If you use these solutions in your apps, you can give attrib...
isc
21eac957465dd70bbd597e33ce915938
30.621849
83
0.650545
5.255587
false
false
false
false
peferron/algo
EPI/Hash Tables/Implement an ISBN cache/swift/main.swift
1
1976
private struct CachedValue { let price: Int var olderISBN: String? var newerISBN: String? } public struct ISBNCache { public let capacity: Int private var cache: [String: CachedValue] private var oldestISBN: String? private var newestISBN: String? public init(capacity: Int) { s...
mit
a44b96747ae9bd9ad26e546ca1451d50
28.058824
97
0.574393
4.420582
false
false
false
false
peferron/algo
EPI/Sorting/Count the frequencies of characters in a sentence/swift/test.swift
1
1116
import Darwin func == <T: Equatable, U: Equatable>(lhs: [(T, U)], rhs: [(T, U)]) -> Bool { guard lhs.count == rhs.count else { return false } for (i, lt) in lhs.enumerated() { let rt = rhs[i] guard lt.0 == rt.0 && lt.1 == rt.1 else { return false } } retu...
mit
a5830712171c0a41a9e020b037a685ff
21.32
98
0.445341
3.4875
false
true
false
false
sshams/puremvc-swift-standard-framework
PureMVC/org/puremvc/swift/patterns/observer/Notification.swift
1
2831
// // Notification.swift // PureMVC SWIFT Standard // // Copyright(c) 2015-2025 Saad Shams <saad.shams@puremvc.org> // Your reuse is governed by the Creative Commons Attribution 3.0 License // /** A base `INotification` implementation. PureMVC does not rely upon underlying event models such as the one provided wi...
bsd-3-clause
df7d7f165e30ace057de4048733c45ea
31.170455
86
0.697987
4.263554
false
false
false
false
marcelganczak/swift-js-transpiler
test/types/tuple.swift
1
594
let unnamedUntypedTuple = (4, 25) print(unnamedUntypedTuple.0) print(unnamedUntypedTuple.1) let unnamedTypedTuple:(Int, Int) = (4, 25) print(unnamedTypedTuple.0) print(unnamedTypedTuple.1) let unnamedUntypedVariadicTuple = (4, "string") print(unnamedUntypedVariadicTuple.0) print(unnamedUntypedVariadicTuple.1) let na...
mit
5a9c27b54eff70d4741be928b4776b87
24.869565
48
0.784512
2.911765
false
false
false
false
gregomni/swift
test/refactoring/ConvertAsync/convert_function.swift
10
32579
// REQUIRES: concurrency // RUN: %empty-directory(%t) enum CustomError : Error { case Bad } func run(block: () -> Bool) -> Bool { return false } func makeOptionalError() -> Error? { return nil } func makeOptionalString() -> String? { return nil } func simple(_ completion: @escaping (String) -> Void) { } func simpl...
apache-2.0
fd1481d93638407dfe14b2a8bff580b6
46.980854
183
0.695202
3.200609
false
false
false
false
firebase/quickstart-ios
database/DatabaseExampleSwift/SignInViewController.swift
1
4970
// // Copyright (c) 2015 Google 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.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agre...
apache-2.0
2d784a410c67a9a389897f41f1e1dcf9
29.490798
96
0.649095
4.774256
false
false
false
false
firebase/firebase-ios-sdk
FirebaseMLModelDownloader/Sources/ModelDownloader.swift
1
27475
// Copyright 2021 Google LLC // // 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 agreed to in ...
apache-2.0
d9f31fea2755e7a6983c73f2d46638c4
42.131868
166
0.643094
5.479657
false
false
false
false
nixzhu/MonkeyKing
Sources/MonkeyKing/MonkeyKing+handleOpenURL.swift
1
18661
import UIKit import Security extension MonkeyKing { public class func handleOpenUserActivity(_ userActivity: NSUserActivity) -> Bool { guard userActivity.activityType == NSUserActivityTypeBrowsingWeb, let url = userActivity.webpageURL else { return false ...
mit
c75fe251e98b20267941209541581a5e
35.662083
256
0.536734
5.187934
false
false
false
false
givingjan/SMTagView
TagViewSample/ViewController.swift
1
2137
// // ViewController.swift // TagViewSample // // Created by JaN on 2017/7/5. // Copyright © 2017年 givingjan. All rights reserved. // import UIKit class ViewController: UIViewController { @IBOutlet var m_tagViewSingle: SMTagView! @IBOutlet var m_tagViewMultiple: SMTagView! @IBOutlet var m_btnChange: ...
mit
d295e3904708646d7c2addf28672ab11
28.130435
152
0.620398
3.465517
false
false
false
false
ksco/swift-algorithm-club-cn
Combinatorics/Combinatorics.swift
1
2660
/* Calculates n! */ func factorial(n: Int) -> Int { var n = n var result = 1 while n > 1 { result *= n n -= 1 } return result } /* Calculates P(n, k), the number of permutations of n distinct symbols in groups of size k. */ func permutations(n: Int, _ k: Int) -> Int { var n = n var answer = n...
mit
6f60291ffd46f473fefc63abe8b601b0
21.166667
74
0.586466
3.133098
false
false
false
false
End of preview. Expand in Data Studio

IVA Swift GitHub Code Dataset - Curated - Validation

Dataset Description

This is the curated valid split of IVA Swift dataset extracted from GitHub. It contains curated Swift files gathered with the purpose to train & validate a code generation model.

The dataset only contains a valid split.

For validation and unspliced versions, please check the following links:

Information about dataset structure, data involved, licenses, and standard Dataset Card information is available that applies to this dataset also.

Considerations for Using the Data

The dataset comprises source code from various repositories, potentially containing harmful or biased code, along with sensitive information such as passwords or usernames.

Downloads last month
14

Models trained or fine-tuned on mvasiliniuc/iva-swift-codeint-clean-valid