Skip to content

Instantly share code, notes, and snippets.

Avatar

Igor "SkAZi" Potapov SkAZi

View GitHub Profile
@SkAZi
SkAZi / # opencv - 2016-10-13_12-01-37.txt
Created Oct 13, 2016
opencv (homebrew/science/opencv) on macOS 10.12 - Homebrew build logs
View # opencv - 2016-10-13_12-01-37.txt
Homebrew build logs for homebrew/science/opencv on macOS 10.12
Build date: 2016-10-13 12:01:37
View gist:05784610ebb80ac27989
defmodule MobCas3.Poker1 do
@cards([{99, :joker},{98, :joker}] ++
for m <- 2..14, v <- [:spades, :clubs, :diamonds, :hearts] do {m,v} end)
def match(comb) when is_list(comb), do: apply(MobCas3.Poker, :match, Enum.sort(comb))
def match(comb) when is_tuple(comb), do: match(Tuple.to_list(comb))
def match({10,m}, {11,m}, {12,m}, {13,m}, {14,m}), do: {:royal_flush, {m}}
def match({a,m}, {b,m}, {c,m}, {d,m}, {e,m})
when b==a+1 and c==b+1 and d==c+1 and e==d+1, do: {:straight_flush, {e,m}}
View gist:b4ea1adf37194fbea4f1
defmodule DotExp do
@doc """
RegExp like syntax validator, "." is any symbol,
"*" repeats last symbol 0..n times.
"""
def match?(expr, str), do: match(expr, str)
defp match("", ""), do: true
defp match(".*", _), do: true
View gist:4954257
function hackcrypt(last, message) {
var len = message.length;
for(var ret = "", i = 0; i < len; i++)
ret += chars[last = (i + last + message.charCodeAt(i)) % 64];
return ret;
}
function uncrypt(endata){
var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),
total = 0;