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
kgadek / Makefile.patch
Created May 29, 2015
Patch for freebsd-port math/gmp to work on Raspberry Pi 2B
View Makefile.patch
--- 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="standard"
kgadek /
Last active Aug 29, 2015
prototyp DriverGen
class DriverGen:
def __init__(self):
def population_generator():
# raise NotImplementedError
current_cost = 0
finalized_pop = []
while True:
# Kojarzycie WALL-E? No to ten statek wielki nazywał się Axiom.
kgadek / kata_brainfuck.hs
Created May 1, 2015
Brainfuck interpreter with handcrafted lenses. Catamorphism not included though :<
View kata_brainfuck.hs
{-# 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):
View gist:bdcf0323be708a046b1c
Package has never been configured. Configuring with default flags. If this
fails, please run configure manually.
Resolving dependencies...
Configuring evil-pareto-
Building evil-pareto-
Preprocessing executable 'evil-pareto' for evil-pareto-
[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 )
View malwina.cpp
#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;
View pocisk.hs
-- Jest pudełko a w środku pewna ilość kulek. Każda kulka ma unikalny numer. Dokonaliśmy N losowań, w których
-- odnotowaliśmy wybór K różnych kulek.
-- Z jaką pewnością możemy stwierdzić, że w środku pudełka było K kulek? Innymi słowy: z jakim prawdopodobieństwem
-- wylosowaliśmy każdą z nich co najmniej raz?
import Data.Ratio
import Text.Printf
choose n k = product [k+1..n] % product [1..n-k]
entry n k i = (1 % (k + i) ^ n) * (choose (k+i) k)
kgadek / all.log
Created Feb 13, 2015
`go` from source (git checkout v1.4.1) on FreeBSD 10.1 @ Raspberry Pi B
View all.log
[gogs@balrog ~/go/src]$ ./all.bash
# Building C bootstrap tool.
# Building compilers and Go bootstrap tool for host, freebsd/arm.
View gist:14c560a51dc3ad166721
$ pip install buildbot
Collecting buildbot
Using cached buildbot-0.8.10.tar.gz
Collecting twisted>=11.0.0 (from buildbot)
Using cached Twisted-15.0.0.tar.bz2
Collecting Jinja2>=2.1 (from buildbot)
Using cached Jinja2-2.7.3.tar.gz
Collecting sqlalchemy<=0.7.10,>=0.6 (from buildbot)
View session.log
bash-3.2$ git init subproj_remote
Initialized empty Git repository in /Users/konrad/tmp/arz-sub2/subproj_remote/.git/
bash-3.2$ git init project
Initialized empty Git repository in /Users/konrad/tmp/arz-sub2/project/.git/
View gist:ab8011e7af06ff61c34e
web.Server Traceback (most recent call last):
exceptions.TypeError: 'NoneType' object has no attribute '__getitem__'
/home/kgadek/py-ci/local/lib/python2.7/site-packages/twisted/internet/ in maybeDeferred
139 try:
140 result = f(*args, **kw)
141 except:
/home/kgadek/py-ci/local/lib/python2.7/site-packages/buildbot/status/web/ in <lambda>
390 if allowed or path_always_viewable(request):
391 return defer.maybeDeferred(lambda: self.content(request, ctx))
392 else:
You can’t perform that action at this time.