Skip to content

Instantly share code, notes, and snippets.

Konrad kgadek

Block or report user

Report or block kgadek

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View test.hs
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE KindSignatures #-}
import Data.Monoid
import Data.Proxy
data Colour = Red | Green | Blue deriving (Show)
data Size = Large | Small deriving (Eq, Show)
View get-stack.sh
#!/usr/bin/env bash
yell() { echo "$0: $*" >&2; }
die() { RETCODE=$1; shift; yell "$*"; exit ${RETCODE}; }
try() { "$@" || die 111 "cannot $*"; }
goDarwin() {
GHCVER="$(ghc --version)"
View gist:d3d3b6c087ce607dc804
import random
target_diffusion = 0.1
population=[[0,8,4], [2,7,2]]
pop_diffusion=[abs(0.1*max(x)) for x in zip(*population)]
individual=population[0]
while True:
rand_diffusion=[random.gauss(0, v) for v in diffusion]
View .sh
#!/usr/bin/env bash
relpath() { # don't mind me, I'm just a mere tool
python2.7 -c 'import os.path, sys; print os.path.relpath(sys.argv[1],sys.argv[2])' "$1" "${2-$PWD}"
}
declare -a PKG_OK=()
PKG_FAIL=()
PKG_ALL=()
View runevo.sh
#!/bin/sh
#PBS -l walltime=030:00:00
#PBS -l nodes=1:ppn=12
#PBS -q plgrid
#PBS -l mem=1500mb
export EV_REPONAME="evogil.${PBS_JOBID}"
export EV_PYTHON="${HOME}/local_python/bin/python"
export EV_PROBLEMS="ZDT1,ZDT2,ZDT3,ZDT4,ZDT6,UF1,UF2,UF3,UF4,UF5,UF6,UF7,UF8,UF9,UF10,UF11,UF12"
View gist:c3e16065333ed1cb6fbe
2015-06-23 23:47:42582 50672 algorithms.HGS.HGS DEBUG Created HGS <algorithms.HGS.HGS.HGS object at 0x10ebab5c0>
2015-06-23 23:47:42582 50672 algorithms.HGS.HGS DEBUG Creating root node with 50 indivs
2015-06-23 23:47:42583 50672 algorithms.HGS.HGS DEBUG Creating Node 0
2015-06-23 23:47:42583 50672 algorithms.HGS.HGS DEBUG Node #0 creating driver with 50 indivs
2015-06-23 23:47:42583 50672 evotools.run_parallel DEBUG Dropping this dummy obj, returning partial instead: <class 'algorithms.HGS.HGS.HGS'>
2015-06-23 23:47:42583 50672 algorithms.HGS.HGS DEBUG Created HGS <algorithms.HGS.HGS.HGS object at 0x10ebab518>
2015-06-23 23:47:42583 50672 algorithms.HGS.HGS DEBUG Creating root node with 50 indivs
2015-06-23 23:47:42584 50672 algorithms.HGS.HGS DEBUG Creating Node 0
2015-06-23 23:47:42584 50672 algorithms.HGS.HGS DEBUG Node #0 creating driver with 50 indivs
2015-06-23 23:47:42584 50672 evotools.run_parallel DEBUG Beginning processing of <algorithms.HGS.HGS.HGS object at 0x10ebab518>, args: (('ZDT4', 'HGS+NSGA
View gist:312affd097d3571bdd50
[ PROBLEM ]..[ ALGO ]..[N ]..[Budgt]..[ METRICS OY ]..[ ✓ ]..[ RESULT, confidence interval ]..[ σ ]..[ OUTLIERS ]..[ RES w/o outliers ]..[ σ w/o outliers ]..[ (C INT)/METRICS ]..
kursawe :: IMGA+SPEA2 :: 3 :: 500 :: cost :: ✓ :: 510.000 ≤ 510.000 ≤ 510.000 :: 0.000 :: -- mild -- extr. :: 510.000 ( +0.000%) :: 0.000 ( inf%) :: 0.000% ::
kursawe :: IMGA+SPEA2 :: 3 :: 500 :: gd :: ✓ :: 0.014 ≤ 0.025 ≤ 0.042 :: 0.013 :: -- mild -- extr. :: 0.025 ( +0.000%) :: 0.013 ( 0.000%) :: 117.374% HIGH ::
kursawe :: IMGA+SPEA2 :: 3 :: 500 :: igd :: ✓ :: 0.004 ≤ 0.013 ≤ 0.018 :: 0.006 :: -- mild -- extr. :: 0.013 ( +0.000%) :: 0.006 ( 0.000%) :: 114.233% HIGH ::
kursawe :: IMGA+SPEA2 :: 3 :: 500 :: epsilon :: ✓
@kgadek
kgadek / logtest.py
Last active Aug 29, 2015
logtest.py
View logtest.py
from contextlib import contextmanager, closing
import logging
from logging.handlers import QueueHandler
import multiprocessing
from multiprocessing.pool import Pool
from multiprocessing.queues import Queue
@contextmanager
def background_process(x):
View gist:409a03720b0c5323ef05
2015-06-19 11:36:00922 pr:48518 evotools.run_parallel DEBUG msg:Starting the worker. args:(('kursawe', 'IMGA+OMOPSO'), [500, 1000, 1500, 2000, 2500, 3000, 3500, 4000, 4500, 5000, 5500, 6000, 6500, 7000, 7500, 8000, 8500, 9000, 9500], 0, '3')
2015-06-19 11:36:00923 pr:48518 evotools.run_parallel DEBUG msg:Renice the process PID:48518 by 3
2015-06-19 11:36:00923 pr:48518 evotools.run_parallel DEBUG msg:Getting random seed
2015-06-19 11:36:00924 pr:48518 evotools.run_parallel DEBUG msg:Starting preparation
2015-06-19 11:36:00924 pr:48518 evotools.run_parallel DEBUG msg:Preparing OMOPSO for kursawe
2015-06-19 11:36:00924 pr:48518 evotools.run_parallel DEBUG msg:driver class:∅
2015-06-19 11:36:00929 pr:48518 evotools.run_parallel DEBUG msg:Starting with config containing meta-parameters
2015-06-19 11:36:00930 pr:48518 evotools.run_parallel DEBUG msg:config: {'__metaconfig__populationsize': 100}
2015-06-19 11:36:00930 pr:48518 evotools.run_parallel DEBUG msg:Per-problem config: {'fitnesses': [<function fit_a at 0x1
View gist:b908cb6e3653c8dd25c4
diff --git a/algorithms/HGS/HGS.py b/algorithms/HGS/HGS.py
index f382fca..3039abb 100644
--- a/algorithms/HGS/HGS.py
+++ b/algorithms/HGS/HGS.py
@@ -26,7 +26,8 @@ class HGS(DriverGen):
crossover_variance, sprouting_variance,
mutation_variance, branch_comparison,
metaepoch_len, driver, max_children,
- mutation_probability=0.05, sproutiveness=1):
+ mutation_probability=0.05, sproutiveness=1,
You can’t perform that action at this time.