Skip to content

Instantly share code, notes, and snippets.

View janisz's full-sized avatar
馃彔
Working from home

Tomasz Janiszewski janisz

馃彔
Working from home
View GitHub Profile
@janisz
janisz / Dcokerfile
Created April 29, 2016 21:21
Docker H鈧侽.ai cluster
########################################################################
# Dockerfile for Oracle JDK 8 on Ubuntu 16.04
# http://blog.h2o.ai/wp-content/uploads/2015/01/Dockerfile.txt
########################################################################
# pull base image
FROM \
ubuntu:16.04
# maintainer details
@janisz
janisz / bench_test.go
Created March 24, 2016 13:40
Go Free cache vs BigCache
package bigcache
import (
"encoding/binary"
"testing"
"time"
"github.com/allegro/bigcache"
"github.com/coocood/freecache"
)
@janisz
janisz / parse.js
Last active February 1, 2016 22:03
Script parsing hipchat export to CSV
var json2csv = require('json2csv');
var sanitize = require("sanitize-filename");
var fs = require('fs');
var users = require('./hipchat_export/users/list.json').users;
var room_list = require('./hipchat_export/rooms/list.json').rooms;
var escapeShell = function(cmd) {
return cmd.replace(/\//g, "-");
};
@janisz
janisz / README
Last active December 5, 2015 13:59
Vagrantfile for Mesos and Marathon
1. Install [Vegrant](https://www.vagrantup.com/downloads.html)
2. Download Vagrantfile `wget https://gist.githubusercontent.com/janisz/ce36ad51ee5fb6911786/raw/0503492c7226d95e8b5f801f4621982105578de8/Vagrantfile`
3. `vagrant up`
## Starter links
* http://www.wired.com/2013/03/google-borg-twitter-mesos/
* https://manning-content.s3.amazonaws.com/download/2/c79863e-1021-4274-abcc-63b748548f24/Mesos_MEAP_ch1.pdf
* http://mesos.apache.org/documentation/latest/
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
t a/package/opencv/Config.in b/package/opencv/Config.in
index 571309f..d725d44 100644
--- a/package/opencv/Config.in
+++ b/package/opencv/Config.in
@@ -84,7 +84,12 @@ config BR2_PACKAGE_OPENCV_LIB_PHOTO
help
Include opencv_photo module into the OpenCV build.
-comment "opencv_python module requires numpy which is not yet available."
+config BR2_PACKAGE_OPENCV_LIB_PYTHON
install.packages("nnet")
# Funkcja trenuj膮ca, ktra bierze jako argument Y (wektor cyfr)
# oraz X (macierz obrazu) i zwraca obiekt sie膰 neuronow膮.
train_ANN = function(X,Y) {
library(nnet) # 艂adujemy bibliotek臋
y <- class.ind(Y) # normalizujemy oczekiwane wyj艣膰ie do postacie macie偶y zer z jedn膮 jedynk膮
ANN <- nnet(X,y,size=10,linout=T,maxit=1,MaxNWts=100000) # tworzymy i uczymy sie膰
# aby zwi臋kszy膰 skuteczno艣膰 nauki nale偶y zwi臋kszy膰 liczb臋 iteracji (maxit),
# korzystne mo偶e te偶 by膰 zwi臋kszenie liczby neuron贸w (size)
@janisz
janisz / config.py
Created April 30, 2015 06:40
QTile config.py
#!/usr/bin/env python
# coding: utf-8
from threading import Thread
from time import sleep
import subprocess
from libqtile.config import Key, Screen, Group, Drag, Click
from libqtile.command import lazy
from libqtile import layout, bar, widget, hook
@janisz
janisz / Makefile
Last active August 29, 2015 14:19
LINSW - GIPO
OBJS := main.o
memo: $(OBJS)
$(CC) -o memo $(OBJS)
$(OBJS) : %.o : %.c
$(CC) -c $(CFLAGS) $< -o $@ -std=c99
## OPERACJE NA DANYCH ##
MOV arg1, arg2 - przesyla arg2 do arg1
XCHG arg1, arg2 - zamienia warto艣ci argument贸w arg1 z arg2
PUSH arg - umieszcza arg na stosie
POP arg - pobiera element ze stosu i umieszcza go w arg
PUSHA/POPA - umieszczenie/pobranie na stosie wszystkich rejestr贸w uniwersalnych
MOVZX/MOVSX rej, arg2 - rozciagniecie bez/ze znakiem arg2 i umieszczenie go w rej
BSWAP rej32 - odwr贸cenie kolejno艣ci bajt贸w
MOVBE arg1, arg2 - odwr. kolejnosci bajtow arg2 i przeslanie wyniku do arg1
CMOV*** arg1, arg2 - warunkowe przeslanie arg2 do arg1