Skip to content

Instantly share code, notes, and snippets.

View j-medland's full-sized avatar

John Medland j-medland

  • Control Software Solutions
  • Manchester, UK
  • X @j_medland
View GitHub Profile
@j-medland
j-medland / ch08-03-hash-maps.rs
Last active January 18, 2023 15:28
Rust-By-Example Exercises
// https://rust-book.cs.brown.edu/ch08-03-hash-maps.html
// Summary Exercise Part 1
// Given a list of integers, use a vector and return the median (when sorted, the value in the middle position)
// and mode (the value that occurs most often; a hash map will be helpful here) of the list.
use std::collections::HashMap;
fn main() {
// let input :Vec<i32>= Vec::new();
let input = vec![2, 1, 1, 4, 5, 5, 6, 7];
image_width: 640
image_height: 480
camera_name: usb_cam
camera_matrix:
rows: 3
cols: 3
data: [536.5713701935, 0. , 315.0555172451,
0. , 537.7138835637, 241.0382730485,
0. , 0. , 1. ]
distortion_model: plumb_bob
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This snippet allows for the rotation and translation vectors between two sets of three-dimensional points to be estimated.
We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 3 columns, instead of 2. in line 1.
PROCESSOR,ARCHITECTURE,IGNORED
77B1,ARM-FlexRIO
77B2,ARM-FlexRIO
77AC,ARM-FlexRIO
762F,ARM-cRIO-myRIO
76D3,ARM-cRIO-myRIO
76F2,ARM-cRIO-roboRIO
7AAE,ARM-cRIO-roboRIO
7740,ARM-cRIO-4-slot
7741,ARM-cRIO-4-slot
@j-medland
j-medland / commands.txt
Last active September 17, 2021 18:03
surf browser on NIRT Linux
# shh as admin into the CRio and execute:
opkg update
opkg install pkgconfig gtk+-dev webkitgtk-dev
wget https://dl.suckless.org/surf/surf-2.0.tar.gz
tar -xvzf surf-2.0.tar.gz
cd surf-2.0
make clean install
# then on the CRio