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
import secrets | |
from itertools import chain | |
NUM_TOYS = 10 | |
NUM_TRIALS = 10000 | |
def pick_toy(toys_set): | |
return secrets.choice(list(toys_set)) |
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
import random | |
import string | |
NUM_CHARS = 7 | |
# pick types are "random", "first", and "last" | |
PICK_TYPE = "last" | |
# options are "allowed", "required", and "none" | |
UPPER_CASE = "required" |
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
// Uses Consumer API for media keys: https://github.com/NicoHood/HID/wiki/Consumer-API | |
#include <HID-Project.h> | |
const int mutePin = 5; | |
const int prevPin = 15; | |
const int playPin = 14; | |
const int nextPin = 16; | |
const uint64_t debounce_delay = 5; |
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
use std::ops; | |
use std::f32; | |
use std::rc::Rc; | |
extern crate rand; | |
use rand::random; | |
#[derive(Copy, Clone)] | |
struct Vec3D {x:f32, y:f32, z:f32} | |
impl Vec3D { |