aws ec2 request-spot-instances --spot-price "0.20" --instance-count 1 --type "one-time" --launch-specification file://spot_instance.json
{
"ImageId": "ami-16db8576",
"KeyName": "aws-eb",
"SecurityGroupIds": ["sg-d1e78ab6"],
"InstanceType": "g2.2xlarge",
"Placement": {
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 Lean.Elab.Tactic | |
def findLeast (a : Array Nat) : Nat := do | |
let mut smallest := a[0] | |
for i in [1:a.size] do | |
if a[i] ≤ smallest then | |
smallest := a[i] | |
return smallest | |
#eval findLeast #[8, 3, 10, 4, 6] |
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
module Adamopt | |
# This is a module implementing vanilla Adam (https://arxiv.org/abs/1412.6980). | |
export Adam, step! | |
# Struct containing all necessary info | |
mutable struct Adam | |
theta::AbstractArray{Float64} # Parameter array | |
loss::Function # Loss function | |
grad::Function # Gradient function |
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 os | |
import ipywidgets as widgets | |
class FileBrowser(object): | |
def __init__(self): | |
self.path = os.getcwd() | |
self._update_files() | |
Roll your own iPython Notebook server with Amazon Web Services (EC2) using their Free Tier.
This is a summary of the "Learn You A Haskell" online book under http://learnyouahaskell.com/chapters.
- Haskell is a functional programming language.