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
VStack(alignment: .leading) {
Text("Hello World")
.font(.largeTitle)
.bold()
Text("This is my test app.")
}
.offset(x: stackLocation.x, y: stackLocation.y)
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
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.")
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)
import Foundation
extension String {
func paddedZeros(length: Int) -> String {
if count == length {
return self
}
return ([Character](repeating: "0", count: length - count) + Array(self)).map({ String($0) }).joined()
}
}
; ModuleID = '/tmp/webcompile/_8542_0.bc'
source_filename = "/tmp/webcompile/_8542_0.cc"
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-ellcc-linux"
; Function Attrs: noinline nounwind optnone
define i32 @_Z5toIntf(float) #0 {
%2 = alloca float, align 4
store float %0, float* %2, align 4
%3 = load float, float* %2, align 4
"BMK_benchCLevel" -> ""
"BMK_benchCLevel" -> "LZ4_XXH64"
"BMK_benchCLevel" -> "LZ4_compressBound"
"BMK_benchCLevel" -> "LZ4_decompress_safe"
"BMK_benchCLevel" -> "RDG_genBuffer"
"BMK_benchCLevel" -> "__assert_fail"
"BMK_benchCLevel" -> "clock_gettime"
"BMK_benchCLevel" -> "exit"
"BMK_benchCLevel" -> "fprintf"
"BMK_benchCLevel" -> "fputc"
This file has been truncated, but you can view the full file.
"BaseException_clear" -> "_Py_Dealloc"
"BaseException_clear" -> "llvm.dbg.value"
"BaseException_dealloc" -> ""
"BaseException_dealloc" -> "BaseException_clear"
"BaseException_dealloc" -> "llvm.dbg.value"
"BaseException_get_args" -> "llvm.dbg.value"
"BaseException_get_cause" -> "llvm.dbg.value"
"BaseException_get_context" -> "llvm.dbg.value"
"BaseException_get_tb" -> "llvm.dbg.value"
"BaseException_init" -> "_PyArg_NoKeywords"
This file has been truncated, but you can view the full file.
"Balloc" -> "llvm.dbg.value"
"Balloc" -> "malloc"
"FTB_WORD_cmp" -> "llvm.dbg.value"
"FTB_WORD_cmp.37624" -> "llvm.dbg.value"
"FTB_WORD_cmp_list" -> "llvm.dbg.value"
"FTB_WORD_cmp_list.37625" -> "llvm.dbg.value"
"FT_DOC_cmp" -> "llvm.dbg.value"
"FT_DOC_cmp.37650" -> "llvm.dbg.value"
"FT_STOPWORD_cmp" -> "llvm.dbg.value"
"FT_STOPWORD_free" -> "llvm.dbg.value"