1.. 准备系统Ubuntu 11.04 (我发现这是我最喜欢的ubuntu版本) 2. 准备好ati 11-04 版本的catalyst驱动 3. 准备好
- 开始重装, 装好后,安装驱动:
import houdini as h | |
from pygments import highlight | |
from pygments.lexers import get_lexer_by_name | |
from pygments.formatters import HtmlFormatter | |
import misaka as m | |
from misaka import HtmlRenderer, SmartyPants | |
# Create a custom renderer | |
class BleepRenderer(HtmlRenderer, SmartyPants): |
deb http://run.hit.edu.cn/ubuntu/ natty main universe restricted multiverse | |
deb-src http://run.hit.edu.cn/ubuntu/ natty universe main multiverse restricted | |
deb http://run.hit.edu.cn/ubuntu/ natty-security universe main multiverse restricted | |
deb-src http://run.hit.edu.cn/ubuntu/ natty-security universe main multiverse restricted | |
deb http://run.hit.edu.cn/ubuntu/ natty-updates universe main multiverse restricted | |
deb-src http://run.hit.edu.cn/ubuntu/ natty-updates universe main multiverse restricted |
body { | |
font-family: Helvetica, arial, sans-serif; | |
font-size: 14px; | |
line-height: 1.6; | |
padding-top: 10px; | |
padding-bottom: 10px; | |
background-color: white; | |
padding: 30px; } | |
body > *:first-child { |
a = { | |
'a': { | |
'x': 1, | |
'y': 2 | |
}, | |
'b': 3 | |
} | |
b = { | |
'a': { |
import sys | |
import time | |
from termcolor import colored | |
class Progress(object): | |
def __init__(self): | |
size = 0 |
class Color(object): | |
""" | |
utility to return ansi colored text. | |
usage:: | |
>>> from color import colored | |
>>> colored("text","red") | |
'\x1b[31mtext\x1b[0m' | |
""" |
#! /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 |