This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import TensorFlow | |
import Python | |
let np = Python.import("numpy") | |
let randomNumbers = Tensor<Float>(randomUniform: [5, 5]) | |
print(randomNumbers) | |
let rotatedRandomNumbers = Tensor<Float>(numpy: np.rot90(randomNumbers.makeNumpyArray())) | |
print(rotatedRandomNumbers) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct ContentView : View { | |
@State var stackLocation: CGPoint = .zero | |
@State var stackAngle: Angle = .zero | |
var body: some View { | |
VStack(alignment: .leading) { | |
Text("Hello World") | |
.font(.largeTitle) | |
.bold() | |
Text("This is my test app.") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
VStack(alignment: .leading) { | |
Text("Hello World") | |
.font(.largeTitle) | |
.bold() | |
Text("This is my test app.") | |
} | |
.offset(x: stackLocation.x, y: stackLocation.y) | |
.gesture(DragGesture() | |
.onChanged { | |
self.stackLocation = $0.location |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
VStack(alignment: .leading) { | |
Text("Hello World") | |
.font(.largeTitle) | |
.bold() | |
Text("This is my test app.") | |
} | |
.offset(x: stackLocation.x, y: stackLocation.y) | |
.gesture(DragGesture() | |
.onChanged { | |
self.stackLocation = $0.location |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
VStack(alignment: .leading) { | |
Text("Hello World") | |
.font(.largeTitle) | |
.bold() | |
Text("This is my test app.") | |
} | |
.offset(x: stackLocation.x, y: stackLocation.y) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct ContentView : View { | |
@State var stackLocation: CGPoint = .zero | |
var body: some View { | |
VStack(alignment: .leading) { | |
Text("Hello World") | |
.font(.largeTitle) | |
.bold() | |
Text("This is my test app.") | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
VStack(alignment: .leading) { | |
Text("Hello World") | |
.font(.largeTitle) | |
.bold() | |
Text("This is my test app.") | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
VStack { | |
Text("Hello World") | |
.font(.largeTitle) | |
.bold() | |
Text("This is my test app.") | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Text("Hello World") | |
.font(.largeTitle) | |
.bold() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
struct ContentView : View { | |
var body: some View { | |
Text("Hello World") | |
} | |
} | |
#if DEBUG | |
struct ContentView_Previews : PreviewProvider { |