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
_ | |
_ _ _(_)_ | Documentation: https://docs.julialang.org | |
(_) | (_) (_) | | |
_ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help. | |
| | | | | | |/ _` | | | |
| | |_| | | | (_| | | Version 1.9.3 (2023-08-24) | |
_/ |\__'_|_|_|\__'_| | Official https://julialang.org/ release | |
|__/ | | |
julia> using KernelAbstractions |
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 Random: rand! | |
using LoopVectorization: @turbo | |
function test_fct(vec_, r1, r2) | |
xx = vec_ | |
rand!(r1) | |
rand!(r2) | |
for j in 1:11 | |
@turbo for i in eachindex(xx, r1, r2) | |
xx[i] = xx[i] < r1[i] ? r2[i] : xx[i] |
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
(defun line | |
(observations | |
&key (n-particles 100) (steps 100) | |
(jitter-scales '(0.01d0 0.35d0 1.0d0))) | |
"Linear relationship between X and Y with Gaussian noise of constant scale: | |
y ~ m*x + c + N(0,σ) | |
Infers parameters M (gradient), C (intercept), and σ (standard deviation.)" | |
(let ((#:m (init-parameter-vector n-particles -10.0d0 10.0d0)) | |
(#:c (init-parameter-vector n-particles -10.0d0 10.0d0)) | |
(#:σ (init-parameter-vector n-particles 1.1102230246251568d-16 5.0d0))) |
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
{ | |
description = "NuddyCAD"; | |
inputs.nixpkgs.url = "nixpkgs"; | |
inputs.nix-cl.url = "github:lukego/nix-cl/trial"; | |
outputs = { self, nixpkgs, nix-cl }: | |
let | |
pkgs = nixpkgs.legacyPackages.x86_64-linux; | |
sbcl = nix-cl.packages.x86_64-linux.sbcl.withPackages (ps: | |
with ps; [ | |
# Generic |
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
#!/usr/bin/env -S awk -f | |
/BUILD FAILED: Error while trying to load definition for system/ { print("load-definition-for-system"); next } | |
/BUILD FAILED: Filesystem error with pathname/ { print("filesystem-error-with-pathname"); next } | |
/BUILD FAILED: Implementation not supported./ { print("implementation-not-supported"); next } | |
/BUILD FAILED: Java exception/ { print("java-exception"); next } | |
/BUILD FAILED: No specification defined for current paltform/ { print("no-specification"); next } | |
/BUILD FAILED: Permission denied/ { print("permission-denied"); next } | |
/BUILD FAILED: Subprocess/ { print("subprocess"); next } | |
/BUILD FAILED: Unable to determine Python include directory/ { print("python"); next } |
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
(defpackage :nixpkgs-lisp-survey | |
(:nicknames :survey) | |
(:use :common-lisp :alexandria :serapeum)) | |
(in-package :nixpkgs-lisp-survey) | |
;;;; Conditions | |
(define-condition build-error (error) | |
((transcript :initarg :transcript :accessor transcript))) | |
(define-condition library-load-error (build-error) |
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
#!/usr/bin/env bash | |
# Installs NixOS on a Hetzner server, wiping the server. | |
# | |
# This is for a specific server configuration; adjust where needed. | |
# | |
# When the script is done, make sure to boot the server from HD, not rescue mode again. | |
# Explanations: | |
# |
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
;; Output after running with d30a/d30b removed i.e. one less domino. | |
;; Cleaned up slightly (whitespace and variable ordering) | |
sat | |
( | |
(define-fun d0a () Int 2) | |
(define-fun d0b () Int 3) | |
(define-fun d1a () Int 4) | |
(define-fun d1b () Int 5) | |
(define-fun d2a () Int 6) | |
(define-fun d2b () Int 7) |
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
[luke@snowy:~/git/nixpkgs-lisp]$ nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD" | |
this path will be fetched (0.03 MiB download, 0.13 MiB unpacked): | |
/nix/store/q96f9vhis0xk06giw304f9r7hjasxrkw-nixpkgs-review-2.6.4 | |
copying path '/nix/store/q96f9vhis0xk06giw304f9r7hjasxrkw-nixpkgs-review-2.6.4' from 'https://cache.nixos.org'... | |
$ git -c fetch.prune=false fetch --no-tags --force https://github.com/NixOS/nixpkgs master:refs/nixpkgs-review/0 | |
remote: Enumerating objects: 2926, done. | |
remote: Counting objects: 100% (1511/1511), done. | |
remote: Compressing objects: 100% (48/48), done. | |
remote: Total 2926 (delta 1471), reused 1495 (delta 1462), pack-reused 1415 | |
Receiving objects: 100% (2926/2926), 10.42 MiB | 3.12 MiB/s, done. |
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
{ stdenv | |
, lib | |
, cacert | |
, curl | |
, runCommandLocal | |
, targetPlatform | |
, unzip | |
, appimage-run | |
, addOpenGLRunpath | |
, libGLU |
NewerOlder