- Go to the directory
tools\build\.(早期版本是tools\build\v2) - Run
bootstrap.bat - Run
b2 install --prefix=PREFIXwhere PREFIX is the directory where you want Boost.Build to be installed - Add
PREFIX\binto yourPATHenvironment variable. (可选,通常我们只需要 Boost 的 dll,不会生成 bin 目录)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| This gist shows how to run asyncio loop in a separate thread. | |
| It could be useful if you want to mix sync and async code together. | |
| Python 3.7+ | |
| """ | |
| import asyncio | |
| from datetime import datetime | |
| from threading import Thread | |
| from typing import Tuple, List, Iterable |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """Provide high-level UDP endpoints for asyncio. | |
| Example: | |
| async def main(): | |
| # Create a local UDP enpoint | |
| local = await open_local_endpoint('localhost', 8888) | |
| # Create a remote UDP enpoint, pointing to the first one |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #! /usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| import cookielib | |
| import json | |
| import tempfile | |
| import mechanize | |
| import re | |
| import requests |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import glob | |
| lines = [] | |
| py_files = glob.glob('*.py') | |
| for py_file in py_files: | |
| if py_file.startswith('_'): | |
| continue | |
| if py_file.endswith('hook-eventlet.py'): | |
| continue | |
| line = "'dns.{}'".format(py_file[:-3]) |