Follow these steps to install graphite on OS X Lion.
- Python 2.7
- Brew
- Git
/) | |
/ ) | |
(\ / ) | |
( \ / ) | |
( \/ / ) | |
(@) ) | |
/ \_ \ | |
// \\\ | |
(( \\ | |
~ ~ ~ \ |
/) | |
/ ) | |
/ ) | |
/ ) | |
/ | |
/ Quill | |
/ ~ ~ ~ |
import sys | |
from PySide.QtCore import QObject, Slot | |
from PySide.QtGui import QApplication | |
from PySide.QtWebKit import QWebView | |
html = """ | |
<html> | |
<body> | |
<h1>Hello!</h1><br> |
# coding: utf-8 | |
from flask import Flask | |
from werkzeug.wsgi import pop_path_info, peek_path_info | |
from werkzeug.serving import run_simple | |
app = Flask(__name__) | |
class PathDispatcher(object): |
Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)
That's it!
/* | |
* Q: 如何翻转链表中的相邻两个元素? | |
* Link: http://www.foreach.cn/question/16 | |
* 比如原链表是: | |
* a->b->c->d->e->f | |
* 我们只翻转相邻两个,即1和2翻转,3和4翻转,翻转后如下: | |
* b->a->d->c->f->e | |
*/ | |
#include <stdio.h> |
This is a quick guide to OAuth2 support in GitHub for developers. This is still experimental and could change at any moment. This Gist will serve as a living document until it becomes finalized at Develop.GitHub.com.
OAuth2 is a protocol that lets external apps request authorization to private details in your GitHub account without getting your password. All developers need to register their application before getting started.
reduce(lambda x,y:10*x+y,map(lambda x:ord(x)-48,a)) |