Skip to content

Instantly share code, notes, and snippets.

@carsten-j
carsten-j / remoteState.tf
Last active January 7, 2019 19:58
Terraform backend storage account on Azure
# Configure the Azure Provider
provider "azurerm" {
version = "=1.20.0"
}
resource "azurerm_resource_group" "remotestate" {
name = "tfrs"
location = "West Europe"
}
@carsten-j
carsten-j / data.csv
Last active September 16, 2017 11:24
Datasæt til multipel regressionsanalyse
We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 1 column, instead of 4. in line 1.
år;prisindeks;byggeomkostninger;rente
1992;33,908948;74,6;9,7254
1993;31,318681;75,9;9,4345667
1994;37,519623;77,3;7,2313333
1995;36,263736;80,5;9,9658
1996;39,638932;82,4;8,5521667
1997;41,051805;84,6;7,8202667
1998;49,843014;86,8;6,7830769
1999;62,401884;91;6,0792308
2000;68,99529;91,3;7,4230769
#jSurfer surface description
#Fri Sep 04 18:40:40 CEST 2015
back_material_specular_intensity=0.5
camera_type=ORTHOGRAPHIC_CAMERA
surface_parameter_a=0.5
light_position_7=0.0 0.0 0.0
light_position_6=0.0 0.0 0.0
light_position_5=0.0 0.0 0.0
light_position_4=0.0 0.0 0.0
light_position_3=0.0 0.0 0.0
#jSurfer surface description
#Fri Sep 04 17:22:59 CEST 2015
back_material_specular_intensity=0.5
camera_type=ORTHOGRAPHIC_CAMERA
surface_parameter_a=0.5
light_position_7=0.0 0.0 0.0
light_position_6=0.0 0.0 0.0
light_position_5=0.0 0.0 0.0
light_position_4=0.0 0.0 0.0
light_position_3=0.0 0.0 0.0
#jSurfer surface description
#Thu Sep 03 22:23:43 CEST 2015
back_material_specular_intensity=0.5
camera_type=ORTHOGRAPHIC_CAMERA
surface_parameter_a=0.3100000023841858
light_position_7=0.0 0.0 0.0
light_position_6=0.0 0.0 0.0
light_position_5=0.0 0.0 0.0
light_position_4=0.0 0.0 0.0
light_position_3=0.0 0.0 0.0
@carsten-j
carsten-j / mandelzoom.fsx
Last active August 29, 2015 14:27
Mandelzoom complete
open System.Drawing
open System.Numerics
open System.Windows.Forms
// Absolute Square function for complex numbers
type System.Numerics.Complex with
member this.Length = this.Real * this.Real + this.Imaginary * this.Imaginary
// PART ONE: select any square region of the complex plane to be examined.
@carsten-j
carsten-j / mandelzoomAlt.fsx
Last active August 29, 2015 14:27
Alternative impl
let iterate c = Seq.unfold (fun z -> Some(z ** 2.0 + c, z ** 2.0 + c)) Complex.Zero
let countIterations startingPoint maxIterations =
iterate startingPoint
|> Seq.truncate maxIterations
|> Seq.takeWhile (fun z -> z.Magnitude < 2.0)
|> Seq.length
@carsten-j
carsten-j / mandelzoom.fsx
Last active August 29, 2015 14:27
MANDELZOOM
open System.Drawing
open System.Numerics
open System.Windows.Forms
// Absolute Square function for complex numbers
type System.Numerics.Complex with
member this.Length = this.Real * this.Real + this.Imaginary * this.Imaginary
// PART ONE: select any square region of the complex plane to be examined.
module TERM : sig
type t
val succ: t -> t
val init: unit -> t
val compare: t -> t -> int
end
module Term : TERM = struct
type t = int
with compare
@carsten-j
carsten-j / index.html
Created June 21, 2014 16:26
verdenskort2
<script src="http://d3js.org/d3.v3.min.js"></script>
<script src="http://d3js.org/topojson.v1.min.js"></script>
<script src="http://datamaps.github.io/scripts/datamaps.world.min.js?v=1"></script>
<div id="container"></div>
<script>
var basic_choropleth = new Datamap({
element: document.getElementById("container"),
projection: 'mercator',
fills: {