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
fun name (n, v) = n; | |
fun vals (n, v) = v; | |
fun get([], a) = 0 | |
| get((b, v) :: tail, a) = if a = b then v else get(tail, a); | |
fun ig(a, S, C) = | |
(* TODO :( *) | |
C(S, name a); |
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
private auto typeDispatch(T, Cs...)(T value, Cs callbacks) { | |
/*static*/ foreach(i, C; Cs) { | |
if((cast(ParameterTypeTuple!C[0]) value) !is null) { | |
return callbacks[i](cast(ParameterTypeTuple!C[0]) value); | |
} | |
} | |
throw new SemanticError("Can't compile that!"); | |
} | |
// ... |
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
samples = 100; % Ilość symulowanych egzaminów. | |
N = 128; % Ilość osób na egzaminie. | |
Q = 19; % Ilość pytań na egzaminie. | |
span = [2.0, 3.0, 3.5, 4.0, 4.5, 5.0]; % Oceny, jakie można było dostać. | |
R = zeros(1, N*samples); % Finalny wynik symulacji. | |
S = zeros(1, N); % Wynik symulacji jednego egzaminu. | |
mu = 0.1; % mu dla rozkładu normalnego. |
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
#! /bin/sh | |
# This little script will automatically test feature-branch code | |
# before it is actually merged into the master branch. | |
# Just alias it as so: | |
# git config --global alias.safe-merge '!exec $HOME/git_safe_merge.sh' | |
LAST_BRANCH=`git rev-parse --abbrev-ref HEAD` | |
TEMP_BRANCH=`date +"$LAST_BRANCH-%Y%m%d%H%M"` |
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
{ | |
"counters" : { | |
"all" : 110, | |
"ws_incomming" : 516, | |
"http_outgoing" : 458, | |
"ws_outgoing" : 434, | |
"http_incomming" : 430, | |
"alive" : 10, | |
"disconnected" : 0, | |
"connected" : 10, |
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
{ | |
"phases" : [], | |
"sessions" : [ | |
{ | |
"name" : "Session name", | |
"transport" : "xhr_polling", | |
"weight" : 0.2, | |
"metadata" : { | |
"foo" : "bar", | |
"baz" : "hurr" |
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
<session probability="50" name="websocket" type="ts_websocket"> | |
<transaction name="socketio_ws_handshake"> | |
<request> | |
<dyn_variable name="sid" re="\r\n\r\n([^:]+):[^:]+:[^:]+:[^:]+"/> | |
<http url="/socket.io/1/" method="GET" version="1.1"> | |
<http_header name="origin" value="null"/> | |
</http> | |
</request> |
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 <stdio.h> | |
template <typename T> | |
T foo(T argc, char *argv<::>) <% | |
puts(argv<:0:>); | |
return argc; | |
%> | |
int(*main)(int, char*<::>) = &foo<int>; |
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
((λ Z | |
((λ nil. | |
(((((λ null. | |
(λ cons. | |
(λ car. | |
(λ cdr. | |
(λ life | |
(the-universe | |
and-everything)))))) | |
(λ l |
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
(require 'xml) | |
(defun assoc-or-error (what where &optional err-string) | |
(or (assoc what where) | |
(error (or err-string "Suddenly errors! Thousands of them!")))) | |
(defun google-reader-to-newsticker (filename) | |
"Parses google-reader subscription XML and returns newsticker compatible feed alist." | |
(with-temp-buffer | |
(insert-file-contents filename) |