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
// based on https://github.com/pheymann/investment-library | |
// to execute follow: https://github.com/pheymann/investment-library#how-to-install-and-use-it-with-a-docker-based-setup | |
/* Result: 50,000 EUR capital and 40 years runtime (ignoring dividends for now) | |
* - lump sum investment at the beginning leads to: 274383.125EUR | |
* - continues investment over 40 years leads to: 130788.584EUR | |
* - spread investment over the first 5 years leads to: 250692.769EUR | |
* | |
* Assumption: flat 25% capital gains tax. | |
*/ |
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 scala.io.Source | |
import scala.concurrent.{Await, ExecutionContext, Future} | |
import scala.concurrent.duration._ | |
import scala.collection.immutable.BitSet | |
import scala.util.Random | |
object Main { | |
sealed trait Ingredient | |
case object Mushroom extends Ingredient |
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
(require 'package) | |
(add-to-list 'package-archives '("melpa-stable" . "http://stable.melpa.org/packages/") t) | |
(add-to-list 'package-archives '("melpa" . "http://melpa.milkbox.net/packages/")) | |
(add-to-list 'package-archives '("marmalade" . "http://marmalade.ferrier.me.uk/packages/")) | |
(add-to-list 'package-archives '("gnu" . "http://elpa.gnu.org/packages/")) | |
(package-initialize) | |
(unless (package-installed-p 'use-package) | |
(package-refresh-contents) | |
(package-install 'use-package)) |
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 shapeless._ | |
import shapeless.labelled.FieldType | |
import shapeless.record._ | |
trait GenericDiff[H <: HList] { | |
// syntactic sugar | |
type HI = H | |
// compares field values and returns the field name with values if they differ |
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
language: generic | |
os: linux | |
sudo: required | |
services: | |
- docker | |
script: |