Skip to content

Instantly share code, notes, and snippets.

View tsoontornwutikul's full-sized avatar

Thanachai Soontornwutikul tsoontornwutikul

View GitHub Profile
@tsoontornwutikul
tsoontornwutikul / 00-cloud-config.yml
Created October 25, 2019 10:39 — forked from janeczku/00-cloud-config.yml
Annotated RancherOS Cloud-init configuration snippets
#cloud-config
# Set the hostname for this machine (takes precedence over hostname assigned by DHCP lease).
hostname: myhost
# Authorize SSH keys for the `rancher` sudoer user
ssh_authorized_keys:
- ssh-rsa AAA...ZZZ example1@rancher

AIND Warmup Problems

Wheel of Chance

Wheel of Chance

In this game of chance, we have a wheel divided into 8 equal sectors or pie slices. 4 of them are marked $200, 3 are $500 and 1 is $1000.

It costs you $100 to place a bet on any one of the unique numbers on the wheel, and spin once. If the wheel stops with the arrow pointing at the number you chose, you win that amount plus your $100 back, otherwise you lose your bet.

@tsoontornwutikul
tsoontornwutikul / min-char-rnn.py
Created October 7, 2015 08:32 — forked from karpathy/min-char-rnn.py
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)