Skip to content

Instantly share code, notes, and snippets.

#include <iostream>
#include <cstdio>
#include <cstring> // tutaj jest zdefiniowany `strcpy` i `strncpy`
using namespace std;
struct osoba{
char imie[20];
char nazwisko[20];
int wiek;
Package has never been configured. Configuring with default flags. If this
fails, please run configure manually.
Resolving dependencies...
Configuring evil-pareto-0.0.0.0...
Building evil-pareto-0.0.0.0...
Preprocessing executable 'evil-pareto' for evil-pareto-0.0.0.0...
[1 of 6] Compiling EA.Multiobjective.Space.Cartesian ( src/EA/Multiobjective/Space/Cartesian.hs, dist/build/evil-pareto/evil-pareto-tmp/EA/Multiobjective/Space/Cartesian.o )
[2 of 6] Compiling RandMonadT ( src/RandMonadT.hs, dist/build/evil-pareto/evil-pareto-tmp/RandMonadT.o )
[3 of 6] Compiling RandTools ( src/RandTools.hs, dist/build/evil-pareto/evil-pareto-tmp/RandTools.o )
[4 of 6] Compiling EA ( src/EA.hs, dist/build/evil-pareto/evil-pareto-tmp/EA.o )
@kgadek
kgadek / kata_brainfuck.hs
Created May 1, 2015 22:58
Brainfuck interpreter with handcrafted lenses. Catamorphism not included though :<
{-# LANGUAGE RankNTypes, RecordWildCards #-}
import Data.Char
import Data.Functor.Identity
import Control.Applicative
{-
Inspired from real-world Brainf**k, we want to create an interpreter of that language which will
support the following instructions (the machine memory or 'data' should behave like a potentially
infinite array of bytes, initialized to 0):
@kgadek
kgadek / drivergen.py
Last active August 29, 2015 14:21
prototyp DriverGen
class DriverGen:
def __init__(self):
pass
def population_generator():
# raise NotImplementedError
current_cost = 0
finalized_pop = []
while True:
# Kojarzycie WALL-E? No to ten statek wielki nazywał się Axiom.
@kgadek
kgadek / Makefile.patch
Created May 29, 2015 22:11
Patch for freebsd-port math/gmp to work on Raspberry Pi 2B
--- Makefile 2015-05-30 00:08:53.000000000 +0200
+++ MakefileRPi 2015-05-30 00:08:22.000000000 +0200
@@ -37,7 +37,8 @@
CONFIGURE_ENV+= ABI="64"
.endif
.else
-CONFIGURE_ENV+= ABI="32"
+CONFIGURE_ENV+= ABI="standard"
+CONFIGURE_ARGS+=--enable-assembly=no
.endif
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,
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
@kgadek
kgadek / logtest.py
Last active August 29, 2015 14:23
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):
[ 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 :: ✓
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