Setup
bin/kafka-topics.sh \
--zookeeper zookeeper.example.com:2181 \
--create \| image: openjdk:11-jdk-slim | |
| definitions: | |
| caches: | |
| gradlewrapper: ~/.gradle/wrapper | |
| gke-kubectl-pipe: &pipe atlassian/google-gke-kubectl-run:1.3.1 | |
| gke-kubectl-pipe-variables: &pipe-variables | |
| KEY_FILE: $GKE_API_KEYFILE | |
| PROJECT: $GCP_PROJECT_ID | |
| COMPUTE_ZONE: $GKE_COMPUTE_ZONE |
| package pubsub | |
| import ( | |
| "context" | |
| "testing" | |
| "time" | |
| "cloud.google.com/go/pubsub" | |
| "cloud.google.com/go/pubsub/pstest" | |
| "google.golang.org/api/option" |
| #almost entirely based on the 02_text and 03_mpg examples provided by RStudio Shiny | |
| #all credit belongs to them | |
| if (!require(PerformanceAnalytics)) { | |
| stop("This app requires the PerformanceAnalytics package. To install it, run 'install.packages(\"PerformanceAnalytics\")'.\n") | |
| } | |
| if (!require(quantmod)) { | |
| stop("This app requires the quantmod package. To install it, run 'install.packages(\"quantmod\")'.\n") |
| // Promise.all is good for executing many promises at once | |
| Promise.all([ | |
| promise1, | |
| promise2 | |
| ]); | |
| // Promise.resolve is good for wrapping synchronous code | |
| Promise.resolve().then(function () { | |
| if (somethingIsNotRight()) { | |
| throw new Error("I will be rejected asynchronously!"); |
| --- | |
| # ^^^ YAML documents must begin with the document separator "---" | |
| # | |
| #### Example docblock, I like to put a descriptive comment at the top of my | |
| #### playbooks. | |
| # | |
| # Overview: Playbook to bootstrap a new host for configuration management. | |
| # Applies to: production | |
| # Description: | |
| # Ensures that a host is configured for management with Ansible. |
| /* | |
| PutCallFlag: Either "put" or "call" | |
| S: Stock Price | |
| X: Strike Price | |
| T: Time to expiration (in years) | |
| r: Risk-free rate | |
| v: Volatility | |
| This is the same one found in http://www.espenhaug.com/black_scholes.html | |
| but written with proper indentation and a === instead of == because it's |