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
| @echo off | |
| chcp 65001 | |
| set args=%* | |
| set pipi=pip install -i https://pypi.doubanio.com/simple/ --trusted-host pypi.doubanio.com | |
| if [%~1]==[] goto :show_help | |
| if [%args%]==[-h] ( | |
| call %pipi% --help |
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 os | |
| import re | |
| import glob | |
| import traceback | |
| import chardet | |
| # import threading | |
| from multiprocessing.dummy import Pool as ThreadPool | |
| from operator import is_not | |
| from functools import partial |
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
| # -*- coding: utf-8 -*- | |
| import time | |
| import logging | |
| import threading | |
| from multiprocessing.dummy import Pool as ThreadPool | |
| from multiprocessing import Manager | |
| try: | |
| from http.client import RemoteDisconnected | |
| except ImportError: | |
| from httplib import BadStatusLine as RemoteDisconnected |
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
| @echo off | |
| rem PowerShell 中查看所有环境变量的方法 | |
| rem (gci env:*).GetEnumerator() | Sort-Object Name | Out-String | |
| if not defined DOCKER_TOOLBOX_INSTALL_PATH ( | |
| rem DOCKER_TOOLBOX_INSTALL_PATH 为 docker.exe 和 docker-machine.exe 所在文件夹 | |
| echo 环境变量 DOCKER_TOOLBOX_INSTALL_PATH 不存在 | |
| echo 按任意键 退出 | |
| pause > nul |
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
| # https://stackoverflow.com/questions/10588644/how-can-i-see-the-entire-http-request-thats-being-sent-by-my-python-application | |
| import requests | |
| import logging | |
| # These two lines enable debugging at httplib level (requests->urllib3->http.client) | |
| # You will see the REQUEST, including HEADERS and DATA, and RESPONSE with HEADERS but without DATA. | |
| # The only thing missing will be the response.body which is not logged. | |
| try: | |
| import http.client as http_client | |
| except ImportError: |
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
| // npm install request -g | |
| /** | |
| * 导入全局包 | |
| * @see https://stackoverflow.com/questions/15636367/nodejs-require-a-global-module-package/38535119#38535119 | |
| */ | |
| function requireGlobal(packageName) { | |
| var childProcess = require('child_process'); | |
| var path = require('path'); | |
| var fs = require('fs'); | |
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
| # -*- coding: utf-8 -*- | |
| from __future__ import print_function, absolute_import | |
| import json | |
| import logging | |
| from multiprocessing.dummy import Pool as ThreadPool | |
| from multiprocessing import Manager, freeze_support | |
| import threading | |
| import os | |
| import sys |
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
| # -*- coding: utf-8 -*- | |
| import json | |
| import requests | |
| from prompt_toolkit.completion import WordCompleter | |
| from prompt_toolkit import prompt | |
| from prompt_toolkit.formatted_text import ANSI | |
| from prompt_toolkit import print_formatted_text |
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
| # -*- coding: utf-8 -*- | |
| from prompt_toolkit.layout.margins import ScrollbarMargin | |
| from prompt_toolkit.formatted_text import to_formatted_text | |
| from prompt_toolkit.layout.controls import FormattedTextControl | |
| from prompt_toolkit.layout.containers import Window | |
| from prompt_toolkit.keys import Keys | |
| from prompt_toolkit.key_binding.key_bindings import KeyBindings | |
| from prompt_toolkit.formatted_text import HTML |