Install compiler dependencies
brew install automake autoconf libtool libxml2 pkg-config
brew link libxml2
Build libspatialite
# /tmp/test = EBS-SSD | |
# /mnt/test = instance-store | |
root@ip-10-0-2-6:~# dd bs=1M count=256 if=/dev/zero of=/tmp/test | |
256+0 records in | |
256+0 records out | |
268435456 bytes (268 MB) copied, 3.26957 s, 82.1 MB/s | |
root@ip-10-0-2-6:~# dd bs=1M count=256 if=/dev/zero of=/tmp/test | |
256+0 records in | |
256+0 records out |
(defn parse-params | |
"Parse URL parameters into a hashmap" | |
[] | |
(let [param-strs (-> (.-location js/window) (split #"\?") last (split #"\&"))] | |
(into {} (for [[k v] (map #(split % #"=") param-strs)] | |
[(keyword k) v])))) |
# -*- coding: utf-8 -*- | |
# Copyright (C) 2016, Maximilian Köhl <[email protected]> | |
""" | |
Python interface to the ModelSim simulator. The simulator is instrumented using FIFO pipes | |
such that it becomes fully controllable from within Python using TCL commands. | |
""" | |
import contextlib |
""" | |
A bare bones examples of optimizing a black-box function (f) using | |
Natural Evolution Strategies (NES), where the parameter distribution is a | |
gaussian of fixed standard deviation. | |
""" | |
import numpy as np | |
np.random.seed(0) | |
# the function we want to optimize |
When the shared files on Google Drive is downloaded, it is necessary to change the download method by the file size. The boundary of file size when the method is changed is about 40MB.
filename="### filename ###"
fileid="### file ID ###"
curl -L -o ${filename} "https://drive.google.com/uc?export=download&id=${fileid}"
#!/bin/bash | |
diff=$(cargo fmt -- --check) | |
result=$? | |
if [[ ${result} -ne 0 ]] ; then | |
cat <<\EOF | |
There are some code style issues, run `cargo fmt` first. | |
EOF | |
exit 1 |
/- Zulip thread: https://leanprover.zulipchat.com/#narrow/stream/113489-new-members/topic/Generalization.20of.20map_diff/near/280148939 -/ | |
import data.multiset.basic | |
/- The stronger version `list.map_diff_sublist` doesn't hold; here is a counterexample. -/ | |
def l₁ := [0,1,2] | |
def l₂ := [2] | |
def f : ℕ → ℕ | 1 := 1 | _ := 0 | |
#eval (l₁.map f).diff (l₂.map f) /- [1, 0] -/ |