This file contains hidden or 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
for i in 0..vec_of_ts_cameras.len() { | |
for j in (i + 1)..vec_of_ts_cameras.len() { | |
// First, let's calculate the average speed between two observations | |
let average_speed = calculate_average_speed( | |
&vec_of_ts_cameras[i], | |
&vec_of_ts_cameras[j], | |
plate_road, | |
) | |
.await | |
.expect("Failed to calculate average speed"); |
This file contains hidden or 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
for node in node1 node2 node3;do | |
echo launching $node | |
multipass launch -n $node -m 2G | |
echo install k8s | |
multipass exec $node -- bash -c "sudo snap install microk8s --classic" | |
multipass exec $node -- bash -c "sudo usermod -a -G microk8s ubuntu" | |
multipass exec $node -- bash -c "sudo chown -f -R ubuntu ~/.kube" | |
done | |
for node in node2 node3; do |
This file contains hidden or 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
for node in node1 node2 node3;do | |
echo launching $node | |
multipass launch -n $node | |
done | |
# Init cluster on node1 | |
echo init cluster | |
multipass exec node1 -- bash -c "curl -sfL https://get.k3s.io | sh -" | |
# Get node1's IP |
This file contains hidden or 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/bash | |
set -e | |
REPO_NAME=$1 | |
ECR_URL=31415926.dkr.ecr.us-east-1.amazonaws.com | |
if [ $# -ne 1 ]; then | |
echo $0: usage: $0 REPO_NAME | |
exit 1 | |
fi | |
eval $(aws ecr get-login --region us-east-1 --no-include-email | sed 's|https://||') | |
docker build -t "$REPO_NAME" . |
This file contains hidden or 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
{ | |
"StreamDescription": { | |
"KeyId": null, | |
"EncryptionType": "NONE", | |
"StreamStatus": "ACTIVE", | |
"StreamName": "VPCFlowLogs", | |
"Shards": [ | |
{ | |
"ShardId": "shardId-000000000000", | |
"HashKeyRange": { |