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 Base: TwicePrecision, significand_bits, significand_mask, exponent_mask, exponent_bias | |
# Bits of 1/2π | |
# 1/2π == sum(x / 0x1p64^i for i,x = enumerate(INV2PI)) | |
# Can be obtained by: | |
# | |
# setprecision(BigFloat, 4096) | |
# I = 0.5/big(pi) | |
# for i = 1:19 | |
# I *= 0x1p64 |
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
21089: find library=libpthread.so.0 [0]; searching | |
21089: search path=/central/software/nsight-systems/2023.2.1/target-linux-x64/tls/x86_64:/central/software/nsight-systems/2023.2.1/target-linux-x64/tls:/central/software/nsight-systems/2023.2.1/target-linux-x64/x86_64:/central/software/nsight-systems/2023.2.1/target-linux-x64 (RPATH from file nsys) | |
21089: trying file=/central/software/nsight-systems/2023.2.1/target-linux-x64/tls/x86_64/libpthread.so.0 | |
21089: trying file=/central/software/nsight-systems/2023.2.1/target-linux-x64/tls/libpthread.so.0 | |
21089: trying file=/central/software/nsight-systems/2023.2.1/target-linux-x64/x86_64/libpthread.so.0 | |
21089: trying file=/central/software/nsight-systems/2023.2.1/target-linux-x64/libpthread.so.0 | |
21089: search path=/central/software/julia/1.8.5/lib/tls/x86_64:/central/software/julia/1.8.5/lib/tls:/central/software/julia/1.8.5/lib/x86_64:/central/software/julia/1.8.5/lib:/central/slurm/install/current/lib/tls/x86_64:/centr |
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
using Distributions | |
import ForwardDiff: Dual, value, partials | |
@generated function get_values(a::NTuple{N}) where {N} | |
return ForwardDiff.tupexpr(i -> :(value(a[$i])),N) | |
end | |
ForwardDiff.value(p::ForwardDiff.Partials) = | |
ForwardDiff.Partials(get_values(p.values)) |
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
using SenseHat | |
function newblob(snake) | |
while true | |
x = rand(1:8) | |
y = rand(1:8) | |
if (x,y) ∉ snake | |
return (x,y) | |
end | |
end |
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
using LinearAlgebra | |
using SparseArrays | |
using DifferentialEquations | |
using DiffEqOperators | |
using BlockBandedMatrices | |
using DiffEqOperators | |
using RecursiveFactorization | |
mutable struct Single_Stack | |
L::Float64 |
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
This is 'u' (ASCII/Unicode U+0075) followed by Unicode Character 'COMBINING RIGHT ARROW ABOVE' (Unicode U+20D7): | |
u⃗ |
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
using Makie, GLMakie, GeometryBasics | |
function cubedshellwarp(a, b, c, R = max(abs(a), abs(b), abs(c))) | |
function f(sR, ξ, η) | |
X, Y = tan(π * ξ / 4), tan(π * η / 4) | |
x1 = sR / sqrt(X^2 + Y^2 + 1) | |
x2, x3 = X * x1, Y * x1 | |
x1, x2, x3 | |
end |
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
# This file is machine-generated - editing it directly is not advised | |
[[Adapt]] | |
deps = ["LinearAlgebra"] | |
git-tree-sha1 = "0fac443759fa829ed8066db6cf1077d888bb6573" | |
uuid = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" | |
version = "2.0.2" | |
[[Base64]] | |
uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" |
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
# This file is machine-generated - editing it directly is not advised | |
[[Base64]] | |
uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" | |
[[CompilerSupportLibraries_jll]] | |
deps = ["Libdl", "Pkg"] | |
git-tree-sha1 = "7c4f882c41faa72118841185afc58a2eb00ef612" | |
uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" | |
version = "0.3.3+0" |
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
module Tendencies | |
abstract type Term end | |
# rows: equations of each variable | |
abstract type PrognosticQuantity <: Term end | |
struct Mass <: PrognosticQuantity end | |
struct Momentum <: PrognosticQuantity end |
NewerOlder