I hereby claim:
- I am fela on github.
- I am fela (https://keybase.io/fela) on keybase.
- I have a public key whose fingerprint is 0875 81C7 564F 1E05 5EE3 8D05 7B0D 4361 506C 15B0
To claim this, I am signing this object:
| class Shoes::MyWidget < Shoes::Widget | |
| def initialize | |
| background blue | |
| para "this is MyWidget" | |
| end | |
| def addpara p | |
| para strong(p) | |
| p self # this always prints (Shoes::MyWidget) | |
| end |
| Shoes.app :width => 500 do | |
| @s1 = stack :margin_left => 50, :height => 1.0 do | |
| background red | |
| para "a b c d e f g h i l m n o p q r s t u v a b c d e f g h 1 2 3 4" | |
| button "show" do | |
| @s1.style(:width => -150) | |
| @s2.show | |
| end | |
| end |
| require 'thread' | |
| Shoes.app do | |
| @s = stack do | |
| para "this is a para in the stack.." | |
| end | |
| Thread.new do | |
| sleep 0.1 | |
| @s.remove |
| #!/usr/bin/env ruby | |
| $VERBOSE = true | |
| $:.unshift File.dirname($0) | |
| require 'Qt4' | |
| module Shoes | |
| def self.app &blk |
| #!/usr/bin/env ruby | |
| x=<<'X' | |
| #!/usr/bin/env ruby | |
| x=<<'X' | |
| x+="X\n" | |
| x=x.split("\n") | |
| x=x[0..1]+x[0..7]+x[2..-2] | |
| puts x.join("\n") | |
| X | |
| x+="X\n" |
I hereby claim:
To claim this, I am signing this object:
| ######################################### | |
| # helpers # | |
| ######################################### | |
| # helper to calculate s | |
| s.func <- function(X) { | |
| # norms ^ 4 | |
| norms4 <- apply(X, 2, function(Xi) (Xi%*%Xi)^2) | |
| n <- ncol(X) |
| #!/usr/bin/env python3 | |
| RADIX = 10 | |
| # radix sort that works for non negative integers | |
| def radix_sort_nonneg(lst): | |
| last_iteration = False | |
| radix_power = 1 | |
| while not last_iteration: |
| #!/usr/bin/env python3 | |
| import sys | |
| from random import random | |
| def single_trial(): | |
| """ | |
| Generate a random 2 dimensional point between (0, 0) and (1, 1) | |
| and returns weather the distance to the origin is less than 1 |
| from collections import defaultdict | |
| def all_pairs(): | |
| for n1 in range(2, 65): | |
| for n2 in range(n1+1, 65+1): | |
| yield n1, n2 | |
| def prod(pair): |