This a simple tutorial to explain about first steps.
git clone https://github.com/OpenMined/PySyft.git
cd PySyft
docker build -f Development-Dockerfile -t "pysyft:local" .
make custom docker=pysyft:local| import UIKit | |
| import PlaygroundSupport | |
| class CircularQueue<T> : IteratorProtocol, RandomAccessCollection { | |
| typealias Element = T | |
| public typealias Index = Int | |
| public typealias Indices = CountableRange<Int> | |
| var position = 0 | |
| let items : [T] |
| class RandomQueue<T> : IteratorProtocol { | |
| typealias Element = T | |
| var position = 0 | |
| var positions : [Int] = [] | |
| let items : [T] | |
| init(items:[T]){ | |
| self.items = items | |
| } |
| { | |
| "coreTeam" : [ | |
| { | |
| "name" : "Ben Cohen", | |
| "email" : "ben_cohen@apple.com" | |
| }, | |
| { | |
| "name" : "Chris Lattner", | |
| "email" : "sabre@nondot.org" | |
| }, |
| git for-each-ref --sort=committerdate refs/heads/ --format='%(HEAD) %(color:red)%(objectname:short)%(color:reset);%(color:yellow)%(refname:short)%(color:reset);(%(color:green)%(committerdate:relative) - %(committerdate:local)%(color:reset));%(authorname);%(contents:subject)' | column -t -s ';' |
| import Dispatch | |
| import Foundation | |
| public protocol Service { | |
| static func run() | |
| } | |
| class ServiceApplication { |
| import Cocoa | |
| public typealias RestKitSuccess = (HTTPURLResponse, Data?) -> Void | |
| public typealias RestKitFailure = (HTTPURLResponse, RestKitError) -> Void | |
| public protocol RestKitProcess { | |
| func process(_ request: URLRequest) -> URLRequest | |
| } | |
| public enum RestKitError: Error { |
| //: Playground - noun: a place where people can play | |
| import Foundation | |
| import PlaygroundSupport | |
| struct Post { | |
| let id: Int | |
| let body: String | |
| let username: String | |
| let name: String |
| import Cocoa | |
| struct Counter { | |
| var table = Dictionary<String,Int>() | |
| mutating func insertUnique(_ word: String) -> Bool { | |
| let value = table[word] ?? 0 | |
| guard value == 0 else { return false } | |
| table[word] = value + 1 | |
| return true |