Simple contour plot with Plotly.js.
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
WITH input AS (SELECT MD5('some input string') AS input, 20 AS modulo), | |
mods AS ( | |
SELECT | |
STRTOL(SUBSTRING(input,1,8),16) % modulo AS a, | |
STRTOL(SUBSTRING(input,9,8), 16) % modulo AS b, | |
STRTOL(SUBSTRING(input,17,8), 16) % modulo AS c, | |
STRTOL(SUBSTRING(input,25,8), 16) % modulo AS d, | |
POW(POW(16 % modulo, 4)::INT % modulo, 2)::INT % modulo AS offset_multiplier, | |
modulo | |
FROM input) |
I hereby claim:
- I am snoble on github.
- I am snoble (https://keybase.io/snoble) on keybase.
- I have a public key whose fingerprint is A3A1 908E 91E6 333C E66D 76AA 8947 AAD4 946C 55A3
To claim this, I am signing this object:
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
{ | |
"publickey":"b61aad410f6d6f81071e8f8d52cb100a98be52ee619efd49268acfa1bf7a48f0021bd4e6dda368912b07efc37a7fbad9a0d25154191c4ef5cb31a314e18d1e31f851e0c1c93fa09b035cc57879ec897598920e14387110ffe6f401e635b19dc8fde0355cfe63d8ff260d478659816eab9f093a0384b9a65daf24db5105cd3b29", | |
"ed":"bf2a7accb1bffb276b45dcf03d213b7ea087cd9fd66a49a96ac6b57f74d985f381f9abf1bafc8db5d25d27cac9ab268997c498832f7fad194e31776b6a4c208593adc1d568a3b65ea64dbfdaca57c49cb738acf90e60cd536090ef7571f687284294948343f1af6551d563b334ce60011643c77ed5a2a0dad834916d8a298e14c421e13854fc2916195814168fef9ebf", | |
"erk":"b2b9133d89b67a5697b8d052e4782722463f88233d3b124a16a22b99124cbc41387047ffa3dde76aa60a2ef4a8c1223e953a6433e6279242f022ae7c05a07a6581103eecfabb4b0129697967d067a2807dd8b79fcfc0323ff75d8d6d240acf2108436cc82f844c0da78a3b8b0306f7e1a8945c710154fe29f43378603a89ac44", | |
"efk":"a221f7a4a34a7c5576168cec202b48a496e67269ebeb22dbf34cd74a6700333f50574e2ffc652f676d4b7aca06772df436c883d1e19c611e841288b842df3bace79b4a82633888a6d03b35cf62357e1ae28c792b45ff |
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 significance(c_prediction, c_actual) | |
c_prediction - c_actual + (c_actual == 0 ? 0 : c_actual*(Math.log(c_actual) - Math.log(c_prediction))) | |
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
def foo(x); 99; end | |
a = foo (44) / 11 | |
foo = 99999999 | |
b = foo (44) / 11 | |
puts "a: #{a} b: #{b}" #output of "a: 99 b: 9" |
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
Git error: command `git clone '[email protected]:Shopify/internal_app_engine.git' "/tmp/build_2i47vki223km9/vendor/bundle/ruby/1.9.1/cache/bundler/git/internal_app_engine-da5b2a5d7e7f3a2d844b755ffbb008127c69c1e2" --bare --no-hardlinks` in directory /tmp/build_2i47vki223km9 has failed. | |
! | |
! Failed to install gems via Bundler. | |
! | |
! Heroku push rejected, failed to compile Ruby/rails app |
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
a = 2 if a.nil? | |
if b.nil? | |
b = 2 | |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<title>moments -- Sage</title> | |
<link type="text/css" rel="stylesheet" href="/css/main.css" /> |
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 foo and foofoo to localhost in your hosts file. | |
# ruby simple.rb | |
# load http://foofoo:4567/cookie to make sure their is no initial cookie (go to http://foofoo:4567/clear_cookie if there is) | |
# load http://foo:4567/test | |
# load http://foofoo:4567/cookie to see resulting cookies | |
# load http://foofoo:4567/test | |
# load http://foofoo:4567/cookie to see resulting cookies | |
require 'sinatra' |