Revision: 06.08.2023, https://compute.toys/view/407
fn sdSphere(p: vec3f, r: f32) -> f32 {
return length(p) - r;
}Revision: 06.08.2023, https://compute.toys/view/407
fn sdSphere(p: vec3f, r: f32) -> f32 {
return length(p) - r;
}| #!/bin/bash | |
| # | |
| # Container source: https://github.com/OpenAccess-AI-Collective/axolotl/blob/main/docker/Dockerfile-runpod | |
| # | |
| # | |
| # To run this in RunPod with `winglian/axolotl-runpod:main-cu118-2.0.0`, set | |
| # Expose HTTP Ports (Max 10): 7860,8888 | |
| # docker command: `bash -c "curl -H 'Cache-Control: no-cache' https://raw.githubusercontent.com/utensil/llm-playground/main/scripts/entry/prepare_ax.sh -sSf | bash"` | |
| # JUPYTER_PASSWORD change to your secret | |
| # HUGGINGFACE_TOKEN change to your token from https://huggingface.co/settings/tokens |
| import Mathlib | |
| open Lean Meta Elab Command | |
| -- generalized | |
| /-- Write an import graph, represented as a an array of `NameMap`s to the ".dot" graph format. | |
| If `("style1", graph1)` is in `graphs`, then the edges in `graph1` will be labeled with `[style1]`. | |
| Example: `asStyledDotGraph #[("", graph1), ("style=dashed", graph2)]` -/ | |
| def asStyledDotGraph [ForIn Id α Name] (graphs : Array (String × NameMap α)) | |
| (header := "import_graph") : String := Id.run do |
| /- | |
| The original problem is incorrect. Instead, we prove that the statement is true | |
| if and only if either A or B is the universe | |
| -/ | |
| example (h0 : X ⊆ A) (h1 : Y ⊆ B) : | |
| A = Set.univ ∨ B = Set.univ ↔ (X ×ˢ Y)ᶜ = A ×ˢ Yᶜ ∪ Xᶜ ×ˢ B := by | |
| apply Iff.intro | |
| { | |
| intro h2 | |
| rw [Set.compl_prod_eq_union, Set.union_comm] |
| import Mathlib.LinearAlgebra.CliffordAlgebra.Contraction | |
| import Mathlib.LinearAlgebra.ExteriorAlgebra.Grading | |
| set_option pp.proofs.withType false | |
| variable {R M} [CommRing R] [Invertible (2 : R)] [AddCommGroup M] [Module R M] (Q : QuadraticForm R M) | |
| abbrev ExteriorAlgebra.rMultivector (r : ℕ) : Submodule R (ExteriorAlgebra R M) := | |
| (LinearMap.range (ExteriorAlgebra.ι R : M →ₗ[R] _) ^ r) |
| // Modded from from https://gist.github.com/karlseguin/c6bea5b35e4e8d26af6f81c22cb5d76b | |
| // in your build.zig, you can specify a custom test runner: | |
| // const tests = b.addTest(.{ | |
| // .target = target, | |
| // .optimize = optimize, | |
| // .test_runner = .{ .path = b.path("test_runner.zig"), .mode = .simple }, // add this line | |
| // .root_source_file = b.path("src/main.zig"), | |
| // }); | |
| // |
| #!/usr/bin/env python | |
| """Get images from PhotoPrism and label them.""" | |
| import json | |
| import logging | |
| import tempfile | |
| import time | |
| from pprint import pformat | |
| import boto3 |
| /* | |
| Based on the Anti-aliased Euclidean distance transform described by Stefan Gustavson and | |
| Robin Strand. For further information, see https://contourtextures.wikidot.com/ and | |
| https://web.archive.org/web/20220503051209/https://weber.itn.liu.se/~stegu/edtaa/ | |
| The algorithm is an adapted version of Stefan Gustavson's code, it inherits the copyright | |
| statement below, which applies to this file only. | |
| The rewrite with Unity Burst support makes the execution 40 times faster by default, | |
| and 75 times faster if the passed in textures are both of type TextureFormat.RGBAFloat. |