Simple contour plot with Plotly.js.
This file contains 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
package Merge | |
def split(sorted, at): | |
recur sorted: | |
[]: ([], []) | |
[h, *rest]: | |
match cmp_Int(h, at): | |
GT: ([], sorted) | |
_: | |
(left, right) = split(rest, at) |
This file contains 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
package snoble | |
import scala.collection.immutable.Stream | |
import scala.collection.mutable.Queue | |
import scala.util.Random | |
sealed trait ImmutableWeightedTree[T] { | |
def weight: Double | |
def totalWeight: Double | |
def height: Int |
This file contains 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
+-------------+---------------+---------------+------------------+------------------+ | |
| Name | Old peak rate | Old peak year | Recent peak rate | Recent peak year | | |
+-------------+---------------+---------------+------------------+------------------+ | |
| Herbert | 7.32e-03 | 1929 | 6.59e-04 | 1967 | | |
| Warren | 7.08e-03 | 1921 | 9.12e-04 | 1966 | | |
| Francis | 6.59e-03 | 1915 | 9.51e-04 | 1966 | | |
| Woodrow | 4.55e-03 | 1913 | 8.77e-05 | 1969 | | |
| Franklin | 5.41e-03 | 1933 | 7.29e-04 | 1966 | | |
| Alfred | 5.64e-03 | 1928 | 9.37e-04 | 1967 | | |
| Dewey | 9.09e-03 | 1898 | 1.32e-04 | 1966 | |
This file contains 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 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 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 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 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 |