下载 ip.py 到本机, 执行 python ip.py 网段 掩码
> python ip.py 111.10.40.128 255.255.255.192
111.10.40.128 111.10.40.191
输出即是起始和终止 IP。
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| from IPy import IP | |
| file_path = "/Users/wateer/Downloads/1" | |
| """ | |
| file content like this: | |
| 183.232.67.128 255.255.255.240 | |
| 183.232.76.98 255.255.255.248 |
| #!/bin/env python | |
| # -*- coding:utf-8 -*- | |
| import sys | |
| reload(sys) | |
| sys.setdefaultencoding('utf-8') | |
| from IPy import IP | |
| import xlwt |
下载 ip.py 到本机, 执行 python ip.py 网段 掩码
> python ip.py 111.10.40.128 255.255.255.192
111.10.40.128 111.10.40.191
输出即是起始和终止 IP。
| package pubsub // import "github.com/docker/docker/pkg/pubsub" | |
| import ( | |
| "sync" | |
| "time" | |
| ) | |
| var wgPool = sync.Pool{New: func() interface{} { return new(sync.WaitGroup) }} | |
| // NewPublisher creates a new pub/sub publisher to broadcast messages. |
| #!/bin/env python | |
| # -*- coding:utf-8 -*- | |
| import threading | |
| sem = threading.Semaphore(10) | |
| result = [] |