Follow these steps to install graphite on OS X Lion.
- Python 2.7
- Brew
- Git
class Color(object): | |
""" | |
utility to return ansi colored text. | |
usage:: | |
>>> from color import colored | |
>>> colored("text","red") | |
'\x1b[31mtext\x1b[0m' | |
""" |
class Color(object): | |
""" | |
utility to return ansi colored text. | |
""" | |
colors = { | |
'black': 30, | |
'red': 31, | |
'green': 32, | |
'yellow': 33, |
#! /usr/bin/env python2.7 | |
#encoding:utf-8 | |
#@description:一个python守护进程的例子 | |
#@tags:python,daemon | |
import sys | |
import os | |
import time | |
import atexit | |
from signal import SIGTERM |
deb http://old-releases.ubuntu.com/ubuntu/ natty main universe restricted multiverse | |
deb-src http://old-releases.ubuntu.com/ubuntu/ natty main universe restricted multiverse | |
deb http://old-releases.ubuntu.com/ubuntu/ natty-security universe main multiverse restricted | |
deb-src http://old-releases.ubuntu.com/ubuntu/ natty-security universe main multiverse restricted | |
deb http://old-releases.ubuntu.com/ubuntu/ natty-updates universe main multiverse restricted | |
deb http://old-releases.ubuntu.com/ubuntu/ natty-proposed universe main multiverse restricted | |
deb-src http://old-releases.ubuntu.com/ubuntu/ natty-proposed universe main multiverse restricted | |
deb http://old-releases.ubuntu.com/ubuntu/ natty-backports universe main multiverse restricted | |
deb-src http://old-releases.ubuntu.com/ubuntu/ natty-backports universe main multiverse restricted | |
deb-src http://old-releases.ubuntu.com/ubuntu/ natty-updates universe main multiverse restricted |
# coding=utf8 | |
""" | |
思路 | |
~~~~ | |
1. 按行读取文件, 三列入列表start_lst, end_lst, code_lst | |
2. 对start_lst进行二分法查找,直到找到离目标ip地址x最近的元素start和其 | |
在start_lst中的索引i, 使得恰好有 | |
start=start_lst[i]<=x |
typedef struct post { | |
char *x; | |
char *y; | |
int x_z; | |
} post_t; | |
void | |
foo (post_t *o, char *src) | |
{ |
xfconf-query -c xsettings -p /Gtk/KeyThemeName -s Emacs |
- Install xhtml2pdf (former "pisa"). | |
http://www.xhtml2pdf.com/ | |
- Install Takao Font (TakaoPGothic.ttf). | |
https://launchpad.net/takao-fonts/ | |
- Modify conf.py as below. | |
- Modify Makefile as below. |
/) | |
/ ) | |
(\ / ) | |
( \ / ) | |
( \/ / ) | |
(@) ) | |
/ \_ \ | |
// \\\ | |
(( \\ | |
~ ~ ~ \ |