Skip to content

Instantly share code, notes, and snippets.

/**
* Base contract that all upgradeable contracts should use.
*
* Contracts implementing this interface are all called using delegatecall from
* a dispatcher. As a result, the _sizes and _dest variables are shared with the
* dispatcher contract, which allows the called contract to update these at will.
*
* _sizes is a map of function signatures to return value sizes. Due to EVM
* limitations, these need to be populated by the target contract, so the
* dispatcher knows how many bytes of data to return from called functions.
@huichen
huichen / classifier.go
Last active December 31, 2015 00:19
一百行实现一个分类器
package main
import (
"flag"
"github.com/huichen/mlf/contrib"
"github.com/huichen/mlf/eval"
"github.com/huichen/mlf/model"
"github.com/huichen/mlf/optimizer"
"log"
"os"
@ipconfiger
ipconfiger / __init__.py
Created January 5, 2012 12:48
OAuth包,实现了sina,QQ,网易,搜狐的OAuth认证
# -*- Encoding: utf-8 -*-
import base64
import binascii
import cgi
import hashlib
import hmac
import logging
import time
import urllib
import urlparse