This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cstdio> | |
#include <cstdlib> | |
#include "timer.h" | |
int main() | |
{ | |
int n, k, x, y, r = 0, mockup = 0; | |
srand(time(0)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Amadeusz Juskowiak <[email protected]> 2012 - MIT License | |
# 1. Put inside helpers do .. end | |
# 2. Set CACHE_DIR to somewhere writable and private (like CACHE_DIR=File.dirname(__FILE__) + '/tmp' | |
# 3. Use it! You can use fragment_expire to remove cache with given name. | |
# | |
# Example: | |
# %h1 foo | |
# = cache_fragment(:report, 300) do | |
# - data = get_data_slowly |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set nocompatible | |
set number | |
set ruler | |
syntax on | |
" Set encoding | |
set encoding=utf-8 | |
" Whitespace stuff |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module TLC5947 | |
class << self | |
def upscale(i) | |
(i / 255.0 * 4095.0).to_i % 4096 | |
end | |
def compress(data) | |
data.map{|v|upscale(v).to_s(2).rjust(12, '0')}.join.scan(/.{8}/).map{|v|v.to_i(2)} | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Config do drools do anta. Koniec z eclipse, tworzy jarke do dwukliku, pliki możecie wrzucić do środka i korzystać z Class::getResource(). | |
Założenia: | |
- w lib/ znajduja się wasze dodatkowe jarki, w lib/drools koniecznie (!) znajdują się jarki droolsa, musicie je gdzieś znaleźć, może być symlink do nich | |
- do lib musicie też skopiować magiczny plik z eclipse/plugins - org.eclipse.jdt.core_3.9.1.v20130905-0837.jar | |
- w src są pliki źródłowe | |
- nazwa klasy z mainem to com.sample.DroolsTest - można zmienić - linia #8 | |
- w katalogu src/main/rules są pliki drl, kopiowane do jarki | |
- w katalogu rsc są wasze różne pliki - u mnie yaml z pytaniami, można zmienić, linie #31-33, quite obvious | |
- w linii #2 można zmienić nazwę projektu, zbudowana jarka jest w build/jar i zawiera wszystko co potrzebne |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
func async(block: () -> (), priority: Int = DISPATCH_QUEUE_PRIORITY_DEFAULT) { | |
dispatch_async(dispatch_get_global_queue(priority, 0), block) | |
} | |
func par(count: UInt, block: (UInt) -> (), priority: Int = DISPATCH_QUEUE_PRIORITY_DEFAULT) { | |
dispatch_apply(count, dispatch_get_global_queue(priority, 0), block) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Vim syntax file | |
" Language: xc (XMOS C) | |
" Maintainer: Fred Barnes <[email protected]> | |
" Last Change: 01/11/2008 | |
if version < 600 | |
syntax clear | |
elseif exists("b:current_syntax") | |
finish | |
endif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
n k Jakość Pamięć [B] Czas [s] | |
200 10 100% 1060864 0.08 | |
200 11 100% 1003520 0.09 | |
200 12 100% 1044480 0.10 | |
200 13 100% 1044480 0.11 | |
200 14 100% 1060864 0.11 | |
200 15 100% 1064960 0.12 | |
200 16 100% 1077248 0.13 | |
210 10 100% 1019904 0.09 | |
210 11 100% 1040384 0.09 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'logger' | |
require 'yaml' | |
require 'fileutils' | |
require 'csv' | |
require 'gruff' | |
module CUDA |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def include_tex(code) | |
code.gsub /\\\input{"(.+)"}/ do | |
include_tex(File.read(Regexp.last_match[1])) | |
end | |
end | |
File.write(ARGV[0] ||= 'thesis.tex', include_tex(File.read(ARGV[0]))) |