-
Create a virtual environment called, e.g.,
my-env
:$ uv venv my-env
-
Install
ipykernel
into it:$ uv pip install -p my-env ipykernel
-
Register the kernel so it will show up in Jupyter:
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
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev | |
update_config=1 | |
country=GB | |
network={ | |
ssid="<Name of your wireless LAN>" | |
psk="<Password for your wireless LAN>" | |
} |
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
sudo nano /lib/systemd/system/custom-boot.service | |
``` | |
[Unit] | |
Description=Custom Boot Script Service | |
After=multi-user.target | |
[Service] | |
Type=idle | |
ExecStart=/bin/bash /home/pi/boot.sh |
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
apt-get update | |
apt-get install -y apt-transport-https ca-certificates | |
apt-key adv \ | |
--keyserver hkp://ha.pool.sks-keyservers.net:80 \ | |
--recv-keys 58118E89F3A912897C070ADBF76221572C52609D | |
echo "deb https://apt.dockerproject.org/repo ubuntu-xenial main" | sudo tee /etc/apt/sources.list.d/docker.list | |
apt-get update | |
apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual | |
apt-get install -y docker-engine |
- Make sure nothing exists already:
docker-compose down -v
- Create a blank DB in volume
data-1
, then start servicepg1
using it:docker-compose run --rm pg1-create-primary && docker-compose up pg1
- From another server, back up the
data-1
db intodata-2
, then runpg2
as a hot-standby:docker-compose run --rm pg2-create-standby && docker-compose up pg2
To detect all silences longer than a second:
TIMES=`/c/dev/bin/ffmpeg-20160425-git-9ac154d-win64-static/bin/ffmpeg.exe -i ~/Desktop/DW33\ -\ Going\ Postal/Going\ Postal\ 01\ -\ Terry\ Pratchett.mp3 -af silencedetect=noise=0.001:d=1 -f null - 2>&1 | grep -E '^\[silence.*start' | cut --delimiter=\ --fields=5 | tr '\n' ','
To split file at those times:
/c/dev/bin/ffmpeg-20160425-git-9ac154d-win64-static/bin/ffmpeg.exe -i ~/Desktop/DW33\ -\ Going\ Postal/Going\ Postal\ 01\ -\ Terry\ Pratchett.mp3 -acodec copy -f segment -segment_times ${TIMES::-1} thing-%03d.mp3 2>&1
After changing IP in router config:
sudo dhclient -r && sudo dhclient
List audio devices:
aplay -l
or
aplay -L
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
;; After connecting an nrepl client repl to an nrepl server, some | |
;; output will still appear on stdout from the server. | |
;; Try these snippets - they will both produce output on the nrepl server | |
;; Java libraries commonly do both these things. | |
(.println System/out "Hello stdout.") | |
(.start (Thread. #(println "Hello from a new thread."))) | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
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
;; Eval all this in the scratch buffer, then have a play with evaluating forms in a clojure buffer. | |
;; This is a very quick and dirty first version. | |
(setq thread-count 0) | |
(defun add-remote-thread () | |
(setq thread-count (+ 1 thread-count)) | |
(setq mode-name (format "Clojure{%d}" thread-count)) | |
(force-mode-line-update)) |
NewerOlder