I hereby claim:
- I am scturtle on github.
- I am scturtle (https://keybase.io/scturtle) on keybase.
- I have a public key whose fingerprint is C781 C6A7 A71A FFBA D1CD 08DA 899C 7671 AF1A 9565
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
data AVL a = Null | Branch a (AVL a) (AVL a) Int Int -- height size | |
deriving Show | |
height :: AVL a -> Int | |
height Null = 0 | |
height (Branch _ _ _ h _) = h | |
size :: AVL a -> Int | |
size Null = 0 | |
size (Branch _ _ _ _ s) = s |
🎵 | |
「」 | |
╮( ̄▽ ̄")╭ | |
┐(・ิL_・ิ)┌ | |
ˊ_>ˋ | |
(#°Д°) | |
_(:3」∠)_ | |
→_→ | |
﹁ ﹁ | |
눈_눈 |
import cv2 | |
import cv2.cv as cv | |
import tesseract | |
def show(im): | |
msg = 'press any key to continue' | |
cv2.namedWindow(msg, cv2.WINDOW_NORMAL) | |
cv2.imshow(msg, im) | |
cv2.waitKey(0) | |
cv2.destroyAllWindows() |
import qualified Data.Map as Map | |
data Formula = Variable String | |
| Negation Formula | |
| Conjunction Formula Formula | |
| Disjunction Formula Formula | |
instance Show Formula where | |
show (Variable v) = v | |
show (Negation f) = "!" ++ show f |
import Data.Maybe (fromMaybe) | |
class Fluffy f where | |
furry :: (a -> b) -> f a -> f b | |
-- Exercise 1 | |
-- Relative Difficulty: 1 | |
instance Fluffy [] where | |
furry = map |
@namespace url(http://www.w3.org/1999/xhtml); | |
@-moz-document domain("www.weibo.com") { | |
#v6_pl_content_publishertop { | |
display: none | |
} | |
#v6_pl_content_homefeed .WB_tab_a { | |
display: none | |
} |
use std::iter; | |
fn primes(maxn: uint) -> (Vec<bool>, Vec<uint>) { | |
let mut primes : Vec<uint> = Vec::new(); | |
let mut is_prime : Vec<bool> = Vec::from_elem(maxn + 1, true); | |
*is_prime.get_mut(0) = false; | |
*is_prime.get_mut(1) = false; | |
primes.push(2); | |
for i in iter::range_step_inclusive(4, maxn, 2) { | |
*is_prime.get_mut(i) = false; |
#!/bin/env python | |
''' L-BFGS algorithm http://aria42.com/blog/2014/12/understanding-lbfgs/ ''' | |
import numpy as np | |
from numpy import linalg | |
from collections import deque | |
class LineSearch: | |
''' backtracing line search algorithm ''' |