文字列の先頭に s をつけると Scala の string interpolation が実行される。 Gatling の EL は単なるマクロ置換なので、ELを使う場合は文字列の先頭に s はつけない。
例)
- s"Hello, ${name}" => 変数 name の値が展開される(string interporation; Scala)
- "Hello, ${name}" => セッションの name の値が展開される(EL; Gatling DSL)
#!/bin/bash | |
profile=$1 | |
tmp_dir=~/bin | |
elb_tmp=$tmp_dir/elb.tmp | |
alb_tmp=$tmp_dir/alb.tmp | |
elb_tag_tmp=$tmp_dir/elb_tag.tmp | |
alb_tag_tmp=$tmp_dir/alb_tag.tmp | |
export AWS_DEFAULT_PROFILE=$profile |
#!/usr/local/bin/awk -f | |
BEGIN { | |
s = 0 | |
} | |
{ | |
a = $1 | |
s = s + a | |
} |
# ============= | |
# UnionFind tree | |
# ============= | |
class UnionFindTree(): | |
def __init__(self, N): | |
self.parent = [i for i in range(N)] | |
self.rank = [0 for _ in range(N)] | |
def root(self, x): | |
if x == self.parent[x]: |
公式ドキュメントには miniforge でインストールするように案内されている。
https://scikit-learn.org/stable/install.html#installing-on-apple-silicon-m1-hardware
しかし、StackOverflowで紹介されている以下の方法でもインストールすることができた。
$ brew install openblas
$ export OPENBLAS=$(/opt/homebrew/bin/brew --prefix openblas)
$ export CFLAGS="-falign-functions=8 ${CFLAGS}"
class Base64: | |
import string | |
import binascii | |
def __init__(self): | |
b64chars = ( | |
string.ascii_uppercase + string.ascii_lowercase + string.digits + "+/" | |
) | |
self.c2i = {c: i for i, c in enumerate(b64chars)} | |
self.c2i["="] = 0 |