(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
# 0 is too far from ` ;) | |
set -g base-index 1 | |
# Automatically set window title | |
set-window-option -g automatic-rename on | |
set-option -g set-titles on | |
#set -g default-terminal screen-256color | |
set -g status-keys vi | |
set -g history-limit 10000 |
let taxOf salary taxRates = | |
((0m,0)::taxRates, taxRates) | |
||> Seq.zip | |
|> Seq.map(fun ((_, prevBand),(rate, band)) -> (prevBand, rate, band)) | |
|> Seq.sumBy(fun (prevBand, rate, band) -> | |
match salary with | |
| x when x < prevBand -> 0m | |
| x when x > band -> decimal(band - prevBand) * rate | |
| x -> decimal(x - prevBand) * rate | |
) |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
from struct import unpack | |
from cStringIO import StringIO | |
class SAPath(): | |
def __init__(self, node): | |
self.path = StringIO(open(node, "rb").read()) | |
self.header = {} | |
self.pathnodes = [] | |
self.navinodes = [] | |
self.links = [] |
# Script to geocode many items | |
# Modified by J Emory Parker | |
# Aug 25 2016 | |
# Based on script originally by Shane Lynn | |
# http://www.shanelynn.ie/massive-geocoding-with-r-and-google-maps/ | |
#load up the ggmap library | |
library(ggmap) | |
# get the input data |
This document provides a rapid-fire overview of Kubernetes concepts, vocabulary, and operations. The target audience is anyone who runs applications in a cloud environment today, and who wants to understand the basic mechanics of a Kubernetes cluster. The goal is that within 10 minutes, managers who read this should be able to listen in on a Kubernetes conversation and follow along at a high level, and engineers should be ready to deploy a sample app to a toy cluster of their own.
This orientation doc was written because the official Kubernetes docs are a great reference, but they present a small cliff to climb for newcomers.
If you want to understand why you should consider running Kubernetes, see the official Kubernetes conceptual overview document. This document is intended to complement that one, but one layer deeper.
For a deep dive, see [Kubernetes concepts](https://kubernetes.io/docs/co
Original document can be found here; written by Mike Schuette.
This document provides a rapid-fire overview of Kubernetes concepts, vocabulary, and operations. The target audience is anyone who runs applications in a cloud environment today, and who wants to understand the basic mechanics of a Kubernetes cluster. The goal is that within 10 minutes, managers who read this should be able to listen in on a Kubernetes conversation and follow along at a high level, and engineers should be ready to deploy a sample app to a toy cluster of their own.
This orientation doc was written because the official Kubernetes docs are a great reference, but they present a small cliff to climb for newcomers.
If you want to understand why you should consider running Kubernetes, see the official Kubernetes conceptual overview document. This doc
module Program = | |
type InMemoryDb(replica: ReplicaId) = | |
let snapshot = ref null | |
let mutable events : Map<uint64,obj> = Map.empty | |
interface Db with | |
member _.SaveSnapshot state = async { snapshot := (box state) } | |
member _.LoadSnapshot<'s>() = async { | |
match !snapshot with |
open System | |
[<Struct>] type Effect<'env, 'out> = Effect of ('env -> Async<'out>) | |
[<RequireQualifiedAccess>] | |
module Effect = | |
/// Create value with no dependency requirements. | |
let inline value (x: 'out): Effect<'env,'out> = Effect (fun _ -> async.Return x) | |
/// Create value which uses depenendency. |