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
function concat_and_crop(mx::AbstractArray{T,4}, x::AbstractArray{T,4}) where T | |
w, h = size(x) | |
mw, mh = size(mx) | |
rx = (1:mw) .+ ((w - mw) ÷ 2) | |
ry = (1:mh) .+ ((h - mh) ÷ 2) | |
return cat(x[rx, ry, :, :], mx, dims = 3) | |
end | |
create_model_2d_classes() = Chain( | |
BatchNorm(1), |
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
<?php | |
final class User | |
{ | |
private $name; | |
public function __construct(string $name) | |
{ | |
$this->name = $name; | |
} |
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
$ python test.py 20 https://mirror.spack.io/_source-cache/archive/00/0081ee4c4242e635a8113b32f655910ada057c59043f29af4b613508a762f3ac.tar.gz | |
Fetching mirror.spack.io/_source-cache/archive/00/0081ee4c4242e635a8113b32f655910ada057c59043f29af4b613508a762f3ac.tar.gz 20 times | |
http client 13.58 ms/request 1.48 MB/s | |
urllib 48.35 ms/request 0.42 MB/s |
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
#!/bin/sh | |
pipeline="$1" | |
[ -z "$pipeline" ] && echo "Usage: $0 <pipeline-id>" && exit 1 | |
project=2 | |
url="https://gitlab.spack.io/api/v4/projects/$project" | |
# Get the bridges, shouldn't be paginated |
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
FROM alpine | |
WORKDIR /root | |
ENV PATH="/root/spack/bin:$PATH" SPACK_COLOR=always | |
# Setup spack and its deps | |
RUN apk add gcc g++ gfortran make file tar curl python3 patch unzip gnupg git xz python3-dev py3-pip linux-headers && \ | |
pip install clingo |
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
all: exef1 exef2 exef3 | |
EI_OSABI:=7 | |
EI_ABIVERSION:=8 | |
EI_PAD:=9 | |
libf1.so: | |
echo 'int f(){ return 1; }' | $(CC) -o $@ -shared -Wl,-soname,$@ -x c - | |
printf '\x0B' | dd of=$@ bs=1 seek=$(EI_OSABI) count=1 conv=notrunc status=none |
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
FROM ubuntu:18.04 AS builder | |
SHELL ["/bin/bash", "-c"] | |
WORKDIR /development | |
RUN apt-get update && apt-get install --no-install-recommends -y \ | |
build-essential \ | |
curl \ | |
file \ |
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
diff --git a/lib/spack/env/cc b/lib/spack/env/cc | |
index 4d8c4644cb..3c4dcb35a7 100755 | |
--- a/lib/spack/env/cc | |
+++ b/lib/spack/env/cc | |
@@ -384,6 +384,13 @@ while [ $# -ne 0 ]; do | |
other_args+=("$1") | |
fi | |
;; | |
+ -O0,-O1,-O2,-O3,-Os,-Ofast,-O) | |
+ # Always use -O3 |
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
vmovups ymm0, ymmword ptr [rsi] | |
vmovups ymm1, ymmword ptr [rsi + 32] | |
vmovups ymm2, ymmword ptr [rsi + 64] | |
vmovups ymm6, ymmword ptr [rsi + 96] | |
vmovups ymm7, ymmword ptr [rsi + 128] | |
movabs rcx, offset .rodata.cst32 | |
mov rax, rdi | |
vmovaps ymm10, ymmword ptr [rcx] | |
vperm2f128 ymm3, ymm0, ymm1, 33 # ymm3 = ymm0[2,3],ymm1[0,1] | |
vperm2f128 ymm5, ymm1, ymm2, 33 # ymm5 = ymm1[2,3],ymm2[0,1] |
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 Test | |
function generate_real_H_with_imaginary_eigs(n, T::Type = Float64) | |
while true | |
H = triu(rand(T, n + 1, n), -1) | |
λs = sort!(eigvals(view(H, 1 : n, 1 : n)), by = abs) | |
for i = 1 : n | |
μ = λs[i] |
NewerOlder