https://medium.com/airbnb-engineering/enzyme-javascript-testing-utilities-for-react-a417e5e5090f
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
FROM r-base | |
# Install some libraries that we need for the R packages we use | |
# with git we can use install_github("foo/bar") from R | |
RUN apt-get update && \ | |
apt-get install -y git libssl-dev libssh2-1-dev libcurl4-openssl-dev | |
COPY . /usr/local/src/myscripts | |
WORKDIR /usr/local/src/myscripts |
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
#!/bin/sh | |
# Set the AWS environment variables for an AWS profile | |
# Useful for docker-machine | |
# | |
# Example: | |
# | |
# aws_env profile-for-testing | |
# | |
# Further information: | |
# See the AWS CLI `aws configure` |
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
(comment | |
(defproject importer "0.1.0-SNAPSHOT" | |
:description "FIXME: write description" | |
:url "http://example.com/FIXME" | |
:license {:name "Eclipse Public License" | |
:url "http://www.eclipse.org/legal/epl-v10.html"} | |
:dependencies [[org.clojure/clojure "1.8.0"] | |
[org.clojure/data.csv "0.1.3"] | |
[dk.ative/docjure "1.10.0"]] |
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
FROM r-base:latest | |
COPY . /usr/local/src/myscripts | |
WORKDIR /usr/local/src/myscripts | |
CMD ["Rscript", "myscript.R"] |
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
// paket add nuget NEST | |
#I "../../packages" | |
#r "Elasticsearch.Net/lib/net46/Elasticsearch.Net.dll" | |
#r "NEST/lib/net46/Nest.dll" | |
open System | |
//open Elasticsearch.Net | |
open Nest |
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
// F# Quoted Expressions | |
open Microsoft.FSharp.Quotations | |
open Microsoft.FSharp.Quotations.Patterns | |
open Microsoft.FSharp.Quotations.DerivedPatterns | |
// A typed code quotation. | |
let expr : Expr<int> = <@ 1 + 1 @> | |
// An untyped code quotation. |
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
// F# FizzBuzz using Active Patterns | |
let (|DivisibleBy|_|) by n = | |
match n%by with | |
| 0 -> Some DivisibleBy | |
| _ -> None | |
let fizzbuzz = function | |
| DivisibleBy 3 & DivisibleBy 5 -> "FizzBuzz" | |
| DivisibleBy 3 -> "Fizz" |
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
#I "./packages" | |
#r "FParsec/lib/net40-client/FParsec.dll" | |
#r "FParsec/lib/net40-client/FParsecCS.dll" | |
#r "Aether/lib/net35/Aether.dll" | |
#r "Chiron/lib/net40/Chiron.dll" | |
#r "System.Runtime.Serialization" | |
open Chiron |
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
// World Bank data example | |
// Look up some indicators for the Nordic markets | |
#r @"..\packages\FSharp.Data.2.2.5\lib\net40\FSharp.Data.dll" | |
open FSharp.Data | |
let wb= WorldBankData.GetDataContext() | |
let countries = [ | |
wb.Countries.Denmark |