Skip to content

Instantly share code, notes, and snippets.

View wdv4758h's full-sized avatar

Chiu-Hsiang Hsu wdv4758h

  • Taipei, Taiwan
View GitHub Profile

ELF

ELF = Executable and Linkable Format

ELF Object Files

Relocatable file

let fib_help f= match f with
[|a;b|]->[|b;a+b|]
|_->raise(Invalid_argument "f must be a int array");;
let rec fib n = match n with
1->[|0;1|]
|n->fib_help( fib(n-1) );;
(* (0, 1) => (1, 1) => (1, 2) => (2, 3) => (3, 5) => ... *)

Python 3.4

The standard type hierarchy

  • None
  • NotImplemented
  • Ellipsis
  • numbers.Number
    • numbers.Integral
@wdv4758h
wdv4758h / SimpleCV.rst
Last active August 29, 2015 14:06
初次接觸 SimpleCV,紀錄一些相關事情

SimpleCV

SimpleCV 目前因為 dependency 的關係還不能用 Python 3 (有哪幾個 lib ?)

SimpleCV 2.0 Planning (目前 1.3)

@wdv4758h
wdv4758h / fib.py
Last active August 29, 2015 14:05
a test for fibonacci with dp decorator
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import functools
def dp(start=[]):
def decor(func):
func.dp = start.copy()
@functools.wraps(func)
def wrapper(*args, **kwargs):
@wdv4758h
wdv4758h / python-articles.md
Last active August 29, 2015 14:04
Python articles
@wdv4758h
wdv4758h / coroutine.rst
Last active August 29, 2015 14:04
coroutine