Skip to content

Instantly share code, notes, and snippets.

View tanmayb123's full-sized avatar

Tanmay Bakshi tanmayb123

  • Software Developer, YouTuber
  • Canada
View GitHub Profile
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)
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.")
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
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
VStack(alignment: .leading) {
Text("Hello World")
.font(.largeTitle)
.bold()
Text("This is my test app.")
}
.offset(x: stackLocation.x, y: stackLocation.y)
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.")
}
VStack(alignment: .leading) {
Text("Hello World")
.font(.largeTitle)
.bold()
Text("This is my test app.")
}
VStack {
Text("Hello World")
.font(.largeTitle)
.bold()
Text("This is my test app.")
}
Text("Hello World")
.font(.largeTitle)
.bold()
import SwiftUI
struct ContentView : View {
var body: some View {
Text("Hello World")
}
}
#if DEBUG
struct ContentView_Previews : PreviewProvider {