Skip to content

Instantly share code, notes, and snippets.

View dhadka's full-sized avatar

David Hadka dhadka

  • Microsoft, GitHub
  • Fort Collins, CO
View GitHub Profile
@dhadka
dhadka / ScaledProblem.java
Created December 1, 2015 17:45
Scaled Problem
public class ScaledProblem implements Problem {
private final Problem problem;
private final double[] factors;
public ScaledProblem(Problem problem, double base) {
super();
this.problem = problem;
@dhadka
dhadka / demo.ipynb
Last active March 1, 2021 14:03
Simple Platypus Demo
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dhadka
dhadka / IslandModel.java
Last active September 21, 2015 19:02
Temporary fix to a bug in the island model example, where TimSort throws an exception indicating the comparator's contract is violated
import java.util.Comparator;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Properties;
import java.util.concurrent.Semaphore;
import org.apache.commons.math3.random.MersenneTwister;
import org.apache.commons.math3.random.RandomAdaptor;
import org.apache.commons.math3.random.SynchronizedRandomGenerator;
@dhadka
dhadka / salib_ex.py
Created July 31, 2015 18:21
SALib with Executioner Example
from executioner.salib import *
from SALib.sample import saltelli
from SALib.analyze import sobol
problem = {
'num_vars': 11,
'names': ['x1', 'x2', 'x3', 'x4', 'x5', 'x6', 'x7', 'x8', 'x9', 'x10', 'x11'],
'bounds': [[0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1],
[0, 1], [0, 1], [0, 1]]
}