Skip to content

Instantly share code, notes, and snippets.

@AbdouSeck
AbdouSeck / playground.rs
Created April 24, 2020 03:40 — forked from rust-play/playground.rs
Code shared from the Rust Playground
fn main() {
let mut arr = [12, 8, 10, 3, 5, 10, 45];
if let Some(elem) = arr.get(10) {
println!("Element requested: {}.", elem);
} else {
println!(
"Element at index {} could not be found in an array of size {}.",
10,
arr.len()
);

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

import numpy as np
def cartesian(arrays, out=None):
"""
Generate a cartesian product of input arrays.
Parameters
----------
arrays : list of array-like
1-D arrays to form the cartesian product of.