使用下载Ubuntu Desktop ISO镜像(32位64位都可以)。 用光驱启动,选择试用Ubuntu。
访问:http://cdimage.ubuntu.com/ubuntu-core/releases/找到所需要的镜像文件。
使用Ubuntu LiveCD,下载所需镜像到home目录
使用下载Ubuntu Desktop ISO镜像(32位64位都可以)。 用光驱启动,选择试用Ubuntu。
访问:http://cdimage.ubuntu.com/ubuntu-core/releases/找到所需要的镜像文件。
使用Ubuntu LiveCD,下载所需镜像到home目录
import os | |
import re | |
import zlib | |
import functools | |
import urllib.request | |
from mmap import mmap | |
from struct import unpack | |
from ipaddress import IPv4Address | |
from collections import namedtuple |
# Build dependencies for OpenResty. | |
sudo apt-get install build-essential libpcre3-dev libssl-dev libgeoip-dev | |
# Install standard Nginx first so that you get the relevant service scripts installed too | |
sudo apt-get install nginx | |
# If you want to access Postgres via Nginx | |
sudo apt-get install libpq-dev |
local ffi = require "ffi" | |
local sha512 = require "resty.sha512" | |
local aes = require "resty.aes" | |
local ffi_new = ffi.new | |
local ffi_str = ffi.string | |
local C = ffi.C | |
local setmetatable = setmetatable | |
local error = error |
--[[ deepcopy.lua | |
Deep-copy function for Lua - v0.2 | |
============================== | |
- Does not overflow the stack. | |
- Maintains cyclic-references | |
- Copies metatables | |
- Maintains common upvalues between copied functions (for Lua 5.2 only) | |
TODO |
from tornado import ioloop | |
from tornado import iostream | |
import socket | |
class Envelope(object): | |
def __init__(self, sender, rcpt, body, callback): | |
self.sender = sender | |
self.rcpt = rcpt[:] | |
self.body = body | |
self.callback = callback |
# Boyer Moore String Search implementation in Python | |
# Ameer Ayoub <[email protected]> | |
# Generate the Bad Character Skip List | |
def generateBadCharShift(term): | |
skipList = {} | |
for i in range(0, len(term)-1): | |
skipList[term[i]] = len(term)-i-1 | |
return skipList |